AGE is a simple ASCII-based physics/game engine written in C++ for terminal/console applications. It includes basic collision handling, movement, input processing, and example game demos (e.g., snake, pong). This project is designed for interacting with physics simulations, game loops, and ASCII rendering in C++.
- ASCII rendering for simple terminal visuals
- Physics and collision detection
- Input handling via ncurses library
- Multiple demo/game examples (snake, pong, etc.)
- Modular engine components for entities, movement, and game state
- C++ — core logic
- ncurses / curses — terminal UI input & output
- Make — build automation
To build and run AGE, you need:
- A C++17-compatible compiler (e.g.,
g++,clang++) makencursesdevelopment libraries installed
On Linux:
sudo apt update
sudo apt install build-essential libncurses5-dev libncursesw5-devClone the repository and build the executables.
git clone https://github.com/brKhoo/AGE.git
cd AGE
make
Then run the demos:
./age
./snake
./pong
- The engine is organized into several core systems:
- Game Loop: Updates state and renders frames
- Entities: Game objects with position/velocity, e.g., shapes, players
- Physics: Movement and collision detection (collision.cc/h)
- Input: Terminal input using curses (cursesInput.h)
- Rendering: ASCII drawing in the console (cursesView.cc/h)
- Examples: Demo logic in files like snake.cc, pong.cc
This modular design makes it easier to extend or reuse parts of the engine.
- AGE includes simple interactive games to demonstrate the engine:
- Snake: Classic snake game in ASCII
- Pong: Basic pong gameplay
- Demo: A general example runner showing engine capabilities
- Add more physics examples (rigid bodies, forces)
- Refactor engine into reusable library modules
- Add unit tests