Retro Plasma
retro-plasma is a full-screen animation demo that renders a classic plasma effect directly in the terminal.
It is both a visual showcase and a practical example of continuous buffer updates, palette switching, keyboard controls,
and resize-aware rendering.
Use This Demo When You Need…
A support example for continuous full-screen animation with keyboard input.
A place to study palette-based color animation with
ColorSequence.A lively example of a resize-aware terminal application that still keeps its controls readable.
Run the Demo
Start the demo from the build directory:
$ ./cmake-build-debug/demo-apps/cterm/retro-plasma
Use F to speed up, S to slow down, P or Space to pause, C to switch palettes, and Q to quit.
Captured Output (80x25)
▒░█▓▓▒░░░░░░▒▒▓██ ░▒▒▓██ ░░░▒▒▒▒▓▓▓▒▒▒▒░░ ██▓▓▒▒░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▓▓██
░ █▓▓▒▒▒▒▓▓██ ░░▒▓▓██ ░░░░░░░░░░░░ ██▓▓▓▒▒░░░ ░░░▒▒▒▓▓▓█████████▓▓▓▓▓▓█
██████ ░▒▒▓▓███ ░░░░░░░░░░░ ███▓▓▒▒░░░ ░░▒▒▓██ ░░░▒▒▒░░░ █████
░░░░░░▒▒▓▓██ ░░░░░░░░░░░░░░░░░░░ ███▓▓▓▒▒▒░░░░░░░░░▒▒▓██ ░░▒▓▓▓▓▓▓▓▓▒░░ ██
▒▒▒▓▓██ ░░▒▒▒▒▒▒░░░░░░░░░░░░░░░▒▒▒▒░░░░░░ ███▓▓▓▓▓▓▓▓▓▓██ ░▒▒▓▓██████▓▓▒░░
▓██ ░░▒▒▓▓▓▓▓▒▒▒░░░░ ░░░░░▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒░░░ ████ ░░▒▒▓▓██████▓▓▒░░
█ ░░▒▒▓▓▓▓▓▓▓▒▒░░ ░░░▒▒▓▓▓██████████████████▓▓▒▒▒░░ ░░▒▒▒▓▓▓▓▓▒▒░░
░░▒▓▓▓█▓▓▓▒▒░ ███████ ░░▒▒▓▓▓▓▓█████████ ██▓▓▒░░ ██▓▓▓▓▓██ ░░░▒▒▒░░░
░▒▒▓▓▓▓▓▒▒░ ██▓▒▒▒▒▒▓▓██ ░░▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓███ ██▓▒░ ██▓▒░░░░░▒▒▓▓█ ░
░░▒▒▓▓▒▒░░ █▓▒░░ ░░▒▓▓██ ░░░▒▒▓▓▓███▓▓▒▒░ ▓▒░ █████ ░▒▓▓██
░░▒▒▒▒░░ █▓▒░ ██▓▓▓██ ░░▒▓▓▓▓█▓▓▓▓▓▓▓▓▓▓███ ░░▒▒▒▒▒▒░ █▓▒░ █▓▒▒░▒▒▓▓█ ░▒▓██
░░░▒░░ █▓░ █▓▓▒▒▒▒▓▓█ ░▒▒▓▓▓▓▓▒▒▒▒▒▓▓▓███████ ░░ █▓▒░ ▓▒░░ ░░▒▓ ░▒▓██
░░░░░░ █▓▒ █▓▒░░░░░▒▓▓█ ░▒▒▓▓▓▓▓▓▓▓▓▓▓██ ████████ ███▓▒░ █▓▒░ ░░▒█ ░▒▓█ ░░
░░░░░ █▒░ █▓▒░░░░░▒▓█ ░▒▓▓███ ███████ ███████████▓▒░ █▓▒░░ ░░▒▓ ░▒█ ░░▒▒▒
░▒▒░░ █▓░ █▓▒░░░░▒▓▓ ░▒▓█ ░░▒▒▒▒▒▒▒▒░░░░░░░ ██▓▒░ ██▓▒░░░▒▒▓█ ▒▓█░▒▒▓▓▓▓
▒▒▒▒░░ █▓▒░ █▓▓▒▒▒▓█ ░▒▓ ░▒▓██ ████▓▓▓▓▒▒▒▒░░░ █▓▓▒░ █▓▓▓▓▓██░▒▓█░▒▓██ █
▒▒▒▒░░ █▓▒░░ █████ ░▒▓ ░▒▓█ ░▒▒▒▒▒▒▒▒░░░ ██▓▓▓▒░░ ██▓▒░ ██ ░▒▓█░▒▓█ ░░░░
░░░░░░░ ██▓▒▒░░░░░▒▒▓█ ▒▓█ ░▒▒▓▓███▓▓▓▓▒▒░░ █▓▓▒░░ █▓▓▒░░░░░░▒▒▓█░▒▓█ ░░▒▒░░░
██▓▓▓▓▓▓▓██ ░▒▒▓█ ░▒▒▒▓▓▓▓▓▒▒▒░░ ██▓▒▒░ █▓▓▒▒▒░▒▒▒▓██ ░▓██ ░░░░░░ █
▓▓████ █████ ░░▒▒▓▓██ ██▓▓▒▒░ ██▓▓▒▒▒▒▒▒▒▓▓█ ░▒▓██ ░░░ ██▓▒
▒▒▒▒▒▓▓██ ░░░░░ ░░░░░▒▒▒▒▒▒▒▒░░░ ██▓▓▓▒▒▒▒▒▒▒▒▒▓▓█ ░▒▒▓██████▓▓▒▒░
░░▒▓▓██ ░░░░░░░░░ █████████▓▓▓▓▓▒▒▒▒▒░░░░░░░▒▒▒▓▓██ ░░▒▒▒▓▒▒▒▒░░ ██▓▓▒
████ ░░▒▓▓█ ░░░░░░░ ███▓▓▓▒▒▒▒▒░░░░░░░░░░░░░░▒▒▒▒▓▓███ ░░░░░ █▓▓▒▒░░
█████ ░░▒▓▓██ ███▓▓▓▒▒▒▒▒░░░░░░░░▒▒▒▒▒▓▓▓▓████ ██▓▓▒▒░ ███████
Retro Plasma [Q] quit [F] faster [S] slower [P] pause [C] palette speed 100%
The capture may not show the terminal output correctly. Here a screenshot:
Features Demonstrated
Full-screen rendering using
Buffertogether withTerminal::updateScreen().A timed animation loop combined with keyboard input in
Input::Mode::Key.Palette-based color animation implemented with
ColorSequence.Resize-aware rendering using custom
UpdateSettingswith minimum-size handling.A dynamic footer prompt composed from colored
BlockStringfragments.
Relevant Source Files
If you want to explore how the effect is implemented, start with demos/cterm/RetroPlasma/src/RetroPlasmaApp.cpp
and demos/cterm/RetroPlasma/src/PlasmaRenderer.cpp.