Server Frames Per Second
If a server only needs to send out data and do all it's processing at an interval of once per second, is there any reason to try to get it to run faster than 1 "frame" per second?
I think it would be good to leave some leeway for any needed burst processing, so maybe try to get it running an average of ~5 frames per second.
With the assumption that you have build a reliable communication, you only need to send out data which have changed. So, if your data get only proceed once per second, you need to send them out once per second. With every frame just do
update data
check for modified data
send modified data
wait for next frame
It's a little more complicated in this case. I should have specified before but for a Unity server that handles physics I'm not sure I can do any waiting without it affecting the physics since Unity handles the threading, I wouldn't know where to put any stalls.
If the engine owns the main loop, then "waiting" turns into "do more work on the next 'tick' callback."
enum Bool { True, False, FileNotFound };
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement