How gnurou/awer works
Component Details
a) Graphics System (most complex part):
• Three rendering paths:
• Software Renderer (src/gfx/sw)
• OpenGL3 Renderer (src/gfx/gl3)
• SDL2 Canvas Renderer (src/gfx/sdl2)
• Specialized renderers:
• Polygon Renderer
• Bitmap Renderer
• Font Renderer
b) Virtual Machine:
• Connection to resource management
• Bytecode interpreter (src/vm/ops.rs)
• Game state management
c) Audio System:
• Split into:
• Music handling (src/audio/music.rs)
• Sound effects
• SDL2 audio backend
d) Input System:
• Input handling through SDL2
• To main game loop
Data Flow Representation
• Resource loading path: Resource Files → Resource Manager → VM
• Rendering pipeline: VM → Game Renderer → Display
• Input flow: SDL2 Input → Input Manager → VM
• Audio processing: VM → Audio System → Sound Output
Technical Details
• Different rendering modes:
• Raster mode (320x200)
• OpenGL polygon rendering
• OpenGL line rendering
• Snapshot/state management system
• Resource management for game assets
Architectural Patterns to Highlight
• Component-based architecture
• Plugin-style rendering backend system
• Resource management system
• State management for game scenes
The resource management system's interaction with other components
Keep the abstraction level high enough to show the overall architecture while including enough detail to understand the different rendering paths and component interactions. This balance is crucial for this specific project due to its focus on both maintaining original game authenticity and supporting modern rendering capabilities.