How e2dk4r/handmadehero works
Main Components
A. Core Engine Layer
• Core subsystems:
• Memory Management (memory_arena.h)
• Entity System (entity.h)
• World Simulation (world.h)
• Math System (math.h)
• Random Number Generator (random.h)
B. Platform Abstraction Layer
• This as a wrapper around the core engine
• Platform-specific implementation (handmadehero_linux.c)
• Integration with:
• Wayland (Display System)
• Pipewire (Audio System)
C. Rendering System
• This as a major subsystem
• Components from render_group.h
• Connection to platform's display system
D. Audio System
• Parallel to the rendering system
• Audio.h components
• To Pipewire implementation
E. Asset System
• This as a supporting subsystem
• Asset builder tool connection
• Asset loading and management flow
F. Development Tools
• As auxiliary systems
• Include:
• Asset Builder (hh_asset_builder)
• Record Reader (hh_record_read)
┌─────────────────────────────────────────────┐
• Platform Layer │
• ┌─────────────────────────────────────┐ │
• Core Engine │ │
• ┌─────────┐ ┌─────────┐ │ │
• Entity │ │ World │ │ │
• System │ │ System │ │ │
• ┘ └─────────┘ │ │
• ┌─────────┐ ┌─────────┐ │ │
• Memory │ │ Math │ │ │
• System │ │ System │ │ │
• ┘ └─────────┘ │ │
• ┘ │
• ┌──────────────┐ ┌──────────────┐ │
• Render │ │ Audio │ │
• System │ │ System │ │
• ┘ └──────────────┘ │
• ┘
Important Details to Capture
• Separation between platform-independent and platform-specific code
• Asset pipeline flow from tools to runtime
• Demonstrate the simulation region system's relationship with the world system
• Debug/development features (debugf.h, analysis.h)
Implementation Notes
• Maintain consistent spacing and alignment
• Clear labels for all components
• Brief descriptions for major subsystems
Remember to emphasize the modular nature of the engine and how the platform abstraction layer enables the port to Wayland and Pipewire while maintaining the core game engine's platform independence.