I've uploaded my work-in-progress implementation of online co-op! It's in the publicbeta branch, where I imagine it will be staying for the next few months as I add improvements and bug fixes.
This is the first time I've made this available to the public! So bear in mind it may turn out to be completely broken on your PC for some reason or another. You can test it by doing the following:
- Right-click on Survivalist in your Steam library and click Properties
- Go to the Betas tab
- Select publicbeta on the drop-down where it asks you what beta you want to opt in to
- PLEASE NOTE: any savegames you make with this branch will not be compatible if you switch back to the main branch. So don't overwrite anything that's important to you!
If you find any problems, post a reply to this news post or email me or post in the forums. Here are some of the likely common problems:
Lag
All network games have lag but most cover it up using prediction. That's where the game guesses ahead of time what's going to happen, so it can display it to you without waiting to receive inputs from the online players.
I haven't added prediction to Survivalist yet, so it may be pretty laggy. I'm not quite sure how bad this will be in real world conditions, it could range from mildly annoying to completely unplayable.
Out of Sync errors
Survivalist's online co-op works by running an identical simulation of the world on each PC, so the only network messages it sends are the buttons you've pressed each frame. This is different from most network games such as CounterStrike which would typically send the actual positions of the players.
If there's a bug which causes something slightly different to happen in the simulation on one PC from another, the games will get out of sync. And due to chaos theory, one small difference will lead to larger differences, and so on.
Therefore, every 1 second I serialise the entire game state and send the hash to the server to check it's the same. If it isn't it has to send the entire game state from the server to the client again. If this happens to you you'll see the game reload saying "Out of Sync Error". The server will also have the two game states dumped into their "Documents" folder, in a directory called "OutOfSync". It would be helpful if you could email these to me so I can track the problem down :)
On lower-spec machines there might also be a performance hit from constantly serialising the game (basically, equivalent to doing a quicksave every 1 second). Later I will increase the interval.
Other Stuff
There's a lot of things that could be improved that I'm already aware of and will be working on for the next beta releases. For example:
- There needs to be a log so you can see a history of all the things people have said, quests that have been started, players joining and leaving, etc.
- The notification messages that pop up when you start a quest can be quite annoying as they take control away from you but don't pause the game any more.
- There need to be some options to control things such as whether other players can pause the game, or how many can join you. (Currently the maximum player limit is 2, I hope to raise it to 4 but I haven't tested that at all yet so I decided to limit it to 2 in the first release).
Chat
There is a chat button in the game so you can talk to each other, by default it's bound to ENTER.
EDIT: There was also a minor update to the main branch, which was mainly just corrections to the Russian translation.