skip to content

Demo

Gameplay demo and system highlights from the engine milestones.

Narrative (Story)

A short storyboard that grounds the gameplay loop and progression.

Overview

  • Custom C++ 2D engine built from scratch; evolved from OOP to a component-based engine with real-time multiplayer, eventing, and resource management.
  • Stress-tested via three games: Air Hockey, Tetra Hunter (survival platformer), and Pyramid Climber (networked platformer prototype).

Architecture & Systems

  • Component-Based Engine: decoupled movement/collision/rendering into modular components for flexible game object composition.
  • Memory: fixed-size object pool allocator with placement new for cache locality; eliminates malloc/free hitches.
  • Events: thread-safe emit/post system with variant payloads and priority queue for deterministic processing.
  • Networking: dual topology at 20Hz tick; ZeroMQ client-server (REQ/REP + PUB/SUB) with server authority, plus hybrid P2P with authority election and CRSM for consensus.
  • Performance: P2P reduced latency ~10–15% and cut server bandwidth ~70% vs client-server in stress tests.
  • Concurrency & Time: multithreaded loop (input/physics/network), mutex-protected state; per-client async timelines (0.5×–2×) to avoid desync; global/local timelines for pause/scale.
  • Input: chord detection via priority-queue windowing to prevent ghost inputs and enable combo moves.
  • Physics/Collision: custom 2D AABB with gravity and resolution handling.

Games Built on the Engine

  • Air Hockey: arcade 1v1; chord-based specials (size/speed/drop-shot) to stress the input system.
  • Tetra Hunter: survival platformer (Tetris/Space Invaders/Doodle Jump hybrid) with rising hazards and a multi-phase boss (“The Warden”).
  • Pyramid Climber (prototype): networked platformer with moving platforms, side-scrolling cameras, and replicated moving objects.

Tech Stack

  • C++, SDL3, ZeroMQ, std::thread + mutex, CMake
Tetra Hunter narrative storyboard