SlideShare a Scribd company logo
1 of 45
Download to read offline
MULTIPLAYER MOBILE
GAMES (UNITY)
Hello!
MY NAME IS NOAM GAT
CTO @ Tacticsoft
We make strategy MMOs
And you are?
1
MULTIPLAYER GAMES
Definition and scope
“A multiplayer game is a game
played by multiple people”
- Captain Obvious
HOWEVER
There are several criteria to
distinguish between them, with
technical consequences.
Local (Single Device)
Badlands
King of the Opera
HOW DO THE PEOPLE PLAY THE SAME GAME?
Network
World of Warcraft
Clash of Clans
Hearthstone
Fifa ?
THIS (TECHNICAL) LECTURE IS ALL ABOUT NETWORKED
▪ Local Multiplayer is awesome
▪ IMO very unexplored territory
▪ But it is technically equivalent
to a single player game
Turn Based
Chess
Hearthstone
HOW OFTEN ARE PEOPLE UPDATED?
Real Time
World of Warcraft
Quake
Fifa
Clash of Clans?
Clients (P2P)
Old games
WHO RUNS THE WORLD?
Servers
New games
WHY DID P2P ARCHITECTURES FALL OUT OF FASHION?
▪ Servers are cheaper
▪ Less connectivity issues (port
forwarding etc)
▪ Easier to prevent cheating
▪ If one of the players has the
authority, it is called a server.
2
MULTIPLAYER CHECKLIST
Building blocks for most
multiplayer games
MULTIPLAYER FLOW
Match
Conclusion
Lobby
LOBBY
▪ Devices don’t know about each
other yet
▪ They come to a central place and
get grouped to each other
▪ Not the most interesting of tasks
▪ Don’t reinvent.
MULTIPLAYER FLOW
Match
Conclusion
Lobby
MATCH
▪ One central entity (Server) is in
charge of the PERSISTENT GAME
STATE
▪ The clients send actions to it,
it notifies everyone of changes
to the world
▪ The server can be one of the
clients.
PERSISTENT GAME STATE?
The compact representation of the
game’s state. (The Model of MVC)
▪ Chess ? Game board
▪ FPS ? Player positions, stats
The clients have to be able to
build their perspective of the game
from it.
SINGLE AUTHORITY FOR EACH OBJECT
Make sure not to have two entities
in charge of the same object
▪ Character owned by client
▪ Projectiled owned by server
▪ Environment simulated separately
Multiple management causes desyncs,
flickers and unnecessary overhead
ACTIONS AND CHANGES
The client has to notify the server
of its actions. It can do so in
several ways:
▪ State updates (I am in X=1,Y=4)
▪ State deltas (I moved up)
▪ Actions (Jump)
The client has to update from the
server. Not always symmetric.
State Based
Robust
Simple
TRADEOFFS
Delta / Action Based
Secure
Compact
Cheap
Game
Conclusion
Lobby
Conclusion
In case of a metagame, server
updates “the bookkeeper” of the
match results.
▪ High scores
▪ Rankings
▪ XP
The bookkeeper is often the lobby.
3
UNITY MULTIPLAYER
Let's build stuff.
Many different possibilities
▪ WWW Class (HTTP requests)
▪ Legacy Unity Networking
▪ UNet (New in Unity 5.1)
▪ Asset Store (Photon, Parse etc)
Many different possibilities
▪ WWW Class (HTTP requests)
▪ Legacy Unity Networking
▪ UNet (New in Unity 5.1)
▪ Asset Store (Photon, Parse etc)
UNet
UNet
Latest in-house evolution of Unity’
s networking efforts.
Lets you select which GameObjects
to synchronize, and how.
UNet (1 of 4)
Create a
NetworkManager.
Select Offline
(Lobby), online
(Match) scenes and
per-client Prefab.
Debugging Lobby
GUI
UNet (2 of 4)
Create a
NetworkIdentity.
Decide who takes
care of this
network-synced
object, and how
data is
transferred.
UNet (3 of 4)
Manage objects.
Enable / disable
components based
on whether the
client controls
this instance of a
player.
UNet (4 of 4, optional)
Manage sync.
Smoothly
transition between
state snapshots
rather than pop
between them.
UNet Video Tutorials
gamertogamedeveloper.com
21 episode long video tutorial of
creating a project with UNet.
Includes source code of final
project!
Legacy Warning
Legacy Unity Networking and UNet
don’t mix! Check documentation to
make sure you are using consistent
components.
Parse
Parse
A “Backend as a Service” owned by
facebook.
Not created just for game
development, but is useful in this
domain.
Parse (1 of 3)
Create objects.
Parse (2 of 3)
Retrieve objects (from the same
client or others).
Parse (3 of 3)
Query objects (from the same
client or others).
Parse
A simpler and slightly less “Unity-
ish” solution.
If you can define your multiplayer
layer as database interactions,
this is be a very simple way to
approach it.
Parse
Very well documented SDK.
Costs money to scale up, but has a
generous free offer that you won’t
pass until you have MANY users.
4
HACKATHON TIPS
Let's build stuff.
AIM FOR THE SUNNY SCENARIO
Robust multiplayer
handling is hard.
Assume everything
with the connection
is fine.
FORGET ABOUT SECURITY / CHEATING
Its OK to give
clients more than
they need to know if
it makes things
easier for you.
For now.
GET THE NETWORKING POC DONE QUICK
Think of the
solution that suits
your game.
Get to a point where
two clients share
data ASAP.
LOVE THY NEIGHBOUR
You will share
similar difficulties
with the other
groups.
Use the power of the
group to solve
things faster.
Thanks!
ANY QUESTIONS?
You can find me at:
@noamgat
noam@tacticsoft.net

