For-Loop vs Broadcast

default0default0 said

8 months ago | Post #1
Hi.

Im having a question about performance of the gameserver:

So, Im sending stuff from a client to a server.
And now that stuff should be send to any other player in order to sync up.
Which version of those two here costs more performance:



Or



Notes:
m.GetString(0) -> Contains the data I want to send
m.GetInteger(1) -> Contains the player ID which this affects

Hope some1 can answer this question as Im not sure which way eats up more performance (and this code will be executed very often on my server...).

Best regards

Cyclone103Cyclone103 said

6 months ago | Post #2
I'd use broadcast personally.

Reply to thread

Sign up now to reply to threads

aaron the hedgehog

aaronthehedgehog.joyem.com is an independent gaming site where you can play both single- and multiplayer games for free.

Developer Tools

If you're a flash game developer, we've got some awesome tools to help you make even better games.

Great Games

Why not try some of the very best online flash games we've got, completely free?

Copyright ©2007-2010 aaron the hedgehog™ - All rights reserved.0ms on NONOBA-WEB2