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
Backend de jogos multiplayer
Search
Rodrigo Delduca
August 15, 2017
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Backend de jogos multiplayer
Rodrigo Delduca
August 15, 2017
Transcript
24 slides
Backend de jogos multiplayer Rodrigo Delduca (@skhaz) https://skhaz.io https://nullonerror.org https://ultratech.software
PUC PR - 2017
Brace yourself. Sopa de letrinhas is coming!
Formas de comunicação • TCP • UDP • RawSocket •
WebSockets • SocketIO • WebRTC
Arquitetura
Otimizando o tamanho do payload
Otimizando o tamanho do payload payload = { "UpPressed": true,
"downPressed": false, "attackPressed": true } // 76 bytes
Otimizando o tamanho do payload payload = { "u": true,
"d": false, "a": true } // 46 bytes
Escovando os bits
Escovando os bits
Escovando os bits
Escovando os bits
Escovando os bits
Tecnologias • C/C++ • Python • Elixir • Java •
NodeJS • Swift • Erlang • … Ou qualquer outra linguagem que permita abrir uma conexão.
Qual tecnologia é melhor?
Qual tecnologia é melhor? A que você dominar melhor*
Qual tecnologia é melhor? A que você dominar melhor* só
não vale usar Visual Basic :)
E onde hospedar? • Google Cloud • Heroku • Digital
Ocean • Amazon Web Services (AWS) • Scaleway • Rackspace • Azure • IBM Bluemix
Banco de dados • PostgreSQL, MySQL, Oracle e SQLite (relacional)
• MongoDB, CouchBase e RethinkDB (orientado a documento) • Redis, memcached e Cassandra (chave-valor) • Neo4J e ArangoDB (banco de dados de grafos)
Outras alternativas … Que podem ser ideias para hackathon e
gamejams
Exemplo usando Socket.IO
Demo http://bit.ly/pucpr-mmo
• https://davidwalsh.name/websocket • http://blog.soom.la/2016/02/top-10-parse-alternatives-game-backend.html • https://realm.io/docs/realm-object-server/ • https://firebase.google.com/ • http://heroku.com/
• https://www.meteor.com/ • https://phaser.io • https://socket.io/ • https://cloud.google.com/ • http://choongsoo.info/docs/starcraft2.netgames12.pdf • https://blog.heroku.com/introducing_session_affinity
Perguntas?
Muito obrigado :) Scorpion wins Flawless victory Fatality!
More Decks by Rodrigo Delduca
See All by Rodrigo Delduca
Mágica com Qt’s meta-object system
skhaz
1
120
Como criar o seu próprio joystick
skhaz
0
2.3k
Other Decks in Programming
See All in Programming
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1k
Debian JP Projectのサーバー構成
uwabami
1
160
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
400
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
17
9.5k
AIコーディング時代のKotest ユニットテストから APIレベルの仕様固定化テストへ
ooga04
0
320
Getting Started with Vibe Coding
miccheng
0
250
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
490
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
420
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
140
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
200
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
270
はじめてのKubernetesコントリビューション
nasa9084
0
240
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
370
Test your architecture with Archunit
thirion
2
2.5k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Raft: Consensus for Rubyists
vanstee
143
7.9k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
360
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
460
Navigating Team Friction
lara
192
16k
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
Designing Powerful Visuals for Engaging Learning
tmiket
1
660