ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Syncing Success
Managing Online/Offline Game
States Across Multiple Devices
Dave Geurts and Colter Haycock
Software Engineers
Smart Bomb Interactive
GDC Next 2013 - Synching Game States Across Multiple Devices
GDC Next 2013 - Synching Game States Across Multiple Devices
Goals: Create mobile game that¡­
? Supports local only mode
? Allows play on multiple devices
? Seamlessly supports online and offline play
? Is non-intrusive when switching devices
? Requires minimal server logic
Our Recipe
1) Serialized hashed game state
2) Security
3) Server with volatile caching and persistent
storage
4) Save state system for online and offline
play
1) Hashed Game State
¡ñ Serialization - Google Protocol Buffers
Pros
o Less Server Code
GDC Next 2013 - Synching Game States Across Multiple Devices
1) Hashed Game State: Ingredients
¡ñ Serialization - Google Protocol Buffers
Pros
o Less Server Code
o Fewer Database Schemas to Manage
GDC Next 2013 - Synching Game States Across Multiple Devices
1) Hashed Game State: Ingredients
¡ñ Serialization - Google Protocol Buffers
Pros
o Less Server Code
o Fewer Database Schemas to Manage
o Obfuscation
GDC Next 2013 - Synching Game States Across Multiple Devices
1) Hashed Game State: Ingredients
¡ñ Serialization - Google Protocol Buffers
Pros
o Less Server Code
o Fewer Database Schemas to Manage
o Obfuscation
Cons
o Can be difficult for debugging
o Will need an External source for Metrics/Analytics
¡ñ Game State versioning
GDC Next 2013 - Synching Game States Across Multiple Devices
1) Hashed Game State: Ingredients
¡ñ Serialization - Google Protocol Buffers
Pros
o Less Server Code
o Fewer Database Schemas to Manage
o Obfuscation
Cons
o Can be difficult for debugging
o Will need an External source for Metrics/Analytics
¡ñ Game State versioning
¡ñ Storage friendly character sets
2) Security
Encryption of Game State
¡ñ Prevent share of save files
¡ñ Client needs to be able to decrypt
without talking to server
¡ñ Don¡¯t leave keys/salt in plain text
Server Authentication
¡ñ Confirming identity is important!
¡ñ Some systems **cough** Game Center **cough** don¡¯t
support server authentication
TAKEAWAY: If someone smart wants to hack your game,
they will!
3) Server w/ Volatile Caching
and Persistent Storage
Application language that can
easily load balance
App server needs to be lean! Simple
logic to allow easy scaling
Pick a database that will shard out
of the box
Cache layer to let databases breathe!
4) Online and Offline Play
Problem
How do you allow play on multiple devices
while supporting online and offline modes?
Houston, We Have a Problem
4) Online / Offline Formula
¡ñ On login, client sends game state + UDID
¡ñ Server responds with game state
+ UDID of last save it has
Client Rules
¡ñ Server UDID == my UDID: use local
¡ñ Server UDID != my UDID:
¡ñ If last save on this device was ONLINE:
use server state
¡ñ If last save on this device was OFFLINE:
ask user
Login
State: BA
A
Save
Online
Login Save
Online
A
Login
B
Save
Online
Login
State: BA
A
Save
Online
Login Save
Offline
A
Login
B
Save
Online
Save
Online
Login
State: B
A
Save
Online
Login Save
Offline
A
Login
Save
Online
A
A
Login
Improvement: Merging
4) Same Time Play
Problem: playing on same account on multiple
devices at the same time
Potential Solutions
Don¡¯t Allow Stomping Stomp + Notify
4) Same Time Play
Solution 1: Don¡¯t Allow
¡ñ Client sends heartbeat to server
¡ñ Client sends ¡°I¡¯m done¡± on pause/quit
¡ñ Server doesn¡¯t allow second device to play
Pro
1. No stomping
Cons
1. Requires server and client logic
2. Must ping servers frequently
4) Same Time Play
Solution 2: Stomping
¡ñ Client gets game state from server on login
¡ñ Whoever saves last (closes app) wins
Pro
1. No added server or client code
Con
1. Stomping SUCKS
Users won¡¯t always realize they ¡°stomped¡± their
data and might think it¡¯s a bug if they ¡°lost¡±
data
4) Same Time Play
Solution 3: Stomping w/ Notifications
¡ñ Client gets game state from server on login
¡ñ Whoever saves last (closes app) wins
¡ñ Notify users when stomping is detected
Pros
1. Users can keep playing
2. Notified if a stomp occurred
Cons
1. Stomping still SUCKS
2. Requires extra server/client code
Hindsight Is Wonderful
¡ñ People barely ever QUIT your app. Almost
all ¡°closes¡± are really just pauses
¡ñ Don¡¯t assume your target
audience¡¯s hardware!
¡ñ Do research about silly reasons
Apple has rejected apps!
Server Tools
Scaling Tools
Client Tools
Contact Information
Dave Geurts
daveg@smartbombinteractive.com
@sims11tz
Colter Haycock
colter@smartbombinteractive.com
@blindgoatia
Questions?

