For-Loop vs Broadcast

default0default0

很久以前 | 帖子#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

很久以前 | 帖子#2
I'd use broadcast personally.

回复主题

现在就注册以回复主题

5dyouxi

5dyouxi.com是一个独立的游戏网站,在这里你将可以免费玩到各种好玩的单人和多人游戏。

开发者工具

如果你是一位flash游戏开发者,我们有一些非常强大的工具来帮助你开发更加优秀的游戏。

经典游戏

为什么不试试我们这里的一些最为优秀的在线flash游戏呢?这可是完全免费的!

Copyright ©2007-2012 5dyouxi™ - All rights reserved.15.6ms on SERVER34096
注册 或者