More Related Content

What's hot

Endless runner game in unreal engine 4
Endless runner game in unreal engine 4Endless runner game in unreal engine 4
Endless runner game in unreal engine 4
Vasilis Kamakaris
 
Game Project / Working with Unity
Game Project / Working with UnityGame Project / Working with Unity
Game Project / Working with Unity
Petri Lankoski
 

What's hot (19)

Next generation mobile gp us and rendering techniques - niklas smedberg
Next generation mobile gp us and rendering techniques - niklas smedbergNext generation mobile gp us and rendering techniques - niklas smedberg
Next generation mobile gp us and rendering techniques - niklas smedberg
 
Casual and Social Games with Unity
Casual and Social Games with UnityCasual and Social Games with Unity
Casual and Social Games with Unity
 
Making HTML5 Games with Phaser
Making HTML5 Games with PhaserMaking HTML5 Games with Phaser
Making HTML5 Games with Phaser
 
Unreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationUnreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) Presentation
 
Phaser Workshop Internet World 2014
Phaser Workshop Internet World 2014Phaser Workshop Internet World 2014
Phaser Workshop Internet World 2014
 
ECS: Making the Entity Debugger - Unite LA
ECS: Making the Entity Debugger - Unite LAECS: Making the Entity Debugger - Unite LA
ECS: Making the Entity Debugger - Unite LA
 
Introduction to Phaser.js
Introduction to Phaser.jsIntroduction to Phaser.js
Introduction to Phaser.js
 
Cloud Gaming Architectures: From Social to Mobile to MMO
Cloud Gaming Architectures: From Social to Mobile to MMOCloud Gaming Architectures: From Social to Mobile to MMO
Cloud Gaming Architectures: From Social to Mobile to MMO
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard Do
 
【Unite 2017 Tokyo】Unity最適化講座 ~スペシャリストが教えるメモリとCPU使用率の負担最小化テクニック~
【Unite 2017 Tokyo】Unity最適化講座 ~スペシャリストが教えるメモリとCPU使用率の負担最小化テクニック~【Unite 2017 Tokyo】Unity最適化講座 ~スペシャリストが教えるメモリとCPU使用率の負担最小化テクニック~
【Unite 2017 Tokyo】Unity最適化講座 ~スペシャリストが教えるメモリとCPU使用率の負担最小化テクニック~
 
Endless runner game in unreal engine 4
Endless runner game in unreal engine 4Endless runner game in unreal engine 4
Endless runner game in unreal engine 4
 
Game Development with Unity
Game Development with UnityGame Development with Unity
Game Development with Unity
 
Unity 3D VS your team
Unity 3D VS your teamUnity 3D VS your team
Unity 3D VS your team
 
Data Driven Game development
Data Driven Game developmentData Driven Game development
Data Driven Game development
 
Game Project / Working with Unity
Game Project / Working with UnityGame Project / Working with Unity
Game Project / Working with Unity
 
Adobe AIR for mobile games
Adobe AIR for mobile gamesAdobe AIR for mobile games
Adobe AIR for mobile games
 
