How capibaraengineer/terminalengine works
TerminalEngine is a small C++ engine for composing terminal games from layered character grids and positioned game objects. In the included demo, the main loop polls keyboard input to move an object, then asks GameHandler to update and render the scene; Rendering overlays objects onto copied layers, combines the layers, and writes the frame to the terminal. The sampled code shows no collision processing despite collision flags in the data model. The graph reflects the supplied headers and demo; other capabilities are not documented in the README.
Main entry points: TestGame.cpp Demo loop · Rendering.hpp Terminal renderer · LayerList.hpp Layer list · GameHandler.hpp Game handler
Components 9
Demo game
- Demo loop
TerminalEngine/TestGame.cpp
Engine runtime
- Game handler
TerminalEngine/GameHandler.hpp - Terminal renderer
TerminalEngine/Rendering.hpp
Scene model
- Layer list
TerminalEngine/LayerList.hpp - Game layer
TerminalEngine/GameLayer.hpp - Game object
TerminalEngine/GameObject.hpp - Character grid
TerminalEngine/Vector2D.hpp
Other components
- Player
- Terminal
Connections 10
- Player → Demo loop: presses keys
- Demo loop → Game object: moves object
- Demo loop → Layer list: creates scene
- Demo loop → Game handler: starts and updates
- Game handler → Terminal renderer: calls render
- Terminal renderer → Layer list: copies and reads
- Terminal renderer → Game object: reads positions
- Terminal renderer → Terminal: writes frame
- Layer list → Game layer: stores layers
- Game layer → Character grid: stores grid