Page 4 of 4

Devlog: Vixx (bullet hell game)

Posted: Tue Feb 02, 2021 11:17 pm
by VincentF

Actually the program do this :


  • When loading the title screen, he checks if the high score variable is zero.


  • If so, he tries to load the file.


  • He immediately do "check_disk_error" that just return carry set if there was an error (whatever it was) and carry clear if the returned code was "00".


  • If there was an error, he then create a new file by storing zeroes in it.


  • Else he gets the content of the file and fill the high score variable.


I check if the score is zero on the title screen to avoid useless file loads. The file is saved back only when the last high score was beaten during a game.

I don't mind checking for a disk error directly, because it's not on a critical part of the code that need to be optimized as much as possible. Also quite conveniently, the error is stored on X and Y when returning, so this code could be reused on some other apps ^^

The next step for me, now that the filesystem access is fixed, is making a music / sound engine. My first steps with the PSG are very clumsy and to be honest I'm not good at all with music stuff ^^' I'm kind of afraid of this part. It would be the last big feature missing before I have all the bricks I need to finish the game.

Devlog 3 coming tomorrow probably, by the way ? I got a lot of stuff to talk in it


Devlog: Vixx (bullet hell game)

Posted: Wed Feb 03, 2021 12:56 am
by Greg King

By the way, CLOSE clears the carry flag just before it returns.  Therefore, your function doesn't need to do it for "good to go".


Devlog: Vixx (bullet hell game)

Posted: Wed Feb 03, 2021 10:41 am
by kliepatsch


11 hours ago, VincentF said:




The next step for me, now that the filesystem access is fixed, is making a music / sound engine. My first steps with the PSG are very clumsy and to be honest I'm not good at all with music stuff ^^' I'm kind of afraid of this part. It would be the last big feature missing before I have all the bricks I need to finish the game.



Have you had a look at the music player library? @DusanStrakl also made a simple sound effects library. They are intended for use in BASIC, but can also be used in machine code programs. If you have further questions about them, you can ask him. The source code for the Music Player Library is out there on GitHub. I couldn't find the source for the SFX library, but maybe the author would share that as well upon request.


Devlog: Vixx (bullet hell game)

Posted: Wed Feb 03, 2021 10:53 am
by JimmyDansbo


11 minutes ago, kliepatsch said:




I couldn't find the source for the SFX library, but maybe the author would share that as well upon request.



Effects library does not have its own repo, but it can be found here: https://github.com/Dooshco/X16/blob/master/Effects.asm

I have converted to ACME assembler her: https://github.com/JimmyDansbo/cx16stuff/blob/master/effects.asm


Devlog: Vixx (bullet hell game)

Posted: Wed Feb 03, 2021 8:10 pm
by VincentF

It was announced yesterday, here he comes, the third issue of my devlog !

#3 - 03/02/2021 : Graphic design is my passion.

 

Since the last devlog, I worked mainly on the graphic identity of the game, and also still improving the choreography system in place.

So as said in an earlier post, I got a background for the game : We play as an antivirus software that go through the computer to find and destroy a virus.

This idea is quite simple and allow me to work on simple graphics. Since a bullet hell game can be hard to read it's better to set a color code right away. So I decided to make the existing bullets in red and draw a small ship (no idea why but it made sense to me) in green. The contrast between the two is large enough to play the game without being confused. I also designed the main antagonist of the game, known as the Virus :

the_virus.png.c8c3e40a3a99e72cbb81f88b566cb41c.png

I also designed a title screen for the game, with a small message before it when we play in the emulator (looking at the ROM's source code I found out that $9FBE and $9FBF contains "16" when the emulator is running).

recording.gif.60cf4100379affdeb74bbb6991a8a17f.gif

 

Through the game, you'll get to boss phases, where the virus comes and summon a bunch of bullet to dodge. If you manage to survive long enough, the virus will be damaged and the next level starts.

the_virus_damaged.png.4408d466b814d8d0ad770aacec940636.png

When a boss is defeated, the player will be rewarded with some points and will also get one extra life.

 

Talking about points, let's recap the ways of gaining them :


  • Over time, you'll slowly get points just by surviving long enough


  • You'll get extra points by staying near bullets, taking risks can reward you with a huge amount of points


  • When defeating bosses, you get a fixed amount of points, not too much to avoid having it ruling over the others ways of getting points


  • When you have lost a life, you get invincibility but you won't gain any points during the period


  • I'm still thinking of other ways to get points, stay tuned for this


 

On the choreography side, I didn't made much changes, just optimizations to insert bullets in bulk. I finished a sketch of the first level layout, it need to be longer but I'm happy by how much he sizes for now (~768 bytes)

I have added a way to control the scrolling speed, the scoring-over-time speed, and finally he can controls what is displayed in the background as well as the bullet's sprites, and even reconfigure a bullet on the fly (for example to control the virus's movements).

 

Finally, here's the current state of the game, hope you enjoyed the devlog ? (note: level 2 is not done at all, the name and patterns are just tests)

recording.gif.b3c092b8b314b985acb99b7ba0947a54.gif


