GoP is a 2D platformer built in Go with Ebiten v2. The repository includes both:
- a playable game runtime
- a full level editor with in-editor playtesting
Levels are stored in Tiled-compatible JSON and loaded from embedded assets.
- Go
1.24+ - A desktop environment that supports Ebiten
go run ./cmd/gamego run ./cmd/editor# Game
make build
# or
go build -o bin/game ./cmd/game
# Editor
make build-editor
# or
go build -o bin/editor ./cmd/editor# Tests
go test ./...
# or
make test
# Format
gofmt -w .
# or
make fmt
# Dependency cleanup
go mod tidy
# or
make tidy
# Static checks
go vet ./...# Generate test sprite sheet
go run ./cmd/gensheet
# Generate tileset
go run ./cmd/gentiles
# Verify level object parsing
go run ./cmd/verify_objectscmd/ # Entrypoints (game, editor, tooling)
internal/
app/ # App loop and scene lifecycle
scenes/sandbox/ # Main game scene
entities/ # Gameplay entities (platforms, switches, doors, etc.)
physics/ # Collision and movement logic
world/ # Tilemap loading/rendering and object parsing
camera/ # Camera behavior (deadzone/smoothing)
gfx/ # Sprite and animation helpers
gameplay/ # Spawn/state orchestration
input/ # Input abstractions
assets/ # Embedded asset access
editor/ # Level editor implementation
game/ # Game tuning parameters
time/ # Fixed timestep utilities
assets/ # Source art and level JSON
docs/ # Design and architecture docs
The editor supports painting/erasing/fill/select/object placement, undo/redo, validation, and playtest mode.
- Press
Pin the editor to enter playtest. - Press
Escapeto return from playtest to editing. - Press
Rduring playtest to restart.
Tile Mode
Collision Mode
Playtest Mode
- Scene-based runtime: scenes implement update/fixed-update/draw/layout lifecycle.
- Fixed timestep physics: simulation runs at a stable update rate independent of rendering.
- ID-based entity linking: interactions (for example switch-to-door) are resolved by IDs via a registry.
- RenderContext drawing model: rendering passes shared camera/debug/screen context instead of raw offsets.
Assets are embedded in the binary via Go embed and loaded through internal/assets.
assets/tiles/tiles.pngassets/sprites/test_sheet.pngassets/levels/level_01.json
See docs/ for detailed subsystem designs:
docs/architecture-overview.mddocs/level-editor-design.mddocs/tilemap-collision-design.mddocs/moving-platforms-design.mddocs/asset-rendering-design.mddocs/feel-camera-design.mddocs/interactive-world-design.md
CI runs:
go vet ./...go test ./...


