Optimization

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
louissi
Posts: 48
Joined: 03 Mar 2006, 20:55

Optimization

Post by louissi »

Hi there!
I am looking for a way to optimize my game as much as possible.

Right now we are around 6-7kb/s outgoing data by user and it is obviously a bit too much.

My game is a real time 3 players coop defense game. One user sends the position and states of the enemies as they change state/action.

I think I made all I could to reduce the amount of information sent, but I was wondering if there is a smaller way to send it.

I know sfx2 uses binary protocol...

Lets say I have a unit with the id 102.
I am trying to send its x and y coordinates and a new state id.

Normally I would create an SFSObject, put some ints into it with the according keys and send it as an extension request.

Would it be worth it to reduce all my parameters to a big string (ex: #i|102-x|200-y|200-s|2) instead of sending SFSObjects of the type int?

I know it would be more complicated code-wise, but I can spare some time if it really would help.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

No, don't over complicate things. There is no difference in speed in the transmission of 100bytes vs 150 or 200, your message size don't affect network lag, unless we're talking about orders of magnitude (i.e. 100 vs 1000)
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply