Macaw is a 2D Game Engine using SDL2. Macaw is written in Go with the ECS architecture pattern.
- Go: https://golang.org/dl/
- SDL2:
You will need to install SDL2 in your machine and the binding for Go.
You can find more information on how to install on your OS here: https://github.com/veandco/go-sdl2
Also, make sure if you are compiling from source code to enable CGO (
export CGO_ENABLED=1
) - Macaw framework:
go get github.com/tubelz/macaw
You can find a working example in the repository https://github.com/tubelz/pong-macaw/ That example covers many functionalities such as:
- Initialization
- Game loop
- Usage of entities, components and systems (ECS)
- Scene
- Camera
- Observers
- Creating a new system
- Fonts
- Input handler
A more complex (and fun) example can be found in https://github.com/tubelz/crazybird !
You can check the crazybird example to see how games can be built with docker.
A simple example, though, involves three steps:
- Pulling the docker image (
docker pull rennomarcus/macaw:latest
) - Running in interactive mode (
docker run -it rennomarcus/macaw:latest
) - Build the application with a simple command
go build .
. Now you have a game built without installing any depency (other than docker)
If you have questions, suggestions, or just want to chat about our Game Engine you can go to use the Discord app and join our server: https://discord.gg/SXQYsdK
If there is a bug you can open an issue here. Your input is fundamental for the project's success. :)
There's always something to be worked on! Don't be afraid to open an issue or submit a PR. Please check the contributing guide for more information!
The code here is under the zlib license. You can read more here