🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

onward!

posted in A Keyboard and the Truth for project 96 Mill
Published April 12, 2006
Advertisement
So this week was mainly wrestling with Lua =/

it turns out that using the co-routine system directly in lua, causes each co-routine to be pushed onto the main stack, however even when a thread dies it doesn't pop it off the stack. this eventually results in a stack overflow, which is baaaad =)

it took me a while to come to terms with the fact that lua was not at fault, it just seems that in this case, if you make it, it's yours. given that each co-routine can potentially spawn off more, it means that i need to search and prune the stack when a thread dies, not too hard and no performance hit, it just took a long time for me to come to grips with the fact lua wasn't gonna do it for me =/


so my next immediate task(s) are to implement the audio system fully, this should be fun =D

the S3Engine audio system uses concepts developed in the Flare3 engine to make sound management a breeze, the most important of which is 'dot notation addressing'

this means that every sound is made reference to via a user-defined dot notation string, each level of the notation specifies a new 'pool' of sounds, for instance:

"game.effects.gunshot0"

in here we see that our root is 'game' and the next pool is 'effects' and then we jump straight to the sound alias, using this address or slight variations give us lots of power such as:

StopSounds("game.effects.gunshot0");

this will stop only "gunshot0"

StopSounds("game.effects");

this will stop all of the sounds in the "effects" pool

StopSounds("game");

this will stop all of the sounds in the game root

with this addressing system at the core of the audio system it makes using it very simple.
Previous Entry VICTORY!
Next Entry whew.
0 likes 9 comments

Comments

caffeineaddict
That's a pretty cool way of handling sounds. Are you going to have processing effects as well? I'm not exactly sure how you're implementing sounds, maybe per room or area? Anyway, would something like this be feasible?

Echo("game.effects.room1");

Making it like a cave or something? If so, that's pretty cool.
April 12, 2006 09:58 AM
EDI
each map has it's own 'soundscape' setting which loads one of many potential directsound environment simulation effects, so that 3D sounds act apropriately.

so if the map is cavelike we will use the cave soundscape and all of the 3D sounds will have that 'cave sound' =D
April 12, 2006 12:39 PM
ildave1
Very Cool!
April 12, 2006 01:29 PM
Twisol
Wow, that's a really awesome sound system. :D
April 12, 2006 03:17 PM
choffstein
Damnit Raymond, stop teasing us with the tech and get on with the show! I want some story already!

April 12, 2006 07:59 PM
Programmer16
Visage, haven't you been watching the screenshots? Its about a girl trapped on the beach without her bakini! OH THE HORROR!!! *faints*
April 12, 2006 10:29 PM
EDI
it will be revealed in june =)
April 12, 2006 11:33 PM
Rob Loach
StopBeingSoCool("gamedev.raymond");
April 13, 2006 12:02 AM
Twisol
Error: Function not found. Use "coolToThePowerOfTwo(string name, int coolFactor);" instead.
April 13, 2006 03:39 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement