Which is a very poetic way of saying that the end result of today’s progress exactly the same as it was at the start … except different.
I had 2 major checklist items left to be able to call my multiplayer implementation “finished.”
- I needed to be able to send data back and forth between the server and the client in some way so that players can know information about other players – like their names or stats. Also so that players can retrieve information about their own accounts.
- I needed to be able to save the player’s position on regular intervals as they moved so that next time they logged in, they were put back at their previous location instead of the origin, which is (0,0,0) where everyone spawns.
I realized pretty quickly that I needed to insert another bullet point in the middle there… I needed to be able to actually store information about the character on some kind of storage…
So what did you do?
I checked off that first bullet point, because sending data back and forth was the prerequiste for everything else. There were some lessons learned here about serialization and RPC, but it wasn’t too difficult.
After that, I set up a system of accounts and characters. When you connect to the server for the first time, an account is created for you, and then that id is saved on your pc. Then, a character is created for you, and the character is linked to the account. Eventually the account info will be locked behind authorization, and you’ll be able to choose from multiple characters. But for now it’s just automatic and you only get one character.
On subsequent logins, you’re logged into the account (and then the character) that were created for you previously. Awesome! Long-term storage! That means we have a file we can write position data to!
So that will come tomorrow!
Oh, and also
I billboarded all the sprites and it looks way better.