top of page
Search

Connected Game Development Blog #5 (27/04/2026)

  • scottgray500
  • Apr 27
  • 2 min read

Updated: Apr 28

The current state of GameLogic's PlayerJoined function, which includes a line that sets the value of each player's colour index to the order that they joined the game in.
The current state of GameLogic's PlayerJoined function, which includes a line that sets the value of each player's colour index to the order that they joined the game in.

Since everyone was still using the same white colour palette, I decide to add player colours to the game so that each player can tell each other apart, which I did by creating an index that gets called in GameLogic's PlayerJoined() function and sets the player's colour depending on the order in which they joined, which is reflected to every other player by running the Player script's ApplyColour() function in the Render() function. I also added a new Sniper Rifle weapon due to the lack of precise weaponry, which doesn't actually zoom in like a typical video game sniper rifle does, but still retains the exact precision of one. It may deal the same amount of damage as the Bazooka (50), but due to its hitscan nature, only one player can be hit by it.


The dead player detection system in GameLogic's StartTurn() coroutine, which moves the order onto the next alive player if the next player in line is identified to be dead, with the function to drop a Health Crate being ran if the game ends up wrapping back around to the beginning of the player list.
The dead player detection system in GameLogic's StartTurn() coroutine, which moves the order onto the next alive player if the next player in line is identified to be dead, with the function to drop a Health Crate being ran if the game ends up wrapping back around to the beginning of the player list.

During another playtest, I also discovered that there was no system in place to tell dead players apart when they were given their turn while dead, so I added a death detection system where the game skips over dead players when it's time for the next turn and, if the list wraps around back to the beginning, it runs the code to drop a Health Crate as usual. That playtest also showed that the text at the bottom of the screen that says whose turn it is is off-sync for everyone but the host, so I fixed that up too.


Code in Player's Render() function that links the visibility of the player's model to whether or not they're dead.
Code in Player's Render() function that links the visibility of the player's model to whether or not they're dead.

While testing the sniper rifle, I noticed another oddity - all players, after dying and setting their visuals to be inactive, are meant to be made visible once more when readying up for a new game, and although this works for the host, the clients couldn't see each other! So I fixed that up by making the code that toggles the visibility of the players' models run in the Render(), which allows it to sync up with each player's game.


Since there wasn't enough time to finish everything up and submit before midnight tonight, it looks like we'll have to aim for the 24-hour grace period instead, so expect another blog post tomorrow!

 
 

Recent Posts

See All
Connected Game Development Blog #6 (28/04/2026)

Since I already smoothed out the vast majority of bugs and glitches that were plaguing Mechanical Mayhem over the past couple of days, I decided to try and polish it up a bit before the final submissi

 
 
bottom of page