Projects

2D Game Engine

2026

  • C
  • SDL
  • 2D
  • Tower-Defense

A custom-built 2D game engine and multiplayer tower defense platform developed in C using SDL, designed to support real-time networking, scalable gameplay systems, and multiple game modes within a unified architecture.

The project combines low-level engine development with a feature-rich top-down tower defense game, serving as both a technical framework and a fully playable multiplayer experience. The engine is written with a focus on performance, simplicity, and control, utilizing explicit memory management and efficient data structures to ensure responsiveness in both singleplayer and networked environments.

At its core, the engine provides a modular 2D rendering pipeline built on SDL, supporting sprite batching, texture management, and efficient draw ordering. The entity system enables flexible composition of game objects, allowing towers, enemies, projectiles, and players to share common behaviors while remaining highly customizable. A lightweight physics and collision system supports real-time interactions, pathfinding, and combat mechanics.

A major focus of the project is its multiplayer architecture, which is designed to support multiple gameplay styles with synchronized state and responsive interactions:

  • Real-time client-server model with deterministic updates
  • Efficient state replication and event-driven networking
  • Support for multiple players interacting in the same world simultaneously
  • Systems designed to minimize latency impact on gameplay

The game features several distinct modes, all built on top of the same engine and networking layer:

Solo (PvE):

A traditional tower defense experience where players defend against waves of AI-controlled enemies. This mode emphasizes strategy, resource management, and optimization of tower placement.

Versus (PvP):

A competitive multiplayer mode where players generate and send units to opponents while defending their own base. This introduces a strategic layer of timing, resource allocation, and counterplay, blending offensive and defensive mechanics in real time.

Open World (PvE Multiplayer):

A cooperative mode where multiple players explore and defend within a shared persistent environment. Players can build, expand defenses, and respond dynamically to threats across a larger map, combining tower defense mechanics with open-ended gameplay.

Core gameplay systems include:

  • Grid and pathfinding systems for enemy navigation
  • Tower placement and upgrade mechanics
  • Custom resource and inventory systems
  • Projectile and combat systems with collision handling
  • Wave management and scaling difficulty

The engine is designed for extensibility, allowing new tower types, enemy behaviors, and game modes to be added with minimal friction. Multiplayer systems are deeply integrated rather than layered on top, ensuring consistent behavior across all modes.

Key focuses of the project include:

  • Real-time multiplayer system design in C
  • SDL-based rendering and engine architecture
  • Efficient entity and memory management
  • Modular gameplay systems supporting multiple modes
  • Synchronization of game state across networked clients

Overall, this project demonstrates the design and implementation of a complete 2D engine with a strong emphasis on multiplayer gameplay, showcasing the ability to build scalable, networked systems alongside engaging game mechanics.