CLI-only Dice Game

Completed: 2025-08-06

A roguelike dice-rolling game experienced exclusively in a Terminal window

After several iterations of Balatro-inspired dice-rolling games all met the same fate - mixed separation of concerns and disjointed frontend/backend - I had the idea to create a CLI-only game that used extremely minimal UI - and would (hopefully) still be fun.

Theoretically, most games are playable from a command line interface in some capacity - from Tic-Tac-Toe all the way to something like Skyrim! - since it's really the game engine that is directly manipulating the current GameState. While your inputs on a controller might be triggering changes to the GameState, it's really the game engine manipulating state behind the scenes, which then prompts updates to the rendering of what you perceive to be the "playable game". For example, you don't really need a visible and clickable 3x3 board to play Tic-Tac-Toe - rather, the 3x3 array making up the board can be represented as a string of text, and players could place markers by inputting two-dimensional coordinates (e.g. "[1,2]") in the CLI instead of clicking on a board.

I wanted to prove that this was possible for my dice-rolling roguelike - and it ended up being a really great exercise for me as a software engineer. By focusing purely on the game engine and CLI interface, I was able to build a solid foundation that could later be extended to other platforms - or so I thought...

After completing the CLI version, I attempted to create a web-based multiplayer version that would run on the same game engine - and while I was successful in creating a working online multiplayer game with live updates, it became quite disjointed from the CLI-version and I ended up scrapping parts of the CLI version so that the web version would work, as well as rewriting a significant amount of game logic within the web components (this is a problem I have encountered before, and it essentially leads to creating different branching versions of the same game within a single repository - in other words, SLOP!)

Rollio multiplayer game interface Rollio game lobby

You can read about the next stage of this project here, where I picked it up again a few months later and gave the web version another shot.

Technologies Used

  • TypeScript (core logic and type safety)
  • React (frontend)
  • Node.js & Express (API + server)
  • Socket.io (web sockets for real-time multiplayer)
  • Vercel (frontend deployment)
  • Render (backend deployment)