How scottcgi/mojoc works
Main Architecture Layers
Application Layer
• Platform-specific (Android/iOS)
• Core Application Components
Engine Modules Layer
• Graphics (OpenGL ES3)
• Physics
• Audio
• Extension
• Input
Toolkit Foundation Layer
• Math
• Utils
• Platform Abstractions
Component Relationships
a) Core Components:
• Application manages the game lifecycle
• Component system handles entity management
• Scheduler manages update loops
• Input system handles user interactions
b) Graphics Pipeline:
Graphics Module
• OpenGL Wrapper
• Shaders
• Textures
• Meshes
• Sprites
• Primitives
• Camera System
Platform-Specific Elements
Android Layer iOS Layer
• JNI Bridge ├── Native Bridge
• Activity Handling ├── View Controllers
• Asset Management └── Asset Management
Key Design Elements to Highlight
• Core Engine Components (Blue)
• Platform-Specific Code (Green)
• Third-Party Integration (Orange)
• Utility Services (Gray)
Technical Details
Memory Management
• Array-based collections
• String utilities
• Resource handling
Math & Physics
• Vector operations
• Matrix transformations
• Collision detection
Extension System
• Font handling
• Spine integration
Implementation Notes
• Use standardized UML notation where applicable
• Notes for critical implementation details
• Version compatibility (OpenGL ES3)
Data Flow
Input → Application → Physics → Graphics → Render
• The pure C99 implementation
• Platform independence of core components
• The lightweight OOC model
• Component-based architecture
• State machine implementation
• Message-driven design