Available2D
A fixed-step loop, input actions, sprites, tilemaps, scenes, physics, lighting and sound, drawn at 60 fps or the display’s refresh rate.
game is the 2D and 3D game layer for NSGo: a fixed-step loop, input actions, sprites, glTF rendering, a visual scene editor and plain-text YAML formats. Your game draws into one NSGo view; its HUD and menus stay native.
go run github.com/nsgo-dev/game/cmd/game@latest new mygameConsoles (Switch, PlayStation, Xbox) are out of scope: their SDKs are under NDA and need C toolchains, and this project is Go only.
The examples run on desktop, mobile and the web, with their source in the repository.
Match-3 puzzleSlideGemA touch-first 6×6 sliding match-3 with zero external asset files.Field Medic · A small game that ships its own scene editor and editor plugin.Star Catcher · The tutorial: nine chapters from an empty project to a shipped game.
A game draws into one NSGo view: a Canvas, a pixel buffer or a shader. The loop, sprite batches and tilemaps all work around it.
Scores, pause menus and settings are ordinary NSGo views on top of the game, with native text, accessibility and input methods.
It uses only NSGo’s public API, so an app that does not import it links none of it, and every package imports on its own.

The loop, input actions, sound and scene switching are shared by both 2D and 3D, so you can mix scenes freely without rewriting your game.
AvailableA fixed-step loop, input actions, sprites, tilemaps, scenes, physics, lighting and sound, drawn at 60 fps or the display’s refresh rate.
Meshes, cameras, PBR lighting, skeletal animation, 3D physics and glTF models on NSGo’s GPU view, with models imported from Blender.
Examples · Lantern 3DA game is an NSGo component. It binds its actions once, runs a game.Loop on its scope, steps the actions each fixed update and redraws a Canvas from Draw. This is Cave Run’s skeleton, cut down to one sprite.
import (
"time"
"github.com/nsgo-dev/game"
"github.com/nsgo-dev/game/pkg/input"
"github.com/nsgo-dev/game/pkg/sprite"
"github.com/nsgo-dev/nsgo/core"
"github.com/nsgo-dev/nsgo/gamepad"
)
func Game(cx *core.Scope) core.Node {
atlas, _ := sprite.LoadAtlas(core.Src("asset:sprites.png"), spritesJSON)
hero := sprite.NewSprite(atlas.Frames["hero_idle_0"])
batch := &sprite.Batch{Atlas: atlas, Sprites: []*sprite.Sprite{&hero}}
actions := input.NewActions()
actions.Bind("left", input.Key("a"), input.GamepadButton(gamepad.ButtonDPadLeft))
actions.Bind("right", input.Key("d"), input.GamepadButton(gamepad.ButtonDPadRight))
actions.BindAxis("move", "left", "right")
actions.WatchKeys(cx)
frame := core.NewSignal(cx, 0)
loop := &game.Loop{
Rate: 60,
Update: func(dt time.Duration) {
actions.Step()
hero.X += float32(actions.Axis("move")) * 98 * float32(dt.Seconds())
},
Draw: func(alpha float64) { frame.Update(func(n int) int { return n + 1 }) },
}
loop.Run(cx)
return core.Canvas{
Draw: func(d *core.Drawing, _ core.Size) { frame.Get(); batch.Draw(d) },
}
}Every scene, prefab, material, animation and data table is versioned YAML that humans and coding agents can read, diff and edit cleanly.
Launch game editor for a live viewport, hierarchy, inspector, transform gizmos and asset browser — or extend it with custom Go plugins.
No opaque binary scenes. Every format carries a version, rejects unknown fields, ships a JSON Schema and round-trips cleanly in Git.
Scaffold platformers, RPGs, roguelikes, 3D action, FPS or racing games with game new -template, and inspect live scenes via MCP and Agent Skills.
From sprites to dedicated servers, every package has a guide and is marked stable or experimental.
go run github.com/nsgo-dev/game/cmd/game@latest new mygamecd mygame && go tool nsgo devgo tool nsgo dev -target webEvery package is documented and marked stable or experimental in the API stability policy. Start from a template or explore games built with NSGo Game.