Since this game is intended to be multiplayer from the ground up – or at least support it – everything needs to be designed with multiplayer in mind.
So today I set out to just get basic rudimentary server-client architecture working. All I wanted was a running server, which a player could connect to, and run around, and then when a second player connects, they can both see each other and run around independently.
Results were mixed.
There’s a reason multiplayer is the hardest fucking thing in the universe. It’s seriously not easy.
So I took about 14 passes at this, using different Nodes and different architectures, and every single one of them had a ludicrous number of drawbacks.
Even now, the job’s not done. It feels … close… ish… but I’m nowhere near finished.
And part of that is because nobody in their right mind is making a tutorial for this, because there’s a hundred ways to do it, and they all have pros and cons and differ depending on your use case.
So what did you end up with?
- Well, I’ve got a server that players can connect to. :white_check_mark:
- Player 1 can connect to it
- Player 1 can move his little guy left and right
- The server has lost its ability to track his position so it doesn’t know the guy is moving (this was working and broke
- Player 2 can connect to it
- Player 2 can move his little guy left and right
- Player 2 also moves Player 1’s little guy left and right
- None of the clients are synchronizing anymore (this was working and broke)
- The server has the ability to control everyone even though I’ve told it not to
So… mixed results. 50/50.
This would be easier if half of the tutorials weren’t completely obsolete and the other half of the tutorials just straight up didn’t work.