Skip to content

Game Modules

github-actions[bot] edited this page Sep 6, 2026 · 4 revisions

Game Modules

SparkEngine contains 11 in-tree game-module directories with differing prototype maturity. They are source showcases and test fixtures, not released games. Only the blocked and uncertified SparkGameFPS single-player slice is inside stable-v1; the other modules and multiplayer breadth are outside it. Dynamic modules implement Spark::IModule and build as shared libraries where their targets are enabled.

Building your own: see Creating a Game Module for the step-by-step integration tutorial. This page catalogs what already exists.


The catalog

Module LOC Genre / focus Key engine subsystems wired
SparkGame ~870 Base / showcase — a bit of everything All core subsystems
SparkGameFPS ~22.7K First-person shooter Weapons, player controller, death->respawn->score loop, quicksave profile, AI (LAN path experimental)
SparkGameMMO ~10.0K Massively multiplayer online AreaServer, WorldServer, persistence, dialogue
SparkGameMMOFPS — MMOFPS / Terrafront Combined-arms MMOFPS systems
SparkGameRPG ~5.1K RPG mechanics Save, animation, AI, cinematic, quest, dialogue
SparkGameARPG ~3.3K Diablo-style action RPG Combat, loot, abilities, dungeon generation
SparkGameOpenWorld ~4.9K Large-world exploration Seamless streaming, origin rebasing, weather
SparkGamePlatformer ~4.1K 3D platformer Player controller, destruction, audio, save
SparkGameRTS ~5.0K Real-time strategy Unit roster, selection and move/stop/hold commands, buildings, economy, fog; no acting AI opponent and no damage resolution yet
SparkGameRacing ~3.8K Vehicle racing Kinematic showcase vehicles (no Jolt), WASD input, waypoint AI, camera, audio, cinematic
SparkGameVisualScript ~370 Script-only module Visual scripting graphs, zero C++ game logic

The root build enumerates 11 module targets when BUILD_GAME_MODULES is enabled (ON by default); this target inventory is not a claim that every module is playable or release-ready.


SparkGame

Purpose: baseline module with a GameplayShowcase scene that walks new contributors through every subsystem at least once. It follows the same CMake module pattern as the other in-tree targets; it is not a prerequisite target for them.

  • Source: GameModules/SparkGame/Source/
  • Primary headers: Core/SparkGame.h, Core/GameplayShowcase.h

SparkGameFPS

Purpose: first-person shooter implementation showcase and the blocked stable-v1 vertical-slice candidate. It is not yet a certified or released product.

  • Source: GameModules/SparkGameFPS/Source/
  • Notable: Game/Player.h (~800 LOC), Game/Game.h (~660 LOC), weapon system, the completed death -> respawn -> score loop (Game/GameMechanicsRespawn.cpp), real quicksave/quickload of the local profile, one runtime-discovered asset root. The in-game console overlay was removed (commands register into the engine SimpleConsole). The LAN/multiplayer path (Game/MultiplayerSystem.cpp) is experimental and outside stable-v1 (MOD-315); it is not part of the single-player slice claim.
  • Wires: Input, Camera, Physics, Networking, Audio, AI.

SparkGameMMO

Purpose: MMO networking showcase built on the HeroEngine-inspired architecture.

SparkGameMMOFPS

Purpose: Terrafront MMOFPS source module. It is an in-tree development artifact, not a stable-v1 certified or released game.

  • Source: GameModules/SparkGameMMOFPS/
  • Reference: GameModules/SparkGameMMOFPS/README.md

SparkGameRPG

Purpose: classic RPG mechanics — quests, dialogue, party members, save/load.

SparkGameARPG

Purpose: Diablo-style click-to-move action RPG.

  • Source: GameModules/SparkGameARPG/Source/
  • Notable: Combat/ARPGCombatSystem.h, Dungeon/ARPGDungeonSystem.h, Hero/ARPGHeroSystem.h, Loot/ARPGLootSystem.h.
  • Wires: Loot and Crafting, ability system, procedural dungeon generation.

SparkGameOpenWorld

Purpose: large-world exploration — kilometer-scale terrain with streaming.

SparkGamePlatformer

Purpose: 3D platformer — movement feel, jump mechanics, collectibles.

SparkGameRTS

Purpose: real-time strategy — unit selection, pathing, resource economy.

  • Source: GameModules/SparkGameRTS/Source/
  • Wires: AI (flocking + director), Event System, Audio, weather, Destruction System.
  • Playable loop: selection is backed by the live unit roster, while move/stop/hold commands and queued waypoints drive unit state and straight-line map-space movement (no NavMesh path query). Not yet: there is no AI director -- the Swarm faction is flagged AI but no controller issues it commands; attack commands set state but apply no damage, so no unit dies and a match cannot end; the RTS Battlefield ImGui panel is compiled out because ENABLE_EDITOR is never a compile definition; simulation runs in OnUpdate with variable dt (OnFixedUpdate is empty).

SparkGameRacing

Purpose: systems-first circuit racing with one player car and five waypoint-following AI opponents. Vehicles are kinematic showcase vehicles (hand-rolled speed/heading integration, radius-check checkpoints) -- Jolt vehicle physics is not used; the camera system's output is internal and is not pushed to the renderer; the ImGui HUD/minimap is compiled out (ENABLE_EDITOR is never defined). WASD/nitro/drift input is real.

SparkGameVisualScript

Purpose: demonstrates the "zero C++" game module — all gameplay authored through Visual Scripting graphs that compile to AngelScript at runtime.

  • Source: GameModules/SparkGameVisualScript/Source/
  • Smallest module at ~370 LOC because the C++ side only loads graph assets; logic lives in .sgraph files.

Lifecycle — how the engine loads them

  1. At runtime, the host resolves a game-module candidate through -game, a manifest, or discovery; CMake-built targets are candidates, not a bulk-load list.
  2. ModuleManager reads a candidate's IModule::GetModuleInfo() while loading it and permits only one Game-kind primary module.
  3. The selected primary game module receives OnLoad(context) and OnUpdate(dt) in the engine lifecycle.
  4. Its OnUnload() runs on engine shutdown or when Hot Reload rebuilds the DLL.

See Creating a Game Module for the full IModule contract.

Related

SparkEngine Wiki

Website Entry Points

Getting Started

Engine Subsystems

Gameplay & Tools

Platform Support

Graphics

Advanced

Development & Process

Research & Analysis

Engineering Notes & Audits

Specifications

Reference

Clone this wiki locally