
Learn to build multiplayer games with Unity and Photon, from Pixel Gun 3D clones to mobile FPS, covering rooms, remote player sync, and basic respawn.
Explore Photon for Unity to build scalable multiplayer games with cross-platform support, low latency, and easy to use and scale using Photon Unity Networking (PUN 2).
Explore Photon Unity Networking 2 by loading the demo projects, configuring a Photon app ID, and running Pun Basics tutorials to see two players connect in a shared room.
Learn the multiplayer game development workflow by building a pixel gun 3d clone: log in, join a random room, instantiate players, synchronize health across the network, and shoot to kill.
Create a pixel gun 3D clone in Unity, import Photon Unity Networking 2, copy app id from Photon Cloud, and build the GameLauncherScene to connect to Photon servers.
Connect to Photon servers using the launch manager and a player name user interface to set the nickname, then handle Photon callbacks to verify internet and master connections.
Create a connection status UI and a lobby UI in a Unity Photon PUN 2 project, showing connecting progress and a join or create random room button after connection.
Learn to create and join random rooms in Photon with PUN 2, using JoinRandomRoom, CreateRoom, and callbacks such as OnJoinRandomFailed and OnJoinedRoom, including random room names and room options.
Create a simple multiplayer battlefield scene in Unity by importing prototyping standard assets, arranging environment objects, and instantiating players for battles when joining a room.
Load the game scene automatically when joining a room using PhotonNetwork. Enable automatic scene synchronization and use PhotonNetwork.LoadLevel in OnJoinedRoom to ensure all players load GameScene.
Create a pixel gun multiplayer character in Unity by building a player prefab with body, head, and arms, and place it in Resources for Photon instantiation when joining a room.
Learn to implement a basic first-person movement controller in Unity with MovementController, serialized speed, horizontal and vertical inputs, and Rigidbody.MovePosition in FixedUpdate.
Implement basic fps rotation by mapping mouse input to yaw and pitch with look sensitivity and clamping, enabling Rigidbody rotation and camera look in a Unity multiplayer game.
Import a modern weapon asset, attach it to the multiplayer character via a weapon holder under the camera, and test its movement and rotation in play.
Instantiate players across the network in the same room using PhotonNetwork.Instantiate, with a prefab from Resources, a random spawn position, and a PhotonView to sync data.
Master player networking in Unity with pun 2 by enforcing ownership via photonview, enabling local movement and camera, and synchronizing transform across the network.
Display player names above each avatar by building a world-space PlayerUI using TextMeshPro and binding the text to photonView.Owner.NickName in a setup method.
Build a health bar ui above each player using a background and a fill bar with a left-to-right horizontal fill, then test in the game scene.
Explore hitscan and projectile shooting options in Unity, implement a basic raycast-based shooting mechanism, and add a fire-rate control for testing in a multiplayer setup.
Implement health synchronization using RPCs by visualizing health as a percentage on the health bar and adding a red crosshair for precise aiming in multiplayer.
Implement a dying mechanism in a Photon PUN 2 multiplayer FPS by handling death in TakingDamage, using a PixelGunGameManager singleton to leave rooms and reload GameLauncherScene for respawn.
Build a mobile multiplayer fps with unity and photon, called MobileMultiplayerFPS. Create rooms, list players, and synchronize animations across the network.
Create a new 3D Unity project named MobileMultiplayerFPS, import Photon Unity Networking 2, and set up a Photon app with its appID and game version 0.1 in PhotonServerSettings.
Create a multiplayer lobby in Unity using Photon PUN 2, featuring login, room creation, room listing, and random joins, with map and game type filtering.
Create a NetworkManager to connect to Photon with a player name by clicking login, set PhotonNetwork.LocalPlayer.Nickname, and connect using settings, while tracking status with callbacks and NetworkClientState.
Learn to manage multiplayer UI in Unity with Photon by building an ActivatePanel method to show or hide Login, GameOptions, and CreateRoom panels based on user actions.
Learn to create a Photon room with a name and max players using UI inputs, default naming, and RoomOptions, handling OnCreatedRoom and OnJoinedRoom to activate the inside room panel.
Learn to display existing Photon rooms in a Unity lobby by showing a live room list panel, using RoomListPrefab, and caching RoomInfo in a dictionary for dynamic visualization.
Learn to show existing rooms in a list by caching room data and removing full rooms. Implement joining a room by name and update ui when the room list changes.
Display existing rooms in a list and use the back button to return to the game options panel after leaving the lobby in a Unity Photon PUN 2 setup.
List players in the same room by populating a player list from PhotonNetwork.PlayerList, showing room info and you indicator in the inside room panel, with master client starting the game.
Update and cache the player list in a photon room as players join or leave. Use OnJoinedRoom, OnPlayerEntered, and OnPlayerLeftRoom to adjust players and reflect ownership for the start button.
Learn how to join a random room with PhotonNetwork, and automatically create a new random room with up to 20 players when no room is available.
Import a desert environment from devassets and configure the GameScene with world and lights for a mobile multiplayer FPS. Sync all players' scenes when the room owner starts the game.
Learn to load the game scene for all players in a room with PhotonNetwork.LoadLevel and AutomaticallySyncScene, ensuring the room owner starts the game and scenes stay synchronized.
Import a soldier model from mixamo into unity, extract textures, and set up the SoldierModel with multiple animations. Learn to synchronize these animations for a mobile multiplayer FPS.
Import Easy FPS asset to add animated FPS hands and animations for local players, including idle, walk, run, and reload, and organize them in the player models and animations folder.
Instantiate players in the same room with PhotonNetwork.Instantiate. Use a prefab in Resources, attach photonView, and spawn at random positions so all clients see synchronized players.
Create a generic player prefab and a PlayerSetup script that activates fps hands for the local player and soldiers for remote players using PhotonView, then instantiate with PhotonNetwork.
Add mobile controls to the Unity multiplayer fps by importing a joystick pack and wiring it to the RigidBodyFirstPersonController, using joystick input axis.
Add a mobile rotation feature using RotationTouchField and FixedTouchField to feed touch distance into the look input, tuning sensitivity and dead zone for smooth mobile multiplayer rotation.
Learn to synchronize movement across the network in a Unity multiplayer game using Photon PUN 2, by using Photon Transform View to observe position and enable local controls and UI.
Create a generic animation controller in Unity to drive soldier animations with an IsRunning parameter, enabling instant transitions between walk forward and run forward and preparing for blend trees.
Learn to implement blend trees in Unity to blend walking and running animations by speed, using 2D directional setup with horizontal and vertical parameters and idle, walk, and run states.
Create a generic animation controller for fps hands and soldier, design walk and run blend trees, and synchronize animations across the network with Photon Animator View and an IsSoldier switch.
Learn to implement a basic hitscan shooting system in Unity using raycasting, fire button input, crosshair, hit effects, and multiplayer-ready integration.
Develop a health bar UI and a basic killing mechanism in Unity using Photon PUN 2 RPCs, including a TakeDamage RPC, health handling, and synchronized damage across all players.
Test the killing mechanism by applying 10 damage via TakeDamage RPC to remote players, synchronize hit effects, and trigger death animations with IsDead.
Create a multiplayer racing game in Unity by importing Photon Unity Networking 2, configuring a free PUN app ID, and setting the game version and regions for synchronized play.
Import assets from a Unity package to build a multiplayer racing game in unity using pun 2, including UI, 3d car models, weapons, and ready-to-use lobby and race scenes.
Connect to Photon servers using the player name by building a NetworkManager, handling login and callbacks, and entering the lobby to play in a multiplayer Unity project.
Learn to implement a simple UI navigation system in Unity with Photon multiplayer. ActivatePanel controls to show login, connecting, and game options panels, and handles create room and cancel flows.
Create rooms in Photon by configuring room options and custom properties for game mode like rc or dr using a hashtable, and verify with OnCreatedRoom and OnJoinedRoom callbacks.
Link UI toggles to the network manager to set the game mode and store it as a custom room property gm, using rc and dr for racing and death race.
Join random rooms by game mode using unity and photon PUN 2, automatically creating rooms when needed and displaying the inside-room UI with player counts.
List players in the same room and display live room info and game mode in the user interface, using a player list prefab.
Update and manage the multiplayer player list in a room by handling joins and leaves with Photon callbacks, caching player objects, and refreshing room info.
Implement a player ready mechanism using Photon custom properties (isPlayerReady) to toggle a local ready button, update the UI, and reveal the start game button when all players are ready.
Complete the player ready mechanism with OnPlayerPropertiesUpdated to propagate remote readiness and update the UI, and show the start button only to the room master when all players are ready.
Dynamically adapt the inside room UI and background to the selected game mode, detect race or death race via room properties, and synchronize loading the corresponding scene for all players.
Implement a racing mode player selection ui in Unity with cars (Jeep, Muscle, sports car), next and back navigation, and ActivatePlayer to display the selected car, wrapping at ends.
learn to instantiate players in a racing game based on the selected avatar, using photon custom properties and a prefab array to spawn at correct start positions.
Create a CarMovement script in Unity to move racing cars in multiplayer using a rigidbody, thrust, rotation torque, controlled by W A S D keys.
Set up local versus remote players with the PlayerSetup script to enable only the local car movement and camera, and synchronize movement via PhotonView and observed components.
Synchronize a race countdown across all players using Photon RPCs, master client control, and a time countdown UI, while disabling movement until the race starts.
Implement a lap controller in Unity to track lap triggers, deactivate completed laps on trigger enter, finish the race with the finish trigger, and raise events to share results.
Raise race results for all players using Photon raise events, sending nickname and finish order with a unique event code and room cache options.
Display race results in the UI using raise events, showing top order texts that update with finish order and indicate you when the local player finishes.
Display player names on top of cars in a multiplayer racing mode by implementing a PlayerUI with a world-space canvas and TextMeshPro, synchronized with PhotonView owner nicknames.
Learn to use scriptable objects to populate the death race and racing players, including weapon data and UI imagery, enabling dynamic player selection in the lobby.
Explore dynamic player selection using scriptable objects to load death race and racing players into the UI, driving names, sprites, and weapon data based on the selected game mode.
Instantiate death race players in the death race scene and synchronize their movement across the network using photon, game manager, and player prefabs chosen by player selection number.
Implement a basic shooting mechanism in death race mode by firing machine gun bullets, using a bullet prefab, fire position, and bullet script to apply velocity and destroy on impact.
Implement fire rate in the shooting system and enable rocket launcher as a weapon in death race mode. Leverage scriptable objects to set fire rate and bullet speed.
Implement laser gun shooting in the death race game mode using a line renderer and raycasting from the camera, with coroutines to disable the laser after 0.3 seconds.
Synchronize shooting across the death race network using photon RPCs and photonView, calling Fire remotely with RpcTarget.All while ensuring only the local player can input.
Implement a death race killing mechanism in a Unity Photon multiplayer setup by updating health with TakeDamage and DoDamage, using RPC calls for bullets and laser hits updating health bar.
Implement a death race respawn mechanism by showing a death panel countdown, disabling player movement and visuals on death, and respawning at a random position with health restored via RPC.
Implement the quit match mechanism in a death race game mode using photon networking. Leave the room with PhotonNetwork.LeaveRoom, handle the OnLeftRoom callback via MonobehaviourPunCallbacks, and load the LobbyScene.
Have you ever wanted to build your own multiplayer games that hit the stores like Pixel GUN 3D, Golf Clash and ShadowGun Legends? Yeah, you've come to the right place!
Because all these successful games are built using Photon which is a multiplayer game engine trusted by hundred thousands of developers around the globe!
In this course, you will learn the basics to create your own multiplayer games! And in every section, we will build a multiplayer game from scratch! So, you will learn by doing in every project...
In the first section, we will build Pixel Gun 3D Clone project from scratch with Photon Unity Networking 2 (PUN2).
It will be your first multiplayer game. By building this game, you will learn lots of things:
Creating and joining a random rooms with Photon.
Instantiating remote players in the same room.
Synchronizing Player movement and player health across the network.
In the second section, we will build a Mobile Multiplayer FPS Game from scratch with Photon Unity Networking 2 (PUN2).
In this section, you will learn more advanced stuff in multiplayer games.
How to create rooms by name and max.players.
How to list the existing rooms.
How to list the players in the room.
How to synchronize player animations across the network.
First Person Shooter basics like FPS Hands and 3D player models.
Mobile Controllers
Basic re-spawning mechanism after the player got killed!
In the third section, we will build Multiplayer Racing Game from scratch with Photon Unity Networking 2 (PUN2).
There will be more and more advanced stuff and you will have the opportunity to practice what you learned.
How to work with Scriptable Objects
How to sync Projectile Shooting over the network
Character Selection
Game Mode Selection
Raise Events
Player Ready Mechanism
And more..
So, come and join me on this Multiplayer Game Development Journey!
Lets build together!
-Tevfik