A simple Space Invaders-style game written in Go for the terminal.
![]() |
---|
Game demo, played on terminal, recorded using asciinema |
- Playable in the terminal (cross-platform)
- Move your ship left/right and shoot aliens
- Aliens move and shoot back
- Score tracking
- Game over and restart functionality
a
or Left Arrow: Move leftd
or Right Arrow: Move right- Spacebar: Shoot
q
: Quitr
: Restart (after game over)
- Go 1.16 or newer
- Terminal/console with basic ANSI support
-
Clone or download this repository.
git clone https://github.com/ahmad-alkadri/go-invaders-space.git
-
Open a terminal in the project directory and run.
go run main.go
-
Alternatively, you can build it:
go build -o go-invaders-space ./go-invaders-space
- Tested extensively on
bash
, not yet on Windows - Uses the eiannone/keyboard package for keyboard input.
Enjoy blasting some aliens!