• 10
• 12
• 12
• 14
• 16

# Server Frames Per Second

This topic is 1195 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites

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



##### Share on other sites
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.

##### Share on other sites
If the engine owns the main loop, then "waiting" turns into "do more work on the next 'tick' callback."

##### Share on other sites

So it's pointless to wait it seems, since it just creates more work the next tick.

I mainly just want to process all physics entities within a second while supporting as many as I can. I don't think I need any artificial stalls.