Terminal Examples

alpha

Source Code

Demonstrates the RGBA capabilities of the library, when alpha blending is enabled on a sparse console overlaying a simple console. Also uses the VirtualConsole feature to create a large psuedo-console containing a chunk of A Tale of Two Cities, and rendering that as the base layer.

astar_mouse

Source Code

Generates a random blob map, and places a player on it. The player moves to wherever the mouse is clicked, using A star pathfinding. Also generates real-time field of view for the player as they zip around.

bench_scalable

Source Code

Generates a completely random console, as fast as possible. Uses the resizable console option to allow the window to be resized while it runs, and queries the console for dimensions---filling as much of it as possible.

No screenshot, sorry.

benchmark

Source Code

Draws a random console as fast as possible. No resizing.

colorfont

Source Code

Demonstrates that you can use color in your font graphic if you want to.

dwarfmap

Source Code

An homage to Dwarf Fortress. Generates a 3D map, and then renders it top-down with darkening for lower than the player z-levels. Implements a-star pathing in 3D, and mouse-based navigation.

flexible

Source Code

Demonstrates using a fancy/flexible console to make a spinning @ bounce around the screen.

fontswitch

Source Code

Demonstrates switching fonts at run-time.

hello_minimal

Source Code

Minimal hello world, see the quick start guide.

hello_terminal

Source Code

See the quick start guide---a bouncing hello world.

input_harness

Source Code

A handy tool to display the key code and mouse information about keys/mouse as they are utilized. Also demonstrates the advanced_input system, providing inputs as a stream of events rather than a simple set.

keyboard

Source Code

Mostly a debugging tool. Demonstrates keys and their various modifier combiantions.

native_gl

Source Code

Demonstrates how to access the underlying OpenGL system, if you should need it. Note that if you really want to write a GL application, this is a really inefficient way to do it---but it gets you started, and offers a way to perform quick OpenGL calls if you just need something fancy.

no_cls

Source Code

Mostly a debugging tool, this example shows that consoles accumulate data if you don't call cls. This was important for debugging the native console implementations and their dirty-render detection.

post_process

Source Code

Demonstrates reading a REX Paint file (.xp), and rendering it to the screen. Enables or disables the terminal's post-processing options, screen-burn and uses scan-lines.

return_error

Source Code

Demonstrates how to return and act on errors from initialization, should you wish to do so.

rex

Source Code

Loads Nyan Cat from an embedded REX Paint file, and renders it to the screen.

sparse

Source Code

Demonstrates layering a sparse console on top of a simple console, with different fonts on each.

sparse_cls

Source Code

Debugging tool, designed to help me notice when I break clearing sparse consoles again!

sprites

Source Code

Uses the sprite layer type (in its infancy) to animate some sprites as they run around the screen.

squishy

Source Code

A benchmark tool that also demonstrates the ability to "squish" terminals by dynamically resizing the size of each tile.

textblock

Source Code

Demonstrates the text-block tool, and how it can help with large amounts of text.

textsprites

Source Code

Demonstrates the "multi-tile text sprite" system. You can batch some characters together for quick rendering.

tiles

Source Code

Uses graphical fonts instead of ASCII/CP437 for a visual dungeon experience.

unicode

Source Code

Demonstrates that if you really want to (it's slow!), you can load a giant font containing lots of unicode and display multi-lingual terminals. Run this one in release mode. It takes far too long to start, otherwise.

virtual_console

Source Code

Demonstrates using a virtual console to hold a lot of data, and then displaying windows into the virtual console. This can be handy for logs, manuals and similar. This should have a seizure warning

walking

Source Code

Demonstrates walking around a map.

walking_with_is_pressed

Source Code

The same walking demo, but using the is_pressed function (for advanced input) rather than the simple key enum.