A preview of Feathers 2.2 and the Feathers SDK
A preview of Feathers 2.2 and the Feathers SDKA preview of Feathers 2.2 and the Feathers SDK
A preview of Feathers 2.2 and the Feathers SDK
 
Alexey Savchenko, Unreal Engine
Alexey Savchenko, Unreal EngineAlexey Savchenko, Unreal Engine
Alexey Savchenko, Unreal Engine
 
Unity 3D, A game engine
Unity 3D, A game engineUnity 3D, A game engine
Unity 3D, A game engine
 

Viewers also liked

Presentation wpf
Presentation wpfPresentation wpf
Presentation wpf
danishrafiq
 

Viewers also liked (20)

Cloud Gaming - A Green Solution to Massive Multiplayer Online Games
Cloud Gaming - A Green Solution to Massive Multiplayer Online Games Cloud Gaming - A Green Solution to Massive Multiplayer Online Games
Cloud Gaming - A Green Solution to Massive Multiplayer Online Games
 
Unity Networking: new possibilities
Unity Networking: new possibilitiesUnity Networking: new possibilities
Unity Networking: new possibilities
 
Server side game_development
Server side game_developmentServer side game_development
Server side game_development
 
GDCMobile08: Creativity Techniques is Game Design
GDCMobile08: Creativity Techniques is Game DesignGDCMobile08: Creativity Techniques is Game Design
GDCMobile08: Creativity Techniques is Game Design
 
38199728 multi-player-tutorial
38199728 multi-player-tutorial38199728 multi-player-tutorial
38199728 multi-player-tutorial
 
Unity networking
Unity networkingUnity networking
Unity networking
 
A cloud gaming system based on user level virtualization and its resource sch...
A cloud gaming system based on user level virtualization and its resource sch...A cloud gaming system based on user level virtualization and its resource sch...
A cloud gaming system based on user level virtualization and its resource sch...
 
QoS in Network Gaming
QoS in Network GamingQoS in Network Gaming
QoS in Network Gaming
 
Photon Server Deep Dive - View from Implmentation of PhotonWire, Multiplayer ...
Photon Server Deep Dive - View from Implmentation of PhotonWire, Multiplayer ...Photon Server Deep Dive - View from Implmentation of PhotonWire, Multiplayer ...
Photon Server Deep Dive - View from Implmentation of PhotonWire, Multiplayer ...
 
Programação de jogos multiplayer com unity 5
Programação de jogos multiplayer com unity 5Programação de jogos multiplayer com unity 5
Programação de jogos multiplayer com unity 5
 
Photon For Unity
Photon For Unity Photon For Unity
Photon For Unity
 
NVIDIA Cloud Gaming
NVIDIA Cloud GamingNVIDIA Cloud Gaming
NVIDIA Cloud Gaming
 
Adaptive Cloud Security: Game-Changing Cloud Security and Compliance Automati...
Adaptive Cloud Security: Game-Changing Cloud Security and Compliance Automati...Adaptive Cloud Security: Game-Changing Cloud Security and Compliance Automati...
Adaptive Cloud Security: Game-Changing Cloud Security and Compliance Automati...
 
GDC 2015 - Low-latency Multiplayer Gaming with AWS
GDC 2015 - Low-latency Multiplayer Gaming with AWS GDC 2015 - Low-latency Multiplayer Gaming with AWS
GDC 2015 - Low-latency Multiplayer Gaming with AWS
 
グラフィック仮想化セミナー - エヌビディアジャパン様
グラフィック仮想化セミナー - エヌビディアジャパン様グラフィック仮想化セミナー - エヌビディアジャパン様
グラフィック仮想化セミナー - エヌビディアジャパン様
 
Japan GPU-Accelerated VDI Community 2016/11/21
Japan GPU-Accelerated VDI Community 2016/11/21Japan GPU-Accelerated VDI Community 2016/11/21
Japan GPU-Accelerated VDI Community 2016/11/21
 
Presentation wpf
Presentation wpfPresentation wpf
Presentation wpf
 
Adobe flash-คู่มือ-สำหรับครู
Adobe flash-คู่มือ-สำหรับครูAdobe flash-คู่มือ-สำหรับครู
Adobe flash-คู่มือ-สำหรับครู
 
Overview Of Chess
Overview Of ChessOverview Of Chess
Overview Of Chess
 
