I’ve been working on Planitia’s multiplayer for about six weeks now. It has required a pretty major rewrite to the underlying engine as well as near-continual rewrites to how I’m transmitting my data.
But…
The game is now inherently stable. In other words, two computers can connect and run the underlying world simulation and it’ll be exactly the same on both computers – they’ll never get out of sync. Which means that when the game does get out of sync, it’s due to player interaction, which can easily be logged and debugged. Most of the out-of-syncs are being caused by code I wrote months or even years ago that access the system timer manually – you just cannot do that in a multiplayer engine; you must use update timers (in other words, instead of a villager farming for 500 milliseconds, it farms for 15 33-millisecond updates).
I need to scour all the code that performs player actions as well as all my units and make sure nothing is using direct timing calls, but after that…well, the game should stay in sync, at least on a LAN. I’ll also need to clean up the multiplayer startup code so that it’s easier to start a game (right now you have to put the IP of the server into your engine.cfg file) as well as implement the last couple of god powers and then…
And then I’ll be releasing the multiplayer demo. ‘Sright! Of course, this demo will be LAN only – I cannot emphasize this enough. If you play it over the internet and it lags horribly, I hereby revoke your authorization to come crying to me. That’s not to say I won’t fix that eventually – I certainly plan to.
Sigh…once again I can’t post a new screenshot with pretties because that’s not what I’m working on. Indeed, after doing multiplayer coding going back to graphics would seem like a holiday.
Edit: Sol suggested I present a screenshot of two instances of the game running in sync. Great idea!