So like I said, I'm working on a sound module that is easy and comfortable to use, at least for me. Here's a problem: BGT's sound pool is only useful for BGT. What I mean is this:
If you didn't know, BGT's sound_pool is basically a glorified array, or list if you're familiar with python. The methods loop through the list, updating the sounds based on the values given. That's not my issue. My issue is implementation.
In python, every time I'd want to use BGT version of the sound pool I'd have to import it. Can you imagine? Can you imagine how many update methods I'd call just for, say, 50 pits? As far as I know, I can't import a module in one file and force python to realize that yes, I'll be using the same damn thing in all my files without re-importing it, like I can with bgt. That'll mean something like this:
Say we have a player file, an enemy file, and a pit file. Every time I'd want to use sound pool I'd do
import sound_pool
into each file. The problem is that the sound pool will have 100 objects, and now I'd have to call the update_listener method 3 times in 3 different places, which would also probably break things. I have sound positioning functions written, that was simple enough, but I'm stuck on how not to make python loop through many different lists and not having the same code over and over and over.
So tips? Suggestions? I'm truly lost here. I don't know how to progress, and more importantly I don't even know where to start looking.
Pages 1