Nvidia grid and vGPU
Nvidia grid and vGPUNvidia grid and vGPU
Nvidia grid and vGPU
 

Similar to Building Multiplayer Games (w/ Unity)

Supersize your production pipe enjmin 2013 v1.1 hd
Supersize your production pipe    enjmin 2013 v1.1 hdSupersize your production pipe    enjmin 2013 v1.1 hd
Supersize your production pipe enjmin 2013 v1.1 hd
slantsixgames
 

Similar to Building Multiplayer Games (w/ Unity) (20)

Supersize your production pipe enjmin 2013 v1.1 hd
Supersize your production pipe    enjmin 2013 v1.1 hdSupersize your production pipe    enjmin 2013 v1.1 hd
Supersize your production pipe enjmin 2013 v1.1 hd
 
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
 
Game Programming - Cloud Development
Game Programming - Cloud DevelopmentGame Programming - Cloud Development
Game Programming - Cloud Development
 
Les 1 ppt
Les 1 pptLes 1 ppt
Les 1 ppt
 
Les 1 ppt
Les 1 pptLes 1 ppt
Les 1 ppt
 
Harlan Beverly Lag The Barrier to innovation gdc austin 2009
Harlan Beverly Lag The Barrier to innovation gdc austin 2009Harlan Beverly Lag The Barrier to innovation gdc austin 2009
Harlan Beverly Lag The Barrier to innovation gdc austin 2009
 
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionistDEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
 
Building fast,scalable game server in node.js
Building fast,scalable game server in node.jsBuilding fast,scalable game server in node.js
Building fast,scalable game server in node.js
 
Harlan beverly gaming levels up networking ieee 10 2009
Harlan beverly gaming levels up networking ieee 10 2009Harlan beverly gaming levels up networking ieee 10 2009
Harlan beverly gaming levels up networking ieee 10 2009
 
Delta Engine @ CeBit 2011
Delta Engine @ CeBit 2011Delta Engine @ CeBit 2011
Delta Engine @ CeBit 2011
 
[KGC 2012] Online Game Server Architecture Case Study Performance and Security
[KGC 2012] Online Game Server Architecture Case Study Performance and Security[KGC 2012] Online Game Server Architecture Case Study Performance and Security
[KGC 2012] Online Game Server Architecture Case Study Performance and Security
 
Casual Engines 2009
Casual Engines 2009Casual Engines 2009
Casual Engines 2009
 
ARISE
ARISEARISE
ARISE
 
Behind the Scenes: Deploying a Low-Latency Multiplayer Game Globally
Behind the Scenes: Deploying a Low-Latency Multiplayer Game GloballyBehind the Scenes: Deploying a Low-Latency Multiplayer Game Globally
Behind the Scenes: Deploying a Low-Latency Multiplayer Game Globally
 
Inside the IT Territory game server / Mark Lokshin (IT Territory)
Inside the IT Territory game server / Mark Lokshin (IT Territory)Inside the IT Territory game server / Mark Lokshin (IT Territory)
Inside the IT Territory game server / Mark Lokshin (IT Territory)
 
Scalability & Big Data challenges in real time multiplayer games
Scalability & Big Data challenges in real time multiplayer gamesScalability & Big Data challenges in real time multiplayer games
Scalability & Big Data challenges in real time multiplayer games
 
Hadean: How We Tackled A Gaming World Record
Hadean: How We Tackled A Gaming World RecordHadean: How We Tackled A Gaming World Record
Hadean: How We Tackled A Gaming World Record
 
Massively Social != Massively Multiplayer
Massively Social != Massively MultiplayerMassively Social != Massively Multiplayer
Massively Social != Massively Multiplayer
 
Sgin2013 scrum accomplished-mmog-sajitvasudevan
Sgin2013 scrum accomplished-mmog-sajitvasudevanSgin2013 scrum accomplished-mmog-sajitvasudevan
Sgin2013 scrum accomplished-mmog-sajitvasudevan
 
Unite2014 Bunny Necropsy - Servers, Syncing Game State, Security and Optimiza...
Unite2014 Bunny Necropsy - Servers, Syncing Game State, Security and Optimiza...Unite2014 Bunny Necropsy - Servers, Syncing Game State, Security and Optimiza...
Unite2014 Bunny Necropsy - Servers, Syncing Game State, Security and Optimiza...
 

Recently uploaded

Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 

Recently uploaded (20)

FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 

Building Multiplayer Games (w/ Unity)