Page 2 of 2

Re: [Homebrew] My first game... yet another Snake!

Posted: Fri Jan 05, 2018 4:16 pm
by DevEd
Sorry for the late reply, I don't check this place often.

Right now, DevSound doesn't support SFX on its own. However, it is designed to integrate with FX Hammer, a sound effect system that was originally created as a companion to Carillon Editor. When using raw register writes for SFX (which IIRC is what you are doing) it's very difficult to tell exactly when a sound effect stops playing so the relevant music channel(s) can kick back in. Disabling CH4 in DevSound is kinda not an option for me because I like to be able to use all 4 sound channels :P
Can you invoque for example [$89 - SetSpeed] from within the game code?
Right now no (unless you like writing directly to DevSound's RAM), but that's an excellent idea! I'll get to work on a sort of "external command" system for that purpose. Not sure what else the external command system would be used for, but I'm sure I'll think of something.

Also, an idea for your SFX trigger system: Each SFX should have its own "length" value, that way a music engine (such as DevSound) will know exactly when the SFX stops so the music channels can kick back in.

As for removing the halt in waitKey, I was trying to get it so that music could play during a waitKey, but I couldn't get it to work. I probably forgot to put the halt back in.
By the way, is it an idea to make 8 different tunes for the 8 maps :D ?
For the sake of variety, I'd say yes. I'd also recommend having different background graphics for each level if possible to add to the variety.

EDIT: I have the external command system working now.

Re: [Homebrew] My first game... yet another Snake!

Posted: Sat Jan 06, 2018 3:34 am
by calima
I have some questions on DevSound.

- how do you compose? Is there a converter for Deflemask, for example?
- what is the license for FX hammer? The demo says "free for non-commercial use", and there is no other info in the files

Re: [Homebrew] My first game... yet another Snake!

Posted: Sat Jan 06, 2018 8:25 am
by DevEd
To be honest, I should probably create a proper thread for DevSound here. Don't want to derail this one...

1. There is a WIP Deflemask converter, however the output will require some manual tweaking. I have attached the converter (which isn't mine BTW) if you're interested. (Requires Python 3 BTW)
2. Aleksi Eeben (the creator of FX Hammer) has gone on record to say that anyone is free to use FX Hammer as they see fit. You'd have to ask him if you plan on selling a game using it, though. The best way to contact him seems to be through Twitter (@aleksieeben).

EDIT: ...forgot to actually attach it -___-

EDIT 2: Any further DevSound discussion should go in this thread.

Re: [Homebrew] My first game... yet another Snake!

Posted: Sat Jan 13, 2018 7:14 am
by Yvar de Goffau
Indeed, I need to work on a simple centralized [s_playFX] function, which will trigger the playback of any sound effect in the game (not too difficult, since all that changes is the "frequency" of the noise register). I could store the lengths quite easily for DevSound, but I don't know where.

My knowledge of sound engines goes no futher than Something that Triggers the Right Note at the Right Time... :lol: why it would need to be update each frame goes beyond me but that doesn't matter :D

But it would be easier to use an existing SFX engine together with DevSound or another sound engine. I couldn't find anything about how to make FXHammer work or how to create new SFX for it. The disassembly I found somewhere is no help either for me noob in sound code :?

Can someone help me with it? I don't have much time for it now that real life has caught me up :roll:

Re: [Homebrew] My first game... yet another Snake!

Posted: Sun Jan 14, 2018 9:13 am
by DevEd
FX Hammer has an official editor. I attached it for convenience.

That disassembly of FX Hammer you found is mine btw :mrgreen:

Re: [Homebrew] My first game... yet another Snake!

Posted: Mon Jan 15, 2018 2:10 pm
by Yvar de Goffau
By hijacking DevSounds timer that normally makes the notes trigger, :twisted: I was able to accelerate the notes in line with the game (as well as keeping it in sync with the animations; something impossible with the classic song speeds). Until there would be a seperate TriggerSongNotes routine, this does the job.

I tried to make FXHammer work, but I discovered it was so much easier to just disable in DevSound the writing of the CH4's registers during that short period in which the SFX plays. This way, I could just keep the old sounds. 8-)

Now it is just waiting for some mad geniuses of an chip artists to compose the best snake theme-song in the world, and to make 8 variations of it for the 8 maps, and a 9th one for the title screen :wink: . Unfortunatly, my talent lies not as an composer....

Re: [Homebrew] My first game... yet another Snake!

Posted: Mon May 03, 2021 5:21 pm
by Nokia3310
This is the best version of Snake on the Game Boy that I've found so far. Nice pace, difficulty curve and looks smooth. Excellent! Just what I was looking for and more. The other level designs are a nice touch and add some extra, optional challenge.

It's on my Everdrive already and my Game Boy Pocket is always in my bag (I've got other handhelds but the old GB is a mainstay). This will now be my go-to Snake game. I don't actually use a 3310 anymore haha

Re: [Homebrew] My first game... yet another Snake!

Posted: Sat Jul 16, 2022 4:49 pm
by skite2001
@Yvar de Goffau

your work is very awesome.
if you ever read this, please contact me.
your github email seems sadly dead.