Cheesy snake game implemented using GLFW and Go
This was hacked together over a day or so, so there's lots of unused code, but it basically works!
$ go get -u github.com/go-gl/glfw/v3.2/glfw
$ go get -u github.com/go-gl/gl/v2.1/gl
$ go build main.go
$ ./main
Windows requires Golang 1.4+ and a MinGW installation. So far I've only ever built it in 64 bit on Windows 10, so you're on your own if you want to set it up with 32 bit.
Install Go with homebrew, then it should build accordingly.
Requires xorg-dev and libmesa-dev (or similar) packages to compile. It may need similar X11 or Mesa-derived libraries to run, but I've not gotten around to testing this.
-
Arrow keys steer your trusty snake!
-
Esc exits the game.
So far there is no "you lose" screen yet, so the game just stops when you hit an edge or run into yourself. At which point you'll have to hit Esc and start the game over again.
The binary releases are built for Mac OSX and Linux (specifically amd64. Will get to 32 bit release when I'm feelin like it):
If you're not building it, this is how you run the thing you downloaded from the Downloads/Releases section.
$ cd ~/Downloads # Or wherever you have things downloaded.
$ chmod 755 main
$ ./main
Double-click on it!
-
The wonderful folks at go-gl
-
The creators of Go for giving me something to do.