Vanilla Adventures : a CLI Game in Go
How to Make a CLI Game in Go
Lately I've been working on a small project: building a CLI game in Go. The game revolves around a cat named Vanilla.
At first, I wasn't sure what kind of game I wanted to create. I kept going back and forth between something ambitious (like a narrative-driven experience or even a roguelike), but eventually, I settled on a simpler and more classic idea: a catcher game.
In this type of arcade-style game, objects fall from above, and the player must catch them, simple, fast, and fun.
The tcell Package
One of the key tools that made this project possible is the tcell package.
tcell provides a powerful, cell-based view for text terminals. It allows you to :
- Draw directly in the terminal
- Listen for keyboard input
- Handle terminal resize events
This makes it possible to build responsive, real-time applications (like games) entirely in the terminal.
If you're curious, there's a small tutorial that demonstrates its capabilities.
The Game Loop
The core gameplay is straightforward:
- Food falls from the sky
- The player controls Vanilla using arrow keys or A/D
- The goal is to catch as much food as possible
Each interaction triggers feedback from Vanilla, giving the game a bit of personality
That said, the game is still a work in progress:
- There's no game-over condition yet
- The falling speed of food doesn't change
- Difficulty progression is still missing
I do plan to revisit and improve these aspects, but I wanted to share what I've built so far
Download the game
You can find the project here: lab.afaiz.dev/fzfouz/Vanilla-adventures
- On Linux: run the binary directly from the
binfolder - Otherwise: build and run it using
make run
Recommendation
An interesting piece of the internet https://bikeshed.com/
It touches on topics like simplicity, overengineering, and how developers often get stuck on small decisions. It resonated with me while working on this project, especially when I was stuck choosing between ambitious ideas and something small and fun.
Thanks for reading!
Add a comment
Comments (0)
Copyright © 2026 Abderrahmane Faiz
