How shellyshells/wizzard works
Main Components
a. Entry Point
• Main Application (Main.java) – bootstraps the app, initializes controller and view.
b. Controller Layer (src/controller)
• GameController – orchestrates flow, reacts to user actions.
• ProgressTracker – tracks player state (e.g., current node, inventory).
• StoryLoader – loads/parses story content from resources.
c. Model Layer (src/model)
• Core Entities: Story, StoryNode, Encounter, Choice, Character, Entity, Inventory, CombatSystem, etc.
• They encapsulate game data, business logic (e.g., combat resolution).
d. View Layer (src/view)
• UI Screens & Components: MainMenuScreen/UI, MapScreen, CombatScreen, InventoryScreen, HelpWindow, EndingDialog, ProphecyUI, VisionDialog, CharacterPortrait, etc.
• They render model state and forward user events to controllers.
e. Assets & Resources
• Fonts and Images (src/Assets/Fonts, Images) – loaded at runtime by StoryLoader or view components.
f. Build & Deployment
• pom.xml (Maven) – defines dependencies, build lifecycle.
• target/ – compiled classes & build artifacts.
Relationships & Data Flows
• User Input → View Component → forwards event → GameController
• GameController ↔ Model (e.g., ProgressTracker, Inventory, CombatSystem)
– executes game logic, updates model state
• GameController → View
– instructs view to transition screens or re-render based on updated model
• StoryLoader → Model
– at startup or new game, reads story definitions into Story, StoryNode, etc.
• Model → View
– view queries model for display data (e.g., current node text, character stats)
Architectural Patterns & Principles
• MVC (Model–View–Controller) separation
• Single-process desktop app – no external microservices
• Resource-driven content (assets + story files under docs or embedded)
• Dependency direction: Controllers depend on Model & View; View only depends on Model for reads; Model is independent.
Technologies & Frameworks
• Java (JDK)
• GUI toolkit (Swing/JavaFX – implied by view package structure)
• Maven (pom.xml)
• Plain files for story content (e.g., docs/game_content_map.md, potentially JSON/YAML/XML loaded by StoryLoader)