A terminal-based implementation of the classic space invaders game written in Go, using the tcell library for handling terminal graphics and input.
Important
You must install Go version 1.24 or later.
Note
The game looks for config.toml, make sure that both the game executable and config.toml are located in the same folder and that you run the game from that folder.
Note: Game can run without config file. Will use default configuration.
Another option would be just by cloning this Repository.
There is an executable can be downloaded from releases.
go install github.com/omar0ali/spaceinvaders-game-cli@latestRun the game after installation
spaceinvaders-game-cliTo install go or clone this repository follow the steps.
The game is an endless space shooter where players face increasingly difficult waves of alien ships that scale with their level. Each time the player levels up, they can choose an upgrade to improve their spaceship, such as boosting firepower to handle tougher aliens with stronger armor. The objective is to survive as long as possible, destroy alien ships, and push for a higher score while managing health through occasional drop-down health packs that restore the spaceship health.
- Create a spaceship placed at mouse pointer on the screen.
- Add controls to the spaceship,
Mouse Motionleft, right, up and down. - Shoots laser beam by hitting the
Left Mouse ButtonorSpace Bar. - Create enemy spaceships (Currently have 10 different types).
- Can deploy aliens ships in a random x position
- Stars falling down with different speed. (just to look cool)
- Adding Start Menu Screen UI
- Adding Pause Menu using
pto pause the game. - Adding spaceship UI details.
- Show control info at the bottom of the screen.
- Loot boxes to increase health.
- Health Kits will be dropped every 1 minute.
- Can be consumed by pressing [F] key.
- Implement a configuration file.
- Adding Timer.
- Alien Ship Stats on the right of the screen.
- Alien ships can shoot the player's spaceship.
- Implementing a better way to level up the player.
- With upgrade choice / stat selection. Player can choose to upgrade either (gun power, speed or capacity).
- Now the game runs without a
configfile. If the file dose not exist, the default configuration will be used. - Added variety of spaceship selection before starting the game.
- Before the game starts, the player will be able to select a ship.
- Redesign UI of the spaceship selection.
- Adding status pop up. Will show to keep the player up to date.
- Add another drop down to increase other spaceship stats.
- Boss Fights every 3 minutes.
- Gun Cool-down.
- Both the player and the enemy can take damage when crashing the ships.
- Gun Reload + cooldown.
- Adding Asteroids.
- New Particle System: Added simple animation of an explosion
- Added meteoroids — when an asteroid explodes, it scatters meteoroids.
- They damage spaceships, alien ships, and boss ships.
- Spaceship selection UI Redesign. Now can hover on cards of spaceships and show details.
- Can select a spaceship with Left Mouse Click.
- In game audio (using: gopxl/beeb)
- Sounds downloaded from pixabay.com/sound-effects
- Compendium Menu showing (all entities range from all spaceships, alien-ships, abilities ...etc.)
| Control | Action |
|---|---|
| Left Mouse Pressed | Shoot beams |
| Mouse Movement | Move the spaceship |
| E | Consume health kit (increase spaceship's health) |
| R - Right Mouse Click | Reload Gun |
| P | Pause the game |
| Ctrl+R | Restart game |
| Ctrl+Q | Quit game |
Configuration file added for the player to freely change/update entity's attributes. The config file saved as config.toml.
[dev]
debug = true
fps_counter = false
asteroids = true
sounds = true
[spaceship]
max_level = 59
next_level_score = 150
[stars]
limit = 15
speed = 50Note
Ensure go is installed Install Golang
Clone repository
git clone https://github.com/omar0ali/spaceinvaders-game-cli.gitRun the game
go run .





