Synchronising two player serial linked games

bbc micro/electron/atom/risc os coding queries and routines
Post Reply
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Synchronising two player serial linked games

Post by tricky »

I thought of this in the 80s, but have only just remembered.
If you are writing a game that needs fast responses, to make it fair, you should synchronise the two machines so that one player doesn't get up to 20ms more time to respond.
You can do this by messaging back and forth and adjusting the total lines in a frame untill both machines are synchronised - simples ;)
I've never coded this and have no game planned to use it, but thought I would put it out there, or here, before I forget for another 40 years!
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Synchronising two player serial linked games

Post by tricky »

If you wanted a simple way to adjust it slowly, you could set vertical offset to 1 to slow down by 64us per frame, this would shift the image down by a scan line though.
Adding a short row after the displayed part of the screen would be neater but require much more accurate timing.
Post Reply

Return to “programming”