How karl-zylinski/karl2d works
Karl2D is an Odin library for building 2D desktop and web games. A game initializes the library, repeatedly updates input and game state, issues drawing calls, presents frames, then shuts down. The documented runtime capabilities include batched rendering, cameras, shaders, audio, and mouse, keyboard, and gamepad input. The tree also shows platform-specific backends and asset helpers. The README excerpt ends during its architecture notes, so most internal call relationships cannot be verified; the graph limits those links and cites documentation where it describes capabilities.
Main entry points: karl2d.odin Karl2D API · audio_backend_web_audio.js Web audio bridge · audio_backend_web_audio_processor.js Audio worklet · render_backend_chooser.odin Render selection
Components 19
Game API
- Karl2D API
karl2d.odin
Rendering
- Render selection
render_backend_chooser.odin - Render interface
render_backend_interface.odin - OpenGL backend
render_backend_gl.odin - Direct3D backend
render_backend_d3d11.odin - WebGL backend
render_backend_webgl.odin
Audio and Assets
- Audio selection
audio_backend_chooser.odin - Audio interface
audio_backend_interface.odin - Web audio bridge
audio_backend_web_audio.js - Audio worklet
audio_backend_web_audio_processor.js - Asset filesystem
file_system_default.odin - Web asset filesystem
file_system_web.odin - Font cache
font_cache/font_cache.odin
Platform Runtime
- Platform interface
platform_interface.odin - Linux runtime
platform_linux.odin - macOS runtime
platform_mac.odin - Windows runtime
platform_windows.odin - Web runtime
platform_web.odin
Other components
- Game developer
Connections 8
- Game developer → Karl2D API: calls game API
README.md - Karl2D API → Render selection: draws and presents
- Karl2D API → Audio selection: plays audio
- Karl2D API → Platform interface: runs platform services
- Karl2D API → Asset filesystem: loads desktop assets
- Karl2D API → Web asset filesystem: loads web assets
README.md - Web audio bridge → Audio worklet: loads processor
audio_backend_web_audio.js - Web audio bridge → Audio worklet: sends samples
audio_backend_web_audio.js