Devlog: Vixx (bullet hell game)

Posted: Wed Feb 03, 2021 9:08 pm
by DusanStrakl

Nice and very fast progress Vincent!

Like Kliepatch and JimmyDansbo mentioned I wrote couple of libraries that could be useful for implementing sound effects and music. Full tutorials with access to source code are available on my blog:

https://www.8bitcoding.com/p/simplest-sound-effects-library-for.html

https://www.8bitcoding.com/p/music-player-library-for-basic-programs.html


Devlog: Vixx (bullet hell game)

Posted: Wed Feb 03, 2021 9:15 pm
by VincentF


51 minutes ago, DusanStrakl said:




Nice and very fast progress Vincent!



Like Kliepatch and JimmyDansbo mentioned I wrote couple of libraries that could be useful for implementing sound effects and music. Full tutorials with access to source code are available on my blog:



https://www.8bitcoding.com/p/simplest-sound-effects-library-for.html



https://www.8bitcoding.com/p/music-player-library-for-basic-programs.html



Thank you ! ?

? Yeah I started to read your posts and code my audio engine following them ^^ It's really well made, thank you for this !


Devlog: Vixx (bullet hell game)

Posted: Mon Feb 08, 2021 6:24 pm
by VincentF

Hey everybody ! Here's a small update on the project !

#4 - 08/02/2021 : Music Engine

Following the excellent post by @DusanStrakl I wrote a music engine based on a very similar approach. This post allowed me to understand how to figure out an ADSR envelope and I learned a lot thanks to it.

It's far from being perfect and will need a rewrite, but for me it's enough for a first version.

Basically it's an(other) interpreter much like the Choreography Engine that reads a byte stream and control various things like changing the number of voices, the rhythm, the instrument used by a voice, jumping all while playing.

For this I have two loops running : the main loop that handles instrument's ADSR envelope and interprets the next notes, and the vsync loop that just updates as quickly as possible the PSG registers.

During this project, I wanted to run the vsync code as fast as possible, leaving the main computations to the game loop. To be sure the game loop keeps in sync with the frames, there is a wait_frame variable cleared by the vsync and each bit is set by a section of the loop, so for example I run the collision detection once per frame, the music engine runs also once per frame, the note interpreter runs once every [Rhythm] frames and finally the Choreography engine runs as fast as possible the rest of the time until next frame (unless put to sleep).

To also optimize space, I gave the note interpreter the ability to jump to subsection of a music. It's working like jsr and rts, but without a stack (So no sub-subsections). I also got some magic notes like a "Global NOP" opcode that will replace NOPing every voices, saving as much space as possible. Musics and Choreographies will take a big part of the memory so I must think of this ahead of time.

Here's an example of a music using my interpreter :

music_example.png.2fbdb447049fd18fdf4552be57e308b1.png

 

Now, I need musics ! .... If only I knew how to make good music lol

I asked a friend if he could try to do something but it won't be ready soon, actually ?

 

And that's all for this devlog ! Thanks for reading ?

Edit: I also started to clean up files for a near open-source release. I still need to add more comments to the code.


Devlog: Vixx (bullet hell game)

Posted: Mon Feb 22, 2021 8:10 pm
by VincentF

Hello everybody !

It's been a while, let's talk about what happened since last time

#5 - 22/02/2021 : Music Making

As said on the last devlog, I have asked a friend if he can help me making musics for the game. No luck for now, he's quite busy so we don't had a chance to try something.

While waiting for him, I started playing around with a software someone has suggested me some time ago : Bosca Ceoil. I went with multiple tries and finally got some themes for the game. It was my first musics I wrote, and considering how much time I spent clicking randomly I'm happy with the result so far.

bosca_seeking.thumb.png.aff68268ef44cc30b5c46621e7bae1b0.png

Bosca Ceoil, the music software I use to write Vixx's musics. Here you can see "Seeking", the music you can hear on the first level.

I remarked I was using the sawtooth waveform with low pitch pretty frequently, combined with either a noise channel or a pulse channel, to make the percussions. I also tend to use the pulse waveform as my main instrument. The triangle is sadly really too quiet to make anything out of it. (Surely we can do something but I doubt I will get something interesting with my little experience)

Converting from Bosca to music data is quite trivial : I only need to change the octave number from Bosca and adapt the number of voices / instruments used to get the same music (the quality seems less clear on CX16 than on Bosca).

I then use my music engine's abilities to perform jump-to-subsection in order to optimize space as much as possible :


  • The first song, "Seeking", uses 453 bytes for 44 seconds of music at 75 bpm


  • The first boss's theme, uses 179 bytes for 26 seconds of music at 60 bpm


  • The second level's music (just finished today),  uses 907 bytes for 1 minute and 18 seconds at 75 bpm


Here's the three musics of the game compiled as a Soundtrack album Vixx OST.zip ( once I get more musics i'll put the OST along with the prg download)

If you can, I would be glad to hear your feedback about these tracks ? I am still poking around when making music but I feel more and more confident ^^

Now that I have the music for the second level, my next goal will be making this second level himself ? Thank you for reading !