We have recently been working on a game called hackerbots whose server-side component we chose to author in go. We learned quite a few lessons about how to write server-side code in go along the way. A few of the things we will discuss include:
- how to test for (and solve) leaking go routines
- how to use the profiler to uncover issues with your code
- mixing websockets and http for game play and game control
- go concepts that help us separate game state, player updates, and network traffic
- optimizing JSON serialization for minimal traffic while maintaining human readability
- how go got in our way, and what we did to make it less painful
- how to debug and fix 'frozen' server code
We will discuss what it is about go that really helped us write our game, with a focus on sharing stories that stand apart from the typical anecdotal reasons for choosing go.
Come learn how we used the go tooling to keep our game within the constraints of a tiny virtual machine whilst having a blast doing so.