Jump to content
  • Advertisement
  • entries
    503
  • comments
    1888
  • views
    335406

onward!

Sign in to follow this  
EDI

131 views

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.
Sign in to follow this  


9 Comments


Recommended Comments

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.

Share this comment


Link to comment
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

Share this comment


Link to comment
Damnit Raymond, stop teasing us with the tech and get on with the show! I want some story already!

Share this comment


Link to comment
Visage, haven't you been watching the screenshots? Its about a girl trapped on the beach without her bakini! OH THE HORROR!!! *faints*

Share this comment


Link to comment
Error: Function not found. Use "coolToThePowerOfTwo(string name, int coolFactor);" instead.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!