[Homebrew] My first game... yet another Snake!
Page 2 of 2

Author:  DevEd [ Fri Jan 05, 2018 4:16 pm ]
Post subject:  Re: [Homebrew] My first game... yet another Snake!

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.

Author:  calima [ Sat Jan 06, 2018 3:34 am ]
Post subject:  Re: [Homebrew] My first game... yet another Snake!

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

Author:  DevEd [ Sat Jan 06, 2018 8:25 am ]
Post subject:  Re: [Homebrew] My first game... yet another Snake!

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.

[The extension py has been deactivated and can no longer be displayed.]

Author:  Yvar de Goffau [ Sat Jan 13, 2018 7:14 am ]
Post subject:  Re: [Homebrew] My first game... yet another Snake!

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:

Author:  DevEd [ Sun Jan 14, 2018 9:13 am ]
Post subject:  Re: [Homebrew] My first game... yet another Snake!

FX Hammer has an official editor. I attached it for convenience.

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

File comment: FX Hammer editor + documentation & examples [56.92 KiB]
Downloaded 104 times

Author:  Yvar de Goffau [ Mon Jan 15, 2018 2:10 pm ]
Post subject:  Re: [Homebrew] My first game... yet another Snake!

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....

File comment: Snake+Devsound: the game [64 KiB]
Downloaded 133 times
File comment: Snake+Devsound: the source
snake [105.86 KiB]
Downloaded 114 times

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group