Wednesday, September 11, 2013

Sound while networking

The whole afternoon has been spent behind the synchronization of the sound while playing on the network. It would be impossible to send the sounds to play through the net because too big so I need little data of bits that trigger the sound on the client object. Even for very basic sounds such us the ball bouncing against the pad I need a routine client side that tells me the collision has been verified (or else would be only available on the server/client device) and then one specific bit goes to 1 and is sent. The client knows that every time this bit is equal to 1 the specific sound (for this example ball bouncing against the pad) will be played.
I just fit in the sounds ralated to all the kind of bouncing and it works, needs a good tuning/calibration but it works.
I see the amount of data starts to be quite high so next priority will be to delete all the unnecessary from the code, sprites, etc etc, everything that uses memory.
Then I need to check what else needs to be sent back and forth and once the idea is complete I need to make the final buffer as clean as possible.
All this work of cleaning and re-ordering should be useful for a better speed while playing on network.

No comments:

Post a Comment