Termule.Engine 0.5.2

dotnet add package Termule.Engine --version 0.5.2
                    
NuGet\Install-Package Termule.Engine -Version 0.5.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Termule.Engine" Version="0.5.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Termule.Engine" Version="0.5.2" />
                    
Directory.Packages.props
<PackageReference Include="Termule.Engine" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Termule.Engine --version 0.5.2
                    
#r "nuget: Termule.Engine, 0.5.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Termule.Engine@0.5.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Termule.Engine&version=0.5.2
                    
Install as a Cake Addin
#tool nuget:?package=Termule.Engine&version=0.5.2
                    
Install as a Cake Tool

Termule.Engine

A micro game engine for developing real-time terminal games. See the full toolkit here.

Access

This library is available on NuGet as Termule.Engine. To add it to your project use:

dotnet package add Termule.Engine

Structure

Termule splits its runtime behavior into two types: Core.System and Core.Component.

Systems

  • Provide a home for global behavior and data
  • Can only be installed, uninstalled, or swapped before the game runs
  • Are limited to a single instance, easily accessed by other systems or components
  • Allow complex behavior to be moved out of the component tree

Components

  • Provide a home for modular behavior and data
  • Can be created, destroyed, or moved while a game is running
  • Can be grouped by a GameObject to enable collaboration
  • Allow behavior to live close to data when it makes sense

This structure provides the convenience of typical OOP while maintaining flexibility. By moving a large chunk of behavior out of the world and into systems, Termule makes games more organized (and in many cases more performant) at scale.

An example game structure:

Game
 ├── Systems
 │    ├── RenderSystem
 │    ├── Terminal
 │    └── TerminalController
 └── World
      ├── Player
      │    ├── Transform
      │    ├── ContentRenderer
      │    ├── PlayerController
      │    └── Camera
      └── Enemy
           ├── Transform
           ├── ContentRenderer
           └── EnemyController

Features

Rendering

The most notable characteristic of the Termule engine is its ability to render the game world so that it can be displayed by terminals. This is achieved through a software renderer that works not on pixels, but terminal cells containing a glyph and two RGB colors (one for the background and one for the glyph itself).

Types.Cell
 ├── Color
 ├── Glyph
 └── GlyphColor

Every Renderer implements a Render() method which is invoked by the RenderSystem when it is time to render the world. This is less performant than the typical render pipeline approach, but makes implementing custom renderers much easier. To this end, Termule provides a collection of drawing methods that perform common operations like drawing sprites, lines, and circles.

Display

To complement its rendering system, the Termule engine provides performant DisplaySystem implementations for terminals. These systems make use of virtual terminal escape sequences to display complex, colorful visuals across a wide range of terminal environments.

At the end of the day, terminal emulators are essentially just interpreters for text that produce visual output on the screen. For this reason, it is important to minimize the number of escape sequences that the terminal has to interpret. This includes optimizations like only drawing cells that have changed since the last tick and drawing chunks of the same color in a single sequence. These optimizations allow Termule programs to run at the frame rates expected of modern games, even in the terminal.

Input

The engine's input system works fully through the terminal without any external input library. This is achieved by enabling and parsing platform-specific escape sequences generated by keyboard and mouse input. This requires bypassing the C# console API in order to get direct, buffer-free access to input.

As it stands the main system for input, Systems.Input.TerminalController can parse:

  • SGR
  • Plain CSI
  • Kitty CSI
  • SS3
  • ASCII

And emits messages on:

  • ButtonDown
  • ButtonUp
  • CharTyped
  • MouseMoved

Resources

As it stands, the runtime resource loading system is quite bare-bones. Types marked as IResource can be loaded and deserialized from JSON at runtime through a Systems.Resources.ResourceLoader. The engine's internal serializer supports 2D arrays, so types like Image are fully loadable.

Resources are sourced as streams by an IResourceProvider. The default resource provider exposes resources that are embedded in the entry assembly. This facilitates publishing to a single, self contained executable.

Documentation

Documentation for the engine's API is available at https://v30p.github.io/termule. This documentation is also viewable by hovering over a Termule type or member in most IDEs.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.2 75 9/20/2026