gdc13
TRANSCRIPT
Photon CloudMultiplayer Developer Crash Course
Tobias Schweers
Photon in a Nutshell
• Socket Server and Framework• Realtime, Multiplayer, Cross Platform• 23,000 developers (Indies and AAA)
U4ia (= euphoria)
• Industry Veterans (Dusty Welch, Chris Archer & team)• Free-to-play, AAA, Hardcore, Browser Based Games• „The middleware that gave us the least headache ...“,
Dan MacDonald, Lead Programmer 5
6
7
8
9
10
Photon Unity Networking (PUN)• Unity Networking (UN) is very convenient, simple and
powerful• It is the entry point for most Indies to start Networking
experiments
• BUT it has several major draw backs! UN needs a Master Server to be hosted! P2P leads to NAT/punch-through issues (especially in mobile
networks)! Dropped hosts kill the games and so frustrate players! UN will (probably) never run on the new Unity exports Flash /
Chrome NaCl
PUN Feature CoverageSynchronization2 Position, Rotation, Scale2 Serialization by script2 Buffered Instantiation- Animation
Grouping and Scope- Not supported by server- Events are ignored accordingly
Server Logic2 MasterClient replaces Host(Remark: Photon is just used as „relay“)
RPCs2 From client to client2 By method name2 Receiver selectable2 Buffered
Callbacks2 Player joins, leaves2 Connection states2 Instantiation
Network Simulation2 Lag, Jitter, Loss- Bandwidth throtteling
Additional FeaturesPlatform as a Service (PaaS)+ No server installs with the Cloud+ Transparent load balancing
Properties (Rooms and Players)+ Key-Value collection for custom data (name, etc.)
Runtime Scene GameObjects + Can be instantiated with owner “scene“
Dashboard+ See CCUs, Disconnects etc.
Host Transition+ Remaining players select new MasterClient
Offline Mode+ Same logic for offline gaming