Crate gemini_engine

source ·
Expand description

Crates.io Stars Last commit Code size Crates.io Issues

§Introduction

Gemini is a monospaced ASCII rendering engine, capable of rendering 2D and 3D graphics in a terminal or console and written in Rust. This is a loose port of gemini-py which was made in Python but was deprecated due to performance limitations.

IMPORTANT: You MUST use a monospace font in the terminal for the engine to render the view properly Looking for input? The console-input crate (also made by me) makes it easy to implement cross-platform input

As of now this is still a work in progress, so any feedback or issue requests would be very much appreciated :)

§Projects created using Gemini

Go to elements for a quick start guide.

§Crate Structure

This library is made up of three main crates:

  • gameloop, which handles the gameloop. See the gameloop documentation to see how to structure the usual Gemini project.
  • elements, which handles the printing of various objects to a View, the central object in a Gemini project.
  • elements3d, which handles everything 3D-related. Objects that elements3d converts to a 2d object will then be printed to the screen by a View

Modules§

  • Gemini’s core elements module. This and the view module make up Gemini’s core rendering system.
  • Gemini’s implementation of 3D rendering. Capable of rendering full 3D meshes as wireframes, solid colours or with lighting
  • The gameloop is one of Gemini’s most important features. If you read the Quick Start guide, you’ll have seen that the example there didnt have a fully written gameloop. When you begin building larger projects with Gemini, this is what your code should look like

Macros§

  • You can use the fps_gameloop! macro to avoid writing a lot of boilerplate code. Take this block of code from a program written with gemini