A downloadable Hammer Engine

🧱VoidLight-Framework: A High-Performance, Safe C++ Foundation

# VoidLight-Framework

A modern, production-ready C++20 SDL3 game engine template for 2D games. Built for rapid prototyping and scalable game development, it features Data-Oriented Design with EntityDataManager as the central data authority, robust multi-threading, high-performance AI supporting 10K+ entities, a professional UI system, and comprehensive resource, world, and event systems. Designed for cross-platform deployment (Windows, macOS, Linux) with a focus on performance, safety, and extensibility.

## Key Features

- **Modern C++20 & SDL3 Core**

    Clean, modular codebase with strict style, memory, and type safety.

- **Rendering & Engine Core**

    Fixed timestep game loop with smooth interpolation at any display refresh rate. VSync-aware frame pacing, sprite sheet animations, particle effects with camera-aware culling, and sub-pixel smooth scrolling. Platform-native GPU shaders (Metal/macOS, DXIL/Windows, SPIR-V/Linux) with day/night ambient lighting effects.

- **Adaptive Multi-Threading System**

   Hardware-adaptive thread pool with intelligent WorkerBudget batch optimization. Automatically detects logical cores (including SMT/hyperthreading) and reserves one to reduce OS contention. Sequential manager execution gives each system ALL workers during its update window. Priority-based scheduling and adaptive batch sizing help the engine scale cleanly across hardware.

- **High-Performance AI System**

    Data-Oriented Design with EntityDataManager as single source of truth. Cache-friendly, lock-free, batch-processed AI supports 10K+ entities at 60+ FPS with simulation tiers (Active/Background/Hibernated), rich behaviors, dense per-behavior state pools, sparse transient sidecars, and scalable pathfinding and combat integration.

- **Robust Event & State Management**  

        Event-driven architecture centered on `EventManager` as the dispatch hub, with immediate/deferred dispatch modes, persistent and transient handler lifetimes, pooled hot-path events, merchant/NPC spawn helpers, entity/game state machines, and thread-safe manager updates.

- **Flexible UI System**

    Content-aware auto-sizing, professional theming (light/dark plus programmatic custom themes), and rich component library (buttons, labels, input fields, lists, modals, etc.). Responsive layouts with DPI-aware rendering and animation support. Centralized UI constants with resolution-aware scaling (1920×1080 baseline) and event-driven resize handling. Optimized for PC handheld devices (Steam Deck, ROG Ally, OneXPlayer) with automatic baseline resolution scaling down to 1280×720.

- **Action-Mapped Input & Menu Navigation**

    Rebindable command system for keyboard, mouse, and controller input with JSON persistence, category-specific binding capture, controller-aware menu focus, shared menu navigation helpers, and a Controls settings tab for player-facing remapping.

- **Data-Driven Resource Management**  

      JSON-based resource loading for items, equipment, consumables, currency, merchant goods, and gameplay content. Handle-based runtime access and EDM-backed inventories keep systems data-driven, performant, and extensible.

- **Inventory, Equipment & Trading**

    State-scoped inventory and HUD controllers support pickup, gear equip/unequip, hotbar assignment, event-driven inventory refresh, merchant buy/sell UI, relationship-aware pricing, gifts, theft reporting, and NPC memory integration.

- **Debug Profiling Tools**

    Built-in frame profiler (F3 toggle) with live timing overlay and automatic hitch detection. Zero overhead in Release builds.

- **Cross-Platform Optimizations**

    Unified codebase with platform-specific enhancements: SIMD acceleration (x86-64: SSE2/AVX2, ARM64: NEON), macOS Retina support, Wayland detection, VSync-aware frame pacing, and native DPI scaling.

- **GameTime & World Simulation**

    Fantasy calendar system with day/night cycles, four seasons, dynamic weather, and temperature simulation. Chunk-based world support includes procedural generation, streaming, and resource interactions.

- **Chunk-Based World System**

    Efficient tile-based world rendering with chunk culling for off-screen optimization. Supports procedural generation, seamless streaming, and automatic seasonal tile switching.

- **Robust Combat System**

    Dedicated combat, harvesting, projectile, inventory, and social/trading controllers support hit detection, knockback, resource gathering, theft/gift flows, and gameplay-specific state transitions without bloating core engine systems.

- **Power Efficient (Race-to-Idle)**

    Optimized for battery-powered devices. Completes frame work quickly then sleeps until vsync, achieving 80%+ CPU idle residency during active gameplay. 

- **Extensive Documentation**  

    

    Full guides, API references, best practices, and troubleshooting for all major systems.


Comprehensive automated tests include unit tests, AI benchmarks, UI stress tests, thread-system validation, static analysis with cppcheck and clang tidy, verified memory performance with Valgrind.

🎯 Who Is This For?

Ideal for developers who want:

  • A transparent, control-driven codebase

  • Solid, scalable performance foundations

  • High assurance in memory correctness and thread safety

  • A clean framework to build gameplay, physics, or tools

https://github.com/Ronin15/VoidLight-Framework

🔹 Art

- World Tiles by  Pipoya 

https://pipoya.itch.io/pipoya-rpg-tileset-32x32

- Slimes by patvanmackelberg

https://opengameart.org/users/patvanmackelberg

- Player Abigail  by adythewolf

https://opengameart.org/users/adythewolf

- World/Various Ore deposits/ore/bars/gems [Senmou]

https://opengameart.org/users/senmou

Updated 24 days ago
StatusIn development
CategoryTool
AuthorHammer Forged Games
GenreSimulation
Made withSDL
TagsController, Game engine, Indie, performance
LinksGitHub
AI DisclosureAI Assisted, Code

Development log