Writing and Debugging a Web-Based Multi-Player Game
summary
Built a web game server in Go that runs a 60 Hz simulation on a headless process, uses WebSockets/WebGL clients, and separates simulation, player management, and network I/O into per-player goroutines communicating over buffered channels. Tools include the Go profiler, json.Marshaler implementations for compact output, and gob binary encoding as an alternative; payloads shrink (example point JSON from ~47 to ~39 bytes), bandwidth roughly halves, and games scale to roughly 16–64 players per instance.
AI-written summary · about
chapters (12)
- 0:00Console to web robot game
- 2:43Concurrency in games
- 3:25Simple robot battle design
- 6:15Game server in Go
- 8:00Simulation vs serialization
- 10:49Player serialization challenges
- 11:57Optimizing spectator payload
- 14:26Bandwidth with float32 and interfaces
- 17:15Go interfaces for encoding
- 20:03Binary encoding with gob
- 21:50Web robot battle demo
- 27:10Q&A on performance
related talks
18mRealtime HTML5 Multiplayer Games with NodeJS
37mBuilding Fast Scalable Game Server in Node.JS (updated)
17mWebRTC: The secret power you didn't know Go has
25mGetting Started with gRPC and JavaScript
29mWebSockets Bring Light at the End of the Tunnel
40mDeploying Node : from localhost to the cloud
52mProduction Ready "Hello, World!"
32mGame server development in node.js