More Related Content

Similar to GDC Next 2013 - Synching Game States Across Multiple Devices (20)

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...
David Geurts
?
Orleans gdc2019
Orleans gdc2019Orleans gdc2019
Orleans gdc2019
Crystin Cox
?
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
Yan Cui
?
go-man API
go-man APIgo-man API
go-man API
Rob Baines
?
Developing great games for Windows 8 by Lorenzo Barbieri
Developing great games for Windows 8 by Lorenzo BarbieriDeveloping great games for Windows 8 by Lorenzo Barbieri
Developing great games for Windows 8 by Lorenzo Barbieri
Codemotion
?
All In - Halves Presentation
All In - Halves PresentationAll In - Halves Presentation
All In - Halves Presentation
freddiesulit
?
Unit 20 - Game Platforms
Unit 20 - Game PlatformsUnit 20 - Game Platforms
Unit 20 - Game Platforms
Gulshan Golechha
?
Unit 20 - Game Platforms
Unit 20 - Game PlatformsUnit 20 - Game Platforms
Unit 20 - Game Platforms
Gulshan Golechha
?
98 374 Lesson 02-slides
98 374 Lesson 02-slides98 374 Lesson 02-slides
98 374 Lesson 02-slides
Tracie King
?
Gameathon UK Windows 8 Lecture
Gameathon UK  Windows 8 Lecture Gameathon UK  Windows 8 Lecture
Gameathon UK Windows 8 Lecture
Lee Stott
?
Dedicated Game Servers
Dedicated Game ServersDedicated Game Servers
Dedicated Game Servers
webhostingguy
?
Artem Petrov "Preparing for distribution"
Artem Petrov "Preparing for distribution"Artem Petrov "Preparing for distribution"
Artem Petrov "Preparing for distribution"
Lviv Startup Club
?
Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience
Docker, Inc.
?
Mux loves Clickhouse. By Adam Brown, Mux founder
Mux loves Clickhouse. By Adam Brown, Mux founderMux loves Clickhouse. By Adam Brown, Mux founder
Mux loves Clickhouse. By Adam Brown, Mux founder
Altinity Ltd
?
MY SKILLS
MY SKILLSMY SKILLS
MY SKILLS
samuel wilson
?
Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1 Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1
Luis Grangeia
?
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One StoryBlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Security Conference
?
Fighting online game cheating with cryptography
Fighting online game cheating with cryptographyFighting online game cheating with cryptography
Fighting online game cheating with cryptography
Steven Davis
?
Gaming VPN
Gaming VPNGaming VPN
Gaming VPN
Raheel Umair
?
When the internet bleeded : RootConf 2014
When the internet bleeded : RootConf 2014When the internet bleeded : RootConf 2014
When the internet bleeded : RootConf 2014
Anant Shrivastava
?
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...
David Geurts
?
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
Yan Cui
?
Developing great games for Windows 8 by Lorenzo Barbieri
Developing great games for Windows 8 by Lorenzo BarbieriDeveloping great games for Windows 8 by Lorenzo Barbieri
Developing great games for Windows 8 by Lorenzo Barbieri
Codemotion
?
All In - Halves Presentation
All In - Halves PresentationAll In - Halves Presentation
All In - Halves Presentation
freddiesulit
?
98 374 Lesson 02-slides
98 374 Lesson 02-slides98 374 Lesson 02-slides
98 374 Lesson 02-slides
Tracie King
?
Gameathon UK Windows 8 Lecture
Gameathon UK  Windows 8 Lecture Gameathon UK  Windows 8 Lecture
Gameathon UK Windows 8 Lecture
Lee Stott
?
Artem Petrov "Preparing for distribution"
Artem Petrov "Preparing for distribution"Artem Petrov "Preparing for distribution"
Artem Petrov "Preparing for distribution"
Lviv Startup Club
?
Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience
Docker, Inc.
?
Mux loves Clickhouse. By Adam Brown, Mux founder
Mux loves Clickhouse. By Adam Brown, Mux founderMux loves Clickhouse. By Adam Brown, Mux founder
Mux loves Clickhouse. By Adam Brown, Mux founder
Altinity Ltd
?
Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1 Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1
Luis Grangeia
?
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One StoryBlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Security Conference
?
Fighting online game cheating with cryptography
Fighting online game cheating with cryptographyFighting online game cheating with cryptography
Fighting online game cheating with cryptography
Steven Davis
?
When the internet bleeded : RootConf 2014
When the internet bleeded : RootConf 2014When the internet bleeded : RootConf 2014
When the internet bleeded : RootConf 2014
Anant Shrivastava
?

Recently uploaded (20)

Computational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the WorldComputational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the World
HusseinMalikMammadli
?
L01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardnessL01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardness
RostislavDaniel
?
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraReplacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
ScyllaDB
?
Unlock AI Creativity: Image Generation with DALL¡¤E
Unlock AI Creativity: Image Generation with DALL¡¤EUnlock AI Creativity: Image Generation with DALL¡¤E
Unlock AI Creativity: Image Generation with DALL¡¤E
Expeed Software
?
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-StoryRevolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
ssuser52ad5e
?
MIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND Revenue Release Quarter 4 2024 - Finacial PresentationMIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND CTI
?
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
ScyllaDB
?
Unlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & KeylockUnlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
?
UiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilitiesUiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilities
DianaGray10
?
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
Tsuyoshi Hirayama
?
Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025
kherorpacca00126
?
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIATHE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
Srivaanchi Nathan
?
Transform Your Future with Front-End Development Training
Transform Your Future with Front-End Development TrainingTransform Your Future with Front-End Development Training
Transform Your Future with Front-End Development Training
Vtechlabs
?
Fl studio crack version 12.9 Free Download
Fl studio crack version 12.9 Free DownloadFl studio crack version 12.9 Free Download
Fl studio crack version 12.9 Free Download
kherorpacca127
?
A Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin EngineeringA Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin Engineering
Daniel Lehner
?
World Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a CrossroadsWorld Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a Crossroads
Joshua Randall
?
Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025
maharajput103
?
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
kherorpacca127
?
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOTSMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
TanmaiArni
?
Field Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci ResearchField Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci Research
Vipin Mishra
?
Computational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the WorldComputational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the World
HusseinMalikMammadli
?
L01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardnessL01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardness
RostislavDaniel
?
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraReplacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
ScyllaDB
?
Unlock AI Creativity: Image Generation with DALL¡¤E
Unlock AI Creativity: Image Generation with DALL¡¤EUnlock AI Creativity: Image Generation with DALL¡¤E
Unlock AI Creativity: Image Generation with DALL¡¤E
Expeed Software
?
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-StoryRevolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
ssuser52ad5e
?
MIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND Revenue Release Quarter 4 2024 - Finacial PresentationMIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND CTI
?
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
ScyllaDB
?
Unlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & KeylockUnlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
?
UiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilitiesUiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilities
DianaGray10
?
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
Tsuyoshi Hirayama
?
Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025
kherorpacca00126
?
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIATHE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
Srivaanchi Nathan
?
Transform Your Future with Front-End Development Training
Transform Your Future with Front-End Development TrainingTransform Your Future with Front-End Development Training
Transform Your Future with Front-End Development Training
Vtechlabs
?
Fl studio crack version 12.9 Free Download
Fl studio crack version 12.9 Free DownloadFl studio crack version 12.9 Free Download
Fl studio crack version 12.9 Free Download
kherorpacca127
?
A Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin EngineeringA Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin Engineering
Daniel Lehner
?
World Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a CrossroadsWorld Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a Crossroads
Joshua Randall
?
Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025Wondershare Dr.Fone Crack Free Download 2025
Wondershare Dr.Fone Crack Free Download 2025
maharajput103
?
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
kherorpacca127
?
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOTSMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
TanmaiArni
?
Field Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci ResearchField Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci Research
Vipin Mishra
?

