Simple 2D game library written in Go and based on modern OpenGL.
Gojira2D is licensed under the terms of the MIT License. See LICENSE for details of the usage license granted to you for this code.
- It uses modern OpenGL - Core Profile 4.1
- Super easy setup: create a window and a game loop in less than 10 lines of code
- Shader support: Vertex, Geometry, Fragment
- Input handling:
- Basic support for keyboard and mouse
- Joystick support, including emulation via keyboard
- Basic support for shapes: lines, polylines and [approximated] circles
- Fonts support:
- Bitmap fonts in BMFont format
- Distance field rendering of TTF fonts
- Physics support:
- 2D rigid body physics via Box2D
- R.U.B.E (JSON format) scene loader
- Developed and tested on MacOS
- GLFW as window manager
- MathGL as math library
- Box2D for 2D physics
- B2DJson for loading R.U.B.E scenes
Install Golang and GLFW:
$ brew install go dep glfw
Setup your $GOPATH
and clone the
repository into $GOPATH/src
folder:
$ go get -u maxfish/gojira2d
$ cd $GOPATH/src/maxfish/gojira2d
$ git remote set-url origin git@github.com:maxfish/gojira2d.git
Use dep
to fetch dependencies:
$ dep ensure
Try running some examples:
$ go run examples/quad/main.go
...