For-Loop vs Broadcast

default0default0 sagði

8 mánuðum síðan | Færsla #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 sagði

6 mánuðum síðan | Færsla #2
I'd use broadcast personally.

Svara þræði

Skráðu þig núna til að svara þráðum

Spilatorg

Velkomin(n) á spilatorg.is. Spilatorg er sjálfstæð leikjasíða þar sem þú getur spilað bæði einstaklings- og fjölspilunarleiki frítt.

Tól hönnuða

Ef þú ert flash leikja hönnuður, þá erum við með nokkur frábær tól til að hjálpa þér að búa til jafnvel enn betri leiki.

Frábærir leikir

Af hverju prófarðu ekki nokkra af bestu flash netleikjunum sem við erum með, algjörlega frítt?

Copyright ©2007-2010 Spilatorg™ - All rights reserved.15,6001ms on NONOBA-WEB2