A simple Minecraft clone that render in ASCII characters in the terminal.
- Requires a game controller (keyboard input is not supported)
- Runs even in a TTY
- Explore a nearly infinite world with plains, mountains, and deserts
- Place and break blocks in the environment
- Demo in web browser: https://floflo0.github.io/ascii-mc/
The game can be compile to WebAssembly in order to run in web browser. However, this version of the game is very slow and if you really want to test the game properly, I really encourage you to test the native version.
The game is available here: https://floflo0.github.io/ascii-mc/
First you can configure the game from config.h. More particularly, the character ratio of the font in your terminal, other wise, the game may be squished.
Then, to build the project in release mode:
make BUILD_TYPE=releasemake wasm BUILD_TYPE=release
cd wasm
npm install
npm run buildTo run the game in your terminal or TTY:
build/ascii-mcAlternatively you can launch the game with a custom alacritty config that imitate a Linux TTY:
alacritty --config-file alacritty.toml --command build/ascii-mcIn debug mode, the engine writes logs to standard error (stderr). These logs can interfere with the game's terminal display, making it glitchy. To fix this, you can redirect the logs to a file:
build/ascii-mc 2> logs.txtYou can then see the logs from an other terminal window:
tail -f logs.txtThis project uses Check for unit testing.
To run tests:
make testThis project uses clang-tidy for linting. Run:
make lintThis project uses clang-format for consistent code style. To format all files:
make format