Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Game backend development
Search
ymori
March 14, 2018
Technology
21
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Game backend development
ymori
March 14, 2018
More Decks by ymori
See All by ymori
DeNA_DevOps_Days_Opsworks_Presentation.pptx.pdf
ymorired
0
59
Other Decks in Technology
See All in Technology
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
340
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
130
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
920
遠藤な_めぐろLT #38 「社内のAI活用推進」@麻布台_20261009
endonanana
0
130
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
260
会社説明資料
persolserverworks
0
9.8k
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
190
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
280
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
150
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
590
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
190
AI時代のPRレビューにどう向き合うか?
kairim0
1
240
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Thoughts on Productivity
jonyablonski
76
5.4k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Are puppies a ranking factor?
jonoalderson
2
4.1k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The Curse of the Amulet
leimatthew05
3
16k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Transcript
Game server development BANDAI NAMCO Studios Vancouver Senior DevOps Engineer
Yuichiro Mori
Topics to cover: - Basic components of game backend -
How to scale backend - Protection against cheats
Basic components of backend
Game feature that require backend - Saving progress - Leaderboard
- Chat - In game social graph - Features that uses in game social graph (Guild, Trading) - etc..
What tech stack to use? - All we need is
CRUD against *centralized* server - Create - Read - Update - Delete
What tech stack to use? - What Protocol to use?
- HTTP(S)? - TCP? - UDP?
What tech stack to use? - HTTP(S) - Pro: -
Huge library base - Huge infrastructure support - PKI built in (=Secure) - Con: - Well know (= easy to hack)
What tech stack to use? - TCP - Pro: -
Highly customizable - Con: - Potentially insecure
What tech stack to use? - UDP - Pro: -
Highly customizable - Faster than TCP - Con: - No data ordering - No data correction
How to scale backend
Game backend version 1
Game backend version 1
Game backend version 2
Game backend version 2
Game backend version 3
Game backend version 3
Game backend version 4
Game backend version 4
Game backend version 5
And it continues.. Basic concept of scaling is simply “Divide
and conquer”
And beyond.. - Horizontal sharding - Vertical sharding - Micro
services
Horizontal sharding
Vertical sharding
Micro services
And beyond.. Example of dividing game backend features: - Authentication
- Inventory (Shop / Currency / Items) - Social feature (Including Leaderboard) - Push notification - Chat
Case study: team battle Basic concept of scaling is simply
“Divide and conquer”
Designer: Hey, don’t you think team vs team would be
fun? Like 100 players vs 100 players
???
100 users updating single record VS Distributing update to scale
Simple solution: Queue
None
Protection against cheats
Backend related cheats - Repeat requests - Concurrent request -
Modified request - Validation by simulation
Repeat requests - sample code app.post(‘/mission_end’, function (req, res) {
const missionId = req.missionId; // NO VALIDATION! RewardService.grantMissionClearReward(missionId); res.send(‘ok’) });
Repeat requests Users peek the requests by using PC proxy
Well known products: - Charles proxy - Burp proxy
Charles proxy example
Repeat requests - sample code app.post(‘/mission_end’, function (req, res) {
const missionId = req.missionId; // NO VALIDATION! RewardService.grantMissionClearReward(missionId); res.send(‘ok’) });
Repeat requests - FIXED! app.post(‘/mission_end’, function (req, res) { const
missionId = req.missionId; If (MissionService.missionRewardLeft(missionId)) { RewardService.grantMissionClearReward(missionId); MissionService.setMissionRewardFlag(missionId); } res.send(‘ok’) });
…really?
Concurrent request app.post(‘/mission_end’, function (req, res) { const missionId =
req.missionId; If (MissionService.missionRewardLeft(missionId)) { RewardService.grantMissionClearReward(missionId); MissionService.setMissionRewardFlag(missionId); } res.send(‘ok’) });
app.post(‘/mission_end’, function (req, res) { const missionId = req.missionId; If
(MissionService.missionRewardLeft(missionId)) { RewardService.grantMissionClearReward(missionId); MissionService.setMissionRewardFlag(missionId); } res.send(‘ok’) }); Concurrent request 5ISPXNVMUJQMFSFRVFTUTCFGPSFqBHHFUT NPEJpFE
Concurrent request - FIXED! app.post(‘/mission_end’, function (req, res) { const
missionId = req.missionId; const userId = req.session.userId; const lockId = DataBaseService.lock(userId); If (MissionService.missionRewardLeft(missionId)) { RewardService.grantMissionClearReward(missionId); MissionService.setMissionRewardFlag(missionId); } DataBaseService.unlock(lockId); res.send(‘ok’) });
But, what if can’t validate?
Modified request - app.post(‘/mission_end’, function (req, res) { const missionId
= req.missionId; const score = req.missionScore; const userId = req.session.userId; const lockId = DataBaseService.lock(userId); RewardService.grantScoreBasedReward(userId, missionId, score); DataBaseService.unlock(lockId); res.send(‘ok’) });
Modified request -
Modified request - FIXED! app.post(‘/mission_end’, function (req, res) { const
missionId = req.missionId; const score = req.missionScore; if (sha256(`${score}_${SERVER_SECRET}`) !== req.signature) { return res.send(“Request tampered!”) } const userId = req.session.userId; const lockId = DataBaseService.lock(userId); RewardService.grantScoreBasedReward(userId, missionId, score); DataBaseService.unlock(lockId); res.send(‘ok’) });
Modified request - FIXED!
But, what if user opens up app, and find secret
key?
Validation by simulation app.post(‘/mission_end’, function (req, res) { const missionId
= req.missionId; const playInputSequence = req.playInputSequence; const simscore = Simulation.simulateGamePlay(playInputSequence); if (simscore != score) { return res.send(“Request tampered!”) } const userId = req.session.userId; const lockId = DataBaseService.lock(userId); RewardService.grantScoreBasedReward(userId, missionId, score); DataBaseService.unlock(lockId); res.send(‘ok’) });
Validation by simulation
Pros: - Really strong against cheat Cons: - Really hard
to implement. Really. Validation by simulation
Build a scalable, secure backend!