How thuiop/magium-dev works
Main Components
a) Application Layer
• Electron Main Process (main_electron.js)
• Node.js Runtime (main_node.js)
• Main Setup Module (src/main_setup.js)
b) Core Game Engine
• Parser System (src/parser.js)
• Story Processing Engine
• Save System Manager (public/scripts/saves.js)
c) Content Management
• Story Data (.magium files)
• Localization System
• Achievement System
d) User Interface
• Template Engine (EJS)
• Static Assets
• Style System
Component Relationships
[Electron Main Process] ─────┐
• ► [Core Game Engine] ◄────── [Content Management]
[Node.js Runtime] ──────────┘ │
• ▼
• [User Interface]
Important Elements to Highlight
a) Data Flow:
• Story file loading (.magium files)
• Save state management
• Localization handling (en/fr)
• Achievement tracking
b) File Organization:
• Templates directory structure
• Public assets management
• Data directory organization
Specific Implementation Details
• The relationship between .magium files and the parser
• Template rendering flow
• Save state persistence
• Localization switching mechanism
The separation between game logic and content
Keep the following aspects in mind:
• Clear boundaries between the Electron wrapper and game engine
• File-based nature of the story content
• Achievement and stats tracking systems
• Save management system's interaction with local storage