GDC Next 2013 - Synching Game States Across Multiple Devices

  • 1. Syncing Success Managing Online/Offline Game States Across Multiple Devices Dave Geurts and Colter Haycock Software Engineers Smart Bomb Interactive
  • 4. Goals: Create mobile game that¡­ ? Supports local only mode ? Allows play on multiple devices ? Seamlessly supports online and offline play ? Is non-intrusive when switching devices ? Requires minimal server logic
  • 5. Our Recipe 1) Serialized hashed game state 2) Security 3) Server with volatile caching and persistent storage 4) Save state system for online and offline play
  • 6. 1) Hashed Game State ¡ñ Serialization - Google Protocol Buffers Pros o Less Server Code
  • 8. 1) Hashed Game State: Ingredients ¡ñ Serialization - Google Protocol Buffers Pros o Less Server Code o Fewer Database Schemas to Manage
  • 10. 1) Hashed Game State: Ingredients ¡ñ Serialization - Google Protocol Buffers Pros o Less Server Code o Fewer Database Schemas to Manage o Obfuscation
  • 12. 1) Hashed Game State: Ingredients ¡ñ Serialization - Google Protocol Buffers Pros o Less Server Code o Fewer Database Schemas to Manage o Obfuscation Cons o Can be difficult for debugging o Will need an External source for Metrics/Analytics ¡ñ Game State versioning
  • 14. 1) Hashed Game State: Ingredients ¡ñ Serialization - Google Protocol Buffers Pros o Less Server Code o Fewer Database Schemas to Manage o Obfuscation Cons o Can be difficult for debugging o Will need an External source for Metrics/Analytics ¡ñ Game State versioning ¡ñ Storage friendly character sets
  • 15. 2) Security Encryption of Game State ¡ñ Prevent share of save files ¡ñ Client needs to be able to decrypt without talking to server ¡ñ Don¡¯t leave keys/salt in plain text Server Authentication ¡ñ Confirming identity is important! ¡ñ Some systems **cough** Game Center **cough** don¡¯t support server authentication TAKEAWAY: If someone smart wants to hack your game, they will!
  • 16. 3) Server w/ Volatile Caching and Persistent Storage Application language that can easily load balance App server needs to be lean! Simple logic to allow easy scaling Pick a database that will shard out of the box Cache layer to let databases breathe!
  • 17. 4) Online and Offline Play Problem How do you allow play on multiple devices while supporting online and offline modes?
  • 18. Houston, We Have a Problem
  • 19. 4) Online / Offline Formula ¡ñ On login, client sends game state + UDID ¡ñ Server responds with game state + UDID of last save it has Client Rules ¡ñ Server UDID == my UDID: use local ¡ñ Server UDID != my UDID: ¡ñ If last save on this device was ONLINE: use server state ¡ñ If last save on this device was OFFLINE: ask user
  • 24. 4) Same Time Play Problem: playing on same account on multiple devices at the same time Potential Solutions Don¡¯t Allow Stomping Stomp + Notify
  • 25. 4) Same Time Play Solution 1: Don¡¯t Allow ¡ñ Client sends heartbeat to server ¡ñ Client sends ¡°I¡¯m done¡± on pause/quit ¡ñ Server doesn¡¯t allow second device to play Pro 1. No stomping Cons 1. Requires server and client logic 2. Must ping servers frequently
  • 26. 4) Same Time Play Solution 2: Stomping ¡ñ Client gets game state from server on login ¡ñ Whoever saves last (closes app) wins Pro 1. No added server or client code Con 1. Stomping SUCKS Users won¡¯t always realize they ¡°stomped¡± their data and might think it¡¯s a bug if they ¡°lost¡± data
  • 27. 4) Same Time Play Solution 3: Stomping w/ Notifications ¡ñ Client gets game state from server on login ¡ñ Whoever saves last (closes app) wins ¡ñ Notify users when stomping is detected Pros 1. Users can keep playing 2. Notified if a stomp occurred Cons 1. Stomping still SUCKS 2. Requires extra server/client code
  • 28. Hindsight Is Wonderful ¡ñ People barely ever QUIT your app. Almost all ¡°closes¡± are really just pauses ¡ñ Don¡¯t assume your target audience¡¯s hardware! ¡ñ Do research about silly reasons Apple has rejected apps!
  • 30. Contact Information Dave Geurts daveg@smartbombinteractive.com @sims11tz Colter Haycock colter@smartbombinteractive.com @blindgoatia Questions?