Inspiration

This game was inspired loosely from Pacman, as it has similar graphics and mechanics. Ferris, the mascot of the Rust language, is the star of the game, and is the character that the player controls.

What it does

This game allows the player to navigate around a game board with randomly generated objects, either food, predators, or environment (walls). The game is completely represented with emojis in the terminal. The goal of the game is to survive for as long as possible while fighting an ever-increasing amount of hunger, since Ferris is so famished. 🦀

How I built it

This game was built with Ratatui and Crossterm, two terminal manipulation and utility libraries. The only other crate used was fastrand for easy random number generation.

Challenges I ran into

I ran into a lot of frustrations while using emojis. It turns out that even with monospace font, emojis take up a different width than standard characters, so this was an interesting challenge to deal with. The result is that the game board is actually made up of 🟦 emojis, which are masked by the identically-colored background behind it. This way, the width is consistent across every space of the board.

Accomplishments that I'm proud of

I'm proud of being able to create something with Rust, despite having introductory knowledge of it.

What I learned

Through this project, I was able to practice and improve my Rust skills. I learned the most about how the borrow checker works in practice (and resolving issues related to this), lifetimes on a basic level, and good practices for organizing a mildly-complex Rust codebase.

What's next for Famished Ferris

Next steps for the game would be to create a database for storing high scores on the local machine, adding predator movement so they can slowly navigate around and make it more challenging, and adding "powerups" for the player.

Built With

  • crossterm
  • ratatui
  • rust
Share this project:

Updates