A simple composition-based game engine in Go and Raylib. Roughly inspired by the amazing Kaboom! engine for javascript.
package main
import (
gb "goboom"
)
var game = gb.NewGame(
"Hello World",
600,
800,
true, // debug mode
)
func init() {
game.Reset = func() {} // define any special reset logic
game.LoadTextures("assets/ship.png")
ship := game. NewGameObject("ship", gb.WithPosition(300, 400)).
NewSprite(game.Textures["assets/ship.png"])
game.AddScene("myscene", ship)
game.SetScene("myscene")
}
func main() {
game.Run()
}