How diasurgical/devilutionx works
Main Components Overview
The system should be divided into these major components:
a) Core Game Engine
• Source/engine/* - Core engine components (rendering, sound, assets)
• Source/DiabloUI/* - User interface system
• Source/controls/* - Input handling system
b) Game Logic
• Source/* (root) - Main game mechanics and state management
• Source/levels/* - Level generation and management
• Source/items/* - Item system
• Source/qol/* - Quality of life improvements
c) Platform Layer
• Multiple platform-specific implementations (Android, iOS, Switch, PS4, etc.)
• Located in platform/* directories
d) Network Layer
• Source/dvlnet/* - Networking implementation
• Multiplayer support components
Key Architectural Elements
┌─────────────────────────────────────────────┐
• User Interface │
• (DiabloUI, Controls, Input Management) │
• ┤
• Game Logic │
• (Player, Items, Monsters, Quests, etc.) │
• ┤
• Core Engine │
• (Rendering, Sound, Assets, Memory) │
• ┤
• Platform Layer │
• (SDL2, Platform-specific implementations) │
• ┘
Detailed Component Breakdown
a) Rendering Pipeline:
Assets → Asset Loading → Rendering Engine → Display
b) Input System:
Platform Input → Input Manager → Control System → Game Logic
c) Network Stack:
Network Interface → Protocol Handler → Game State Sync
Implementation Notes
• Use rectangles for modules/components
• Use hexagons for external interfaces
• Version information and date
• Dependencies (SDL2, Lua, etc.)
Additional Elements
• Configuration management (CMake system)
• Test framework integration
• Platform-specific compilation paths
• QoL feature integration points
Remember to include notes about the modding support architecture, as it's a key feature of DevilutionX.