Hey, just a simple question here. I noticed "Camera - Player [0] moves the camera for Any Reason" does not state it has any issue with causing network traffic. How does this function differently than with your mouse and key press events? If I had 12 players and I wanted something to happen while a players camera is moving, is it more efficient to still use a nonstop while loop, or a single trigger with 12 Camera Move events?
I'm not sure about the network traffic question, but as far as efficiency goes - events always cause some lag when firing, so handling multiple event calls with a loop instead will probably help your game's performance. This has more to do with computing power than network lag.
That makes sense, I suppose I am just confused as to how data is transferred around. Please correct me on any of this as I am trying to understand exactly how SC2 works. Is all code executed specifically server side only or does every player run their own instance that ultimately has to sync up with everyone?
For example, if I run a constant loop that picks every player to retrieve a datatype, is that a dedicated server requesting information from client or is every person basically executing every single line of code and syncing everyone together hoping all data is the same per computer?
From what i understand (which isn't much). Each player runs the map on their own computers and the server sync them. Periodic are not usually an issue especially when you run them under a small number of events.
Blizzard (intentionally or accidentally) did not put a activation limit on many events. mouse move fires off at a very very high speed when the mouse moves, most of us turn the event on/off at a more reasonable speed (0.1-0.2) to fix the lag issue.
As for Camera Move, the camera doesn't move as much as the mouse or other things and blizzard may have limited the event is some way. I suspect however that if you move the camera around a lot it will generate lag.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey, just a simple question here. I noticed "Camera - Player [0] moves the camera for Any Reason" does not state it has any issue with causing network traffic. How does this function differently than with your mouse and key press events? If I had 12 players and I wanted something to happen while a players camera is moving, is it more efficient to still use a nonstop while loop, or a single trigger with 12 Camera Move events?
Thanks
I'm not sure about the network traffic question, but as far as efficiency goes - events always cause some lag when firing, so handling multiple event calls with a loop instead will probably help your game's performance. This has more to do with computing power than network lag.
Edit- Is SC2 a peer-to-peer lockstep?
That makes sense, I suppose I am just confused as to how data is transferred around. Please correct me on any of this as I am trying to understand exactly how SC2 works. Is all code executed specifically server side only or does every player run their own instance that ultimately has to sync up with everyone?
For example, if I run a constant loop that picks every player to retrieve a datatype, is that a dedicated server requesting information from client or is every person basically executing every single line of code and syncing everyone together hoping all data is the same per computer?
From what i understand (which isn't much). Each player runs the map on their own computers and the server sync them. Periodic are not usually an issue especially when you run them under a small number of events.
Blizzard (intentionally or accidentally) did not put a activation limit on many events. mouse move fires off at a very very high speed when the mouse moves, most of us turn the event on/off at a more reasonable speed (0.1-0.2) to fix the lag issue.
As for Camera Move, the camera doesn't move as much as the mouse or other things and blizzard may have limited the event is some way. I suspect however that if you move the camera around a lot it will generate lag.