Added Main Menu UI


author: Sephen Smothers

Posted on 06/21/2024

The Problem:

The main challenge for me this week was getting the clients and hosts to connect with one another from the main menu screen. I created the UI and set up the process for getting hosts to make a lobby and for clients to join that lobby. I also had to set up the player ready functionality so the host would not be able to start the game unless all players were ready.  

The Solution:

I started with the UI and setting up the buttons in code. I then moved on to getting the logic implemented for the player ready system. The challenge was that this required me to rework the host and client connectivity, which in turn broke the game. To fix it I had to separate the code for connections into two different files, I then had to add a player struct to hold the client id, name, and if they were ready. Then with the use of delegates I set the ready up button to the handle client and host ready functions so it can broadcast that information to the other clients connected. 

Get Mirrors

Leave a comment

Log in with itch.io to leave a comment.