Original Post
Okay, I'm thinking about the following situation:
- Client/Server topology
- 1 to 10 clients per server
- All data sent over TCP/IP in binary format
- Up to roughly 200 entities of interest to any given client at any given time, typical figure is 1/3rd to 1/2 of that
- Entity movement is generally slow, linear, and predictable (eg. direction and velocity only changes once per second or two)
- No twitch gameplay (RPG or RTS, not FPS, no significant physics)
I'm hoping to get that working with minimal popping/snapping but with reasonable synchronisation across all machines, probably running slightly in the past (100-500ms?) on everybody's machine to facilitate this.
I don't want a lock-step system, mostly so that each client only knows about the entities I want it to know about. (Also discussed here recently.)
I'm thinking of broadcasting messages consisting of entity-position/direction/velocity/server-timestamp, plus maybe some forward-dated messages with zero velocity acting as 'stop here' commands to reduce overshoot. This would be done maybe 1 or 2 times per second per entity. Does that sound reasonable? I'm hoping that by sending velocities and running everything in the past I can get smooth-looking motion, since the direction of movement is quite predictable, and can avoid needing to do good forward prediction.
Regarding the approach of simulating the past, what sort of delay is reasonable for this? I was probably going to start with about 250ms, hopefully more than allowing for the various obvious causes of latency (eg. per-connection polling frequency on the server, actual net latency, and per-connection polling frequency on the client). I'm happy for people to see occasional position corrections, as long as the vast majority of players get a smooth game the vast majority of the time.
Any obvious mistakes I'd be making? Anything I need to consider that I've forgotten? I've "only" worked on MMOs before, so this is slightly different. ;)
- Client/Server topology
- 1 to 10 clients per server
- All data sent over TCP/IP in binary format
- Up to roughly 200 entities of interest to any given client at any given time, typical figure is 1/3rd to 1/2 of that
- Entity movement is generally slow, linear, and predictable (eg. direction and velocity only changes once per second or two)
- No twitch gameplay (RPG or RTS, not FPS, no significant physics)
I'm hoping to get that working with minimal popping/snapping but with reasonable synchronisation across all machines, probably running slightly in the past (100-500ms?) on everybody's machine to facilitate this.
I don't want a lock-step system, mostly so that each client only knows about the entities I want it to know about. (Also discussed here recently.)
I'm thinking of broadcasting messages consisting of entity-position/direction/velocity/server-timestamp, plus maybe some forward-dated messages with zero velocity acting as 'stop here' commands to reduce overshoot. This would be done maybe 1 or 2 times per second per entity. Does that sound reasonable? I'm hoping that by sending velocities and running everything in the past I can get smooth-looking motion, since the direction of movement is quite predictable, and can avoid needing to do good forward prediction.
Regarding the approach of simulating the past, what sort of delay is reasonable for this? I was probably going to start with about 250ms, hopefully more than allowing for the various obvious causes of latency (eg. per-connection polling frequency on the server, actual net latency, and per-connection polling frequency on the client). I'm happy for people to see occasional position corrections, as long as the vast majority of players get a smooth game the vast majority of the time.
Any obvious mistakes I'd be making? Anything I need to consider that I've forgotten? I've "only" worked on MMOs before, so this is slightly different. ;)