Theoretics and Pseudocode: Sound Cues.

Hello,

I'm planning on porting your ideas into Python, but I'll accept answers in any language, even pseudocode. I've noticed that in a lot of audiogames where we pull a random sound for, say, steps or gunshots, we sometimes play the exact same sound twice, or even more. My record is hering the same step time 7 times in a row. To me this is jarring, and I was trying to think of a good way to fix this.
I came up with something tht I'm fairly certain has been done before, Sound Cues.
In the Python Engine I'm develpoing in currently, we have an Audio Backend that operates nearly identically to Bgt's SoundPool Class. My idea is to somehow store two pieces of data per sound:

  • Soundfile and or key:

    • Problem one: I use multi-folder archives for my sounds. Should I display the full path? Make up a key for each sound, which is the absolute last resort.

  • The list of sounds related:

    • I've developed a system where we can have as many of a specific sound, say, fire, in a folder, as we want, provided they all start with the ame string. Therefor, we could store a list of all collected sounds that can be played and pop them upon play,

    • Or, we could store a list of what's been taken.

I'm trying to figure out a way to do this both cleanly, in a way that doesn't take up a bunch of resources and in a way that doesn't chop at all. The main reason I'm worried about these is that in the systems I'd be using these for, I'd probably be using a very large amount of sounds.
I thought about just making sure I don't use the same sound twice, which is a lot easier, but I'd really like to be able to do this where no sound plays again until every sound has been played.
Be aware, I haven't put this to any code yet, so I don't have any performance checks, but I don't know enough about such things to say whether it would be expensive or not, although I'm asuming a list of such proportions would be, so I'd like to here your suggestions first, so I can hopefully do this right.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector

Reply via email to