Forum Games Synchronous resimulation or not

Discussion relating to game development with Flash

Synchronous resimulation or not

Postby FulaFisken » March 11th, 2011, 12:48 am

Hi all.

We are developing a space shooter, the controls are asteroids like and our game has a server/client architecture. We time synch each client with the server and each event we send has a timestamp. We have implemented both interpolation and extrapolation on the client.

So far we got the game working quite good with up to 120-140 ms latency, after that it becomes to choppy and the ship stutter. The offset error between server and client becomes to great at a higher latency.

Now we are trying to implement a resimulation on the server to make the game completely synchronous by resimulate every event at the exact time it happened. We are unsure if this is the right path for our game, maybe there are other solutions for our game? Is a 120-140 ms latency limit decent for an asteroids clone with a client/server architecture?

Maybe we should aim for a more asynchronous solution?

Thank you.
Fula Fisken
website blog twitter
Play Game
Astroflux
User avatar
FulaFisken
Paid Member
 
Posts: 139
Joined: March 2nd, 2011, 10:15 am

Re: Synchronous resimulation or not

Postby Oliver » March 14th, 2011, 5:27 pm

You're building an asteroids-type game? Awesome! can i see it? :D

did you see asteroids universe?
http://playerio.com/showcase/asteroids-universe/

It's open source: http://code.google.com/p/multiplayer-asteroids/

also, here are a few good resources for this sort of issue:
http://playerio.com/blog/2011/01/28/how ... ng-issues/

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Synchronous resimulation or not

Postby FulaFisken » March 15th, 2011, 6:07 pm

Oliver wrote:You're building an asteroids-type game? Awesome! can i see it? :D

did you see asteroids universe?
http://playerio.com/showcase/asteroids-universe/

It's open source: http://code.google.com/p/multiplayer-asteroids/

also, here are a few good resources for this sort of issue:
http://playerio.com/blog/2011/01/28/how ... ng-issues/

Best,
Oliver


Unfortunately the asteroids example is completely client-side as far as I can see. We are aiming for an asteroids game with an authoritative server. I will post it in the forum once we have something that we are happy with. If we ever get to that point.
Fula Fisken
website blog twitter
Play Game
Astroflux
User avatar
FulaFisken
Paid Member
 
Posts: 139
Joined: March 2nd, 2011, 10:15 am

Re: Synchronous resimulation or not

Postby Benjaminsen » March 15th, 2011, 9:05 pm

Pretty much whatever server type you use you will have people with pings of upwards 200ms by simply having people from Europe and USA playing towards the same servers. Thus whatever solution you choose should be able to correctly handle lags of at-least that.

A solution is to re-implement the clientside interpolation / movement from the linked Asteroids example then sanity check player movements based on the serverside representation of events. Not a trivial implementation to create, but definitely doable.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Synchronous resimulation or not

Postby FulaFisken » March 21st, 2011, 12:03 pm

Btw, in the asteroids example every event is stepped through for every ms. If the time slice was 38 ms for turning left you loop through the turning in 38 steps. Ain't that very CPU intensive if you were to have more than just a couple of ships, like a bunch of enemies and collision detection? I would prefer to only have 20-30 fps on the physics and have a locked timestep.
Fula Fisken
website blog twitter
Play Game
Astroflux
User avatar
FulaFisken
Paid Member
 
Posts: 139
Joined: March 2nd, 2011, 10:15 am


Return to Games