views:

268

answers:

2

I am trying to make a simple two player snake game that uses gameKit to send movement information back and forth. I start the game out with the server sending a command to start the game. Once the game starts a timer fires every .5 seconds that moves the snakes. No matter what I do I end up with the timers on the two iPhones firing at different times. Does anyone have any suggestion or advice for a solid way of synching the information between the devices?

Thanks in advance for your help!

A: 

A quick search for network game synchronization techniques yielded plenty of results... Each game is unique, I imagine you could adapt some of the techniques from these articles to help:

There were even a few IEEE articles if you have access to them.

Nick Veys
+1  A: 

What I finally went with was to have one device do all the number crunching and send the other device information on where its snake (it was a snake game) should be instead of having both devices calculate where there snakes should be and sending that info to the other device. That way led to syncing issues 100% of the time.

Ron Dear