Skip to content

theskyinflames/galaga

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

galaga

A Galaga arcade-game clone that runs entirely in a terminal, written in Go with no external dependencies.

This is a totally vibe-coding repo. To build it I've used Open Code and Claude Sonnet 4.6.

screenshot

Features

  • 5 × 8 enemy formation that sways and launches dive attacks
  • Player movement, shooting, collision detection, scoring, lives, and stages
  • 256-colour ANSI rendering at 45 fps with Unicode box-drawing borders
  • Raw terminal mode via syscall ioctl — no external libraries

Requirements

  • Go 1.21+
  • A terminal emulator that supports 256 colours and Unicode (xterm, Alacritty, iTerm2, GNOME Terminal, …)
  • Linux (uses TCGETS/TCSETS ioctl)

Build

go build -o galaga ./cmd/galaga/

Or with the Makefile:

make build

Run

./galaga

Or:

make run

Controls

Key Action
A or Move left
D or Move right
Space Fire
Q Quit

Development

make test    # run tests
make lint    # golangci-lint (requires golangci-lint v2)
make fmt     # goimports
make vet     # go vet
make all     # fmt + vet + lint + test + build

Install tooling:

go install golang.org/x/tools/cmd/goimports@latest
# golangci-lint: https://golangci-lint.run/usage/install/

Project layout

cmd/galaga/main.go      entry point, game loop
internal/game/game.go   state machine, physics, ANSI renderer
internal/term/term.go   raw terminal mode, input goroutine

About

a TUI clone of galaga game made by vibcoding

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors