Fazen2d is a C++ graphics library that turns the Windows console into a 2D drawing surface. It provides geometry primitives (points, lines, boxes, circles, and text), a double-buffered renderer for flicker-free output, keyboard and mouse input, frame timing, and coordinate management — all built exclusively on the Windows API.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/adi3120/Fazen2d/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Draw your first shapes in under five minutes with a minimal render loop.
Installation & Build
Requirements, compiler setup, and building with Make or manual g++.
Core Concepts
Understand the engine architecture, frame loop, and coordinate system.
API Reference
Complete reference for every class, method, and color constant.
How Fazen2d Works
Fazen2d uses a double-buffering strategy: every frame writes shapes into an off-screenCHAR_INFO buffer, then flushes it to the visible console in a single atomic WriteConsoleOutputW call. This eliminates flicker and keeps your rendering code simple.
Initialize the engine
Create a
Fazen object with your desired console dimensions. This sets up the console buffer, font, and all subsystems.Create shapes
Instantiate geometry primitives —
Box, Line, Circle, Point, or Text — with position, size, and color.Run the render loop
Each frame: clear the background, draw shapes into the buffer, then flush to the console.
Key Features
Double-Buffered Rendering
Off-screen
CHAR_INFO buffer flushed atomically via WriteConsoleOutputW — no flicker, no partial updates.Geometry Primitives
Point, Line (Bresenham), Box, Circle, and Unicode Text — each with
draw() and translate().Keyboard & Mouse Input
GetAsyncKeyState-backed key polling and screen-to-console mouse coordinate mapping.Frame Timing
TimeManager measures elapsed time between frames for smooth, delta-time based animation.Color System
ConsoleColor enum and Color class cover all Windows console foreground and background attributes.Zero External Dependencies
Built entirely on
windows.h — no third-party libraries required.