A terminal-based slot machine game written in Rust.

preview

The game loop revolves around spinning a slot machine full of cards. Obtained cards can be played on the table and give a payout and score depending on the poker hand and card value.

The goal of the game is to get a high score, as the cost of spinning the slots grows with each spin.


Technical overview
  • Full mouse support (drag & drop).
  • Binary size is 1 MB for Linux and 0.5 MB for Windows.
  • No external assets, everything is generated in code.
  • Capable of FPS numbers in the thousands, even on low-end hardware.
  • Cross-compatible with most terminal emulators.
  • Features toggleable shaders (vignette, gamma correction & background GFX).

The game uses a custom software-rendering pipeline. Low-level terminal IO is handled by the crossterm crate.

The pipeline composes terminal cells in real-time and outputs diffs to stdout.

This enables real alpha compositing, making it possible to render effects like shadows around UI elements and dragged cards - something not typically seen in terminal games.


repo: thehuglet/term-slots-rs