rusty_console_game_engine

Crates.iorusty_console_game_engine
lib.rsrusty_console_game_engine
version0.4.1
created_at2025-09-07 13:50:51.386691+00
updated_at2025-09-11 22:39:46.400414+00
descriptionA Rust port of the olcConsoleGameEngine
homepagehttps://github.com/rip-super/RustyConsoleGameEngine
repositoryhttps://github.com/rip-super/RustyConsoleGameEngine
max_upload_size
id1828145
size8,561,516
rip_super (rip-super)

documentation

https://docs.rs/rusty_console_game_engine

README

Cube

The Rusty Console Game Engine

A Rust port of the olcConsoleGameEngine. Make simple retro-style console games directly in the terminal, with an API closely matching the original C++ engine.

⚠️ Currently works only on Windows 10/11. ⚠️

⚠️ Make sure to use conhost.exe to run any console games. ⚠️

✨ Features

  • Basic Console Rendering (text, colors, and shapes)
  • Sprites (.spr format)
  • Keyboard & mouse input
  • Audio support (.wav files and arbitrary frequencies)

🛠 Roadmap

  • Publish to crates.io (available here)
  • Documentation
  • Audio support
  • Image → sprite converter
  • Cross-platform support

🚀 Quickstart

Add the engine to your Cargo.toml:

[dependencies]
rusty_console_game_engine = "0.4.1"

Then create a game:

use rusty_console_game_engine::prelude::*;

struct Demo;

impl ConsoleGame for Demo {
    fn app_name(&self) -> &str {
        "Demo"
    }

    fn create(&mut self, _engine: &mut ConsoleGameEngine<Self>) -> bool {
        true
    }

    fn update(&mut self, engine: &mut ConsoleGameEngine<Self>, _elapsed_time: f32) -> bool {
        engine.clear(FG_BLACK);
        engine.fill_circle(engine.mouse_x(), engine.mouse_y(), 5);

        if engine.key_pressed(SPACE) {
            engine.audio.play_note(D4, 500);
        }

        true
    }
}

fn main() {
    let mut engine = ConsoleGameEngine::new(Demo);
    engine
        .construct_console(150, 150, 4, 4)
        .expect("Console Construction Failed");
    engine.start();
}

To see more typical use cases of the engine, check out the examples!

🎮 Examples

Open conhost.exe (in the repo root) before running an example.

Platformer – Mario-style scrolling platformer

Mode7 – Pseudo 3D flying effect

Mazes – Maze generator and renderer

Raycaster - Simple raycasted world to explore

Piano - Piano to play different notes

If you find any bugs, feel free to open an issue or a pull request!

Commit count: 35

cargo fmt