Devlog #2 - Multiplayer
Before carrying on the project, I wanted to fulfil what I wanted to do, and that is to make a co-op heisting game. The first thing I did was create a simple lobby joining system using Unity Relay and Unity Netcode for Gameobjects. You can create or join a lobby via the main menu:
Creating a lobby will give you a code to share with your friends.
When joining a lobby, originally there was nothing to visualise when someone has joined and who has joined. To fix this, on your first time loading you will be asked to create a username. This is saved and read on a text file inside %appdata% on your pc. When connecting to the server, the client sends their username to the server and it is added to the player list:
While attempting to connect to a server using my personal laptop in uni, I discovered I couldn’t join a server. Despite this, the client attempting to connect to the lobby would appear as if they did. To fix this I created a connecting to lobby screen:
(A work around not being able to test while in uni is by using the pc’s on the internal network)
Despite being only capsules so far, the players can connect in the game.
Over the next week I want to create the prototype map using blockouts, and start on the NPCs using unity’s new behaviour trees.