Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Break - In Heist Multiplayer Game Blog (Week 1)

Dev Blogs Week 1 (4 March, 2025)

Introduction

Welcome to the first game dev blog for our multiplayer heist game. This game is all about teamwork, stealth, and strategy , where player takes on different roles which are Hacker, Lock Picker, Insider, Group Leader. The goal of the game is to successfully rob a bank without being detected and work in coordination and complete their individual tasks within the given time limit and take the gold/cash out without being detected or triggering a alarm or trap. My goal is to create a smooth multiplayer experience for the players with role-based gameplay, AI security patrols, and dynamic Heist mechanics.

Setting Up Multiplayer with Photon PUN 2

Since this is a multiplayer game I am using Photon PUN to establish a server to connect players with each other. Since I am using Unity Engine I am using PUN 2 asset from Unity asset store

PUN 2 allows players to connect, create and join lobbies, sync game states efficiently

Here’s a breakdown of what I did in my first week 

  1. Connected to Master Server , Created a Loading Scene using PhotonNetwork.ConnectUsingSettings() in the Start()which connects to the master Server when the scene starts and goes to the Lobby Scene, it is the first and the most important step in this project.

Loading Scene

This Scene is the first step to multiplayer game it connects to the Photon Master Server

    2. Created a Lobby Scene, After the Loading Scene which takes some time to connect to Master Server it goes to the next scene which is the Lobby Server in which I gave the player 2 options in the UI whether to Create or Join a Lobby along with a Unity Legacy InputField where the user can input the name of the server to create or join.



  3. After which I synced the Unity Play Mode and Build Mode, which was considerably easy as i didn’t have any playable character i used the UI Text “Welcome Hacker” which was displayed in both Unity Play Mode and Unity Build Mode which meant the sync was successful.


Challenges & Solutions


One of the first challenges was the Lobby Scene in which initially i couldn’t understand the OnCreatedJoin function as I wanted that only 4 players can join the Server no more, no less which required RoomOptions a built in Photon function. I fixed the solution by following a YouTube tutorial and reading more about Unity Multiplayer Photon in a documentation.

Next Steps

For the next Blog I will be working on MySQL and MAMP to store player databases so as to they can Register as well as Login to the game with scores saved, which is written in PHP script for the backhand server to run and store databases across the internet and website securely.

Closing Thoughts

So far, its been fun but challenging journey! . Balancing multiplayer Sync Creating and Joining Server , but i am excited to see it all come together. Stay Tuned for the next update. In the next week i will work on connecting Unity with the mySQL table using UnityWebRequest.

References

  1. (https://assetstore.unity.com/packages/tools/network/pun-2-free-119922) PUN2 from Unity asset store
  2. https://youtu.be/93SkbMpWCGo (Tutorial i followed for creating Lobby and syncing the master and the client).
  3. https://documentation.help/Photon-Unity-Networking-2/ (documentation which had all the information about Photon and Unity)

Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.