16 stable releases
1.16.0 | Oct 15, 2024 |
---|---|
1.15.2 | Jun 2, 2024 |
1.14.3 | Mar 22, 2024 |
1.13.0 | Sep 13, 2023 |
1.12.3 | Apr 21, 2023 |
#188 in Command-line interface
146 downloads per month
3.5MB
6.5K
SLoC
TMaze
Simple multiplatform maze solving game for terminal, written entirely in Rust
Install with cargo install tmaze
and run with tmaze
What's this
Features
- Responsive to terminal size
- Fire banger OST from step
- Configurable maze sizes through config file
- Configurable colors
- Various maze generation algorithms: Randomized Kruskal's, Depth-First Search
- Timer and move counter
- Show visited places
- Spectator mode, where you can fly and see the gameboard
- Floors and 3D mazes (that's what spectator mode is mainly for)
Rationale
Since I'm a student, I've got to attend classes, but even when I'm listening I wanted to do something more than sit there. Also at the time this project came to life, I started to learn Rust, so it seemed to make sense to make some kind of game, but since my notebook is not the newest and I wanted to make it as lightweight as possible, I decided to make it for a terminal. It's also pretty cool.
Another requirement was that it would be multiplatform so that I could play it anywhere. A bonus was that I could play it on the server.
And it ended up as maze solving game because I just couldn't find any other.
Credits and thanks
- Music and OST - step
- Marketing - PhntD
- Marketing - Inženýr
- Random stuff - filip2cz
- Playtest - everyone
- Everything else - ur-fault
How to run
- You can either:
- Download from Github releases, they are built automatically now, using GitHub Actions
- Install it with your favorite package manager
- Build from source (you need cargo installed on your system)
Using package managers
Scoop - Scoop's official repository
- Make sure you have the latest version of Scoop installed
- Add games bucket using
scoop bucket add games
if you did not before - And finally, install tmaze with
scoop install games/tmaze
Scoop - Henshouse repository
- Make sure you have the latest version of Scoop installed
- Add games bucket using
scoop bucket add henshouse https://github.com/henshouse/henshouse-scoop
if you did not before - And finally, install tmaze with
scoop install henshouse/tmaze
Feature flags
TMaze uses cargo features to enable/disable some features. In Github release binaries, they are all enabled. From version 1.14.0, all features are enabled by default and should be disabled manually. To disable them, use --no-default-features
flag. After disabling them, enable specific ones you want with --features <feature1>,<feature2>,...
flag.
The features are:
- hashbrown - uses hashbrown instead of std hashmap, which is faster
- updates - enables checking for updates, which is done on startup, can be disabled (this doesn't install new version)
How to build from source
Enabling/disabling features
After cargo
command add --features
to enable features, such as updates
. To disable default features, such as hashbrown
, add --no-default-features
. To enable all featueres add --all-features
.
Install it using cargo from crates.io
- Make sure you have cargo installed
- Run
cargo install tmaze
- It's recommended that you have
~/.cargo/bin
in the PATH, so that you don't need full path to run it
Or directly from Github
- Make sure you have cargo installed
- Clone GitHub repository or download it as zip, then extract it
- Go to that folder
- Run command
cargo run --release
to run (or you can just build it withcargo build --release
without runing it) - You can find compiled executable in the directory
./target/release/
with nametmaze
ortmaze.exe
, which you can move or link somewhere else
If you are Docker enjoyer, you may use it too
- Make sure you have Docker installed
- Build the image with
docker build -t tmaze . --tag tmaze
inside the repository folder, image is not published on Docker Hub yet - Then you have multiple options of actually running it (and ofc more)
- Run it one time only:
docker run --rm -it tmaze
- Run it with persistent storage for config and saved data:
docker run -it --rm -v tmaze_data:/root/.config/tmaze tmaze
- In this case you can edit config using somthing like
docker run --rm -it -v tmaze_data:/root thinca/vim:latest
- In this case you can edit config using somthing like
- Run it one time only:
Dependencies
~14–49MB
~806K SLoC