API for the creation character based games in Linux.

Overview

Console Game Engine for Linux.

Game of life

API for the creation of character based games in Linux. The inspiration came from the olcConsoleGameEngine. This is my attempt to recreate few of its features in Linux.

At the current stage, the library contains API for the following.

  1. To create a game board (which is a rectangle of some width and height in characters, called cells).
  2. Functions to draw strings, set a cell and to fill a portion of the board with block Unicode characters. These functions are used to draw the 'World' as well as other 'assets' for the game.
  3. Function to read input from keyboard in a non-blocking faction.

Dependencies

Example

use libconsolegameengine::game_engine::*;

struct MyGamePlay;
impl GamePlay for MyGamePlay {
    fn draw(&mut self, engine: &mut GameEngine, elapsed_time: f64) -> bool {

        // Clear the game board.
        engine.fill(
                    0,
                    0,
                    engine.width(),
                    engine.height(),
                    BlockChars::DarkShade,
                    BackgroundColors::Black,
                    ForegroundColors::White,
                );
        true
    }
}
 fn main() {
    let mut game_play = MyGamePlay;
    let mut engine = GameEngine::new(80, 40);
    engine.begin(&mut game_play).unwrap();
 }
You might also like...
A tiny Rust std-lib for Linux x86_64 and aarch64

Tiny std Like a bad, probably buggy, tiny standard library for Linux. When it's appropriate If you are actually trying to do something solid, checkout

An ownership model that is used to replace the Ring in Linux.

std-ownership An ownership model that is used to replace the Ring in Linux. It's 10x faster than Ring in Syscall. Overview The ownership system allows

Linux daemon to bind keys and macros to your controller's buttons

makima Makima is a daemon for Linux to bind your controller's buttons to key sequences and macros. Features: Configure your keybindings through a simp

Open source bible study program on Linux!
Open source bible study program on Linux!

Open Witness Library Open Witness Library is a program to read articles that carries God's true name. Warning This branch is outdated, please refer to

Blazing fast, memory safe & modern Linux package manager written in Rust.

paket Blazing fast, memory safe & modern Linux package manager written in Rust. Roadmap Version: 0.1 Paket.toml file parsing. (#1, #2) CLI handling (p

Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.
Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.

Speedy2D Hardware-accelerated drawing of shapes, images, and text, with an easy to use API. Speedy2D aims to be: The simplest Rust API for creating a

An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous and blocking clients respectively.

eithers_rust An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous a

Code to follow along the "Zero To Production" book on API development in Rust.

Zero To Production / Code (Chapter 10 - Part 1) Zero To Production In Rust is an opinionated introduction to backend development using Rust. This repo

Interact with the crate's API

cargo-crate-api Interact with the crate's API Documentation Installation Getting Started Reference FAQ Contribute CHANGELOG Install Download a pre-bui

Owner
Arjob Mukherjee
Software developer and electronic hobbyist. Interested in low level systems programming, FPGA, Operating System Development, Compilers, Vintage electronics.
Arjob Mukherjee
Determine the Unicode class of a mathematical character in Rust.

unicode-math-class Determine the Unicode class of a mathematical character in Rust. Example use unicode_math_class::{class, MathClass}; assert_eq!(cl

Typst 3 Jan 10, 2023
📱️🚫️🌝️💾️ 3FakeIM is a joke program meant to imitate various fictional characters, and the "[CHARACTER] CALLED ME AT 3:00 AM" clickbait trend, while poking fun.

3FakeIM ??️??️??️??️ 3FakeIM is a joke program meant to imitate various fictional characters, and the "[CHARACTER] CALLED ME AT 3:00 AM" clickbait tre

Sean P. Myrick V19.1.7.2 2 Jul 3, 2023
Convert character to binary using Rust.

Character-to-Binary-Rust This is a simple operation that is used to convert character to binary using Rust. Installation and Requirements First instal

Kariappa K R 8 Nov 20, 2023
Simple Rust derive-macro that simplifies integral enum creation

Integral enum A simple way to define integer-like enums. This macro implements bunch of traits that are usually implemented via looooong derive(..) at

null 3 Jan 6, 2023
🎮 game loop + 🐷 coroutine + 🌯 burrito = 🚀🔥 blazingly synchronous async executor for games 🔥🚀

?? Koryto ?? Pronounced like corrito, which is pronounced as if you combined coroutine and burrito, because everyone knows coroutines are burritos in

Jakub Arnold 3 Jul 6, 2023
List public items (public API) of Rust library crates. Enables diffing public API between releases.

cargo wrapper for this library You probably want the cargo wrapper to this library. See https://github.com/Enselic/cargo-public-items. public_items Li

Martin Nordholts 20 Dec 26, 2022
Uma lib para a API do Brasil API (para o Rust)

Uma lib para a API do BrasilAPI (para o Rust) Features CEP (Zip code) DDD Bank CNPJ IBGE Feriados Nacionais Tabela FIPE ISBN Registros de domínios br

Pedro Augusto 6 Dec 13, 2022
API based replacement for carbon.now.sh

Inkify Unfortunately Carbon has been without an API for too long, and I've run into a few cases where one would be useful for a project. So I present

Chris Watson 3 Oct 31, 2023
qfetch is a tool that fetches info about your linux install.

qfetch qfetch is a tool that fetches info about your linux install. Status Dependencies /proc/meminfo with the following fields: MemTotal in the 1st l

Demir Yerli 2 Nov 16, 2022
Streaming I/O for Linux built on DMA Buffers

dmastorage High-performance I/O for Linux based on DMA Buffers ALPHA QUALITY SOFTWARE Warning DmaStorage is still just a concept and shouldn't be used

Ignacy Koper 2 Nov 22, 2022