Skip to content

Engine Decoupling — Epic #2

@JohnLudlow

Description

@JohnLudlow

Summary

Separate game-specific logic from engine-specific logic to allow the game to prototype while engine features are still in development, render in modes compatible with AI development and automated testing, and change engines without redeveloping the entire game.

Motivation

Game-specific logic Engine-specific logic
UI layout (city panel, unit panel) UI components (buttons, sliders)
Game AI Graphics rendering and shaders
Map generation Input handling
Diplomacy Asset pipeline
Combat Audio handling
Mod management

Proposed Solution

Implement a stable adapter contract layer. Game features communicate with an adapter layer which binds to one or more engine implementations.

Phases

  • Phase 1 — Interface development
  • Phase 2 — Headless adapter development
  • Phase 3 — TUI adapter development
  • Phase 4 — MonoGame adapter development
  • Phase 5 — Raylib adapter development
  • Phase 6 — Stride3D adapter development

Acceptance Criteria

  • Game logic can be executed without the engine present (headless mode).
  • All adapter phases implemented and tested.
  • Contract versioning in place with shims for compatibility.
  • Performance budgets documented and met for hot paths.

Docs

  • docs/plans/4x-game/technical/engine-decoupling/engine-decoupling.md
  • docs/plans/4x-game/technical/engine-decoupling/phase-1-interface-development.md

Project: https://github.com/users/JohnLudlow/projects/7

Metadata

Metadata

Assignees

Labels

area-libItems related to reusable librariesarea-technicalsystemsInternal systems to do with game developmentenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions