Hacker News new | ask | show | jobs
by Sir_Cmpwn 2867 days ago
I've been tinkering with writing a simple game in Golang as well. I don't think it's a good idea to lob in an entire web browser for a game, though. I've been using the go-gl stack:

https://github.com/go-gl

They have a wrapper for GLFW and OpenGL, I've been using GLES2 which has good compatability with everything. You have to be prepared to learn how to write shaders and use OpenGL, though, so it can be a bit intimidating. Here's the (extremely incomplete and very bad) game I have so far:

http://git.sr.ht/~sircmpwn/freefood

1 comments

If you are doing 2d you can also do quite well with just the SDL2 wrapper. That gives you enough to do cross platform sound, input, and putting textures on the screen with alpha blending and bilinear interp. So its enough to make mario/ultima/baldurs gate/ style things.
Personally I find SDL far too limiting. As soon as you want to write even one shader you have to write all of the graphics code yourself, and at that point it's hardly better than GLFW.