Github repo @ https://github.com/gophergala/tron

We just wanted to write some heavily concurrent code and discovered this classic real time game. We thought it might be a good idea to try implementing it with Golang. The states of the game are managed using goroutines. Our back-end code introduces 13 select and 23 case statements. We didn't have time to implement a proper sweep line algorithm for finding collisions between lines, but it seems that a naive lookup is fast enough with 4 players. We manage to keep the framerate above 20 fps. The code requires a major cleanup, but we never wrote a game before and had no idea what we are doing! Need to go to sleep now, sorry!

Share this project:
×

Updates