How jkim-hack/cse3902 works
Main Components
• Game Core & Engine: At the center, include the primary game loop (Game1.cs) along with the GameStateManager and GameConditionManager that control overall game flow.
• Input & Command Processing: Show the Controllers (KeyboardController, MouseController) sending input to the Command system. Include the command classes (in the Commands directory) that encapsulate various user actions (e.g., LinkMovementCommand, PauseCommand).
• Collision System: Create a separate block for collision detection. This should include the CollisionManager, the assortment of ICollidable implementations (BlockCollidable, EnemyCollidable, etc.) and the QuadTree for spatial partitioning.
• Room & Level Management: Reflect the Rooms system that includes Room, RoomHandler, RoomTransitionManager and the XMLParsing subsystem used for level descriptions (files like Level1.xml, etc.). Don’t forget to include aspects related to door handling (in the Doors directory) and conditions applied in Rooms/Conditions.
• Graphics & Sprite Management: Include the SpriteFactory modules (BlockSpriteFactory, DoorSpriteFactory, EnemySpriteFactory, etc.) and the Sprites directory with specialized sprites for Link, enemies and HUD components. Also show the separation of interior/exterior assets.
• HUD & UI: Illustrate the HUD components under the HUD directory – including the HUDManager, InventoryHUDItem, HealthHUDItem, etc. This is important as it reflects the interaction with game settings and real-time player feedback.
• Audio & Content Management: Include a Content block for audio files (the many LOZ_*.wav files and other sound assets) and font assets. This may be shown in parallel with the content pipeline (Content.mgcb).
• Particle & Effects System: Represent the ParticleSystem component along with its emitters (e.g., ArrowEmitter, BombEmitter) and particles for effects.
• Settings & Utilities: Finally, add components that manage game settings (SettingsManager, SettingsValues) and various utilities (HUDUtilities, InventoryUtilities, etc.) that are used across multiple systems.
Relationships and Interactions
• Directional links from the Input/Controllers to the Commands component, and from Commands to the Entities (for instance, moving Link and triggering attacks).
• The GameCore interacts with the Room/Level Management module to drive transitions between rooms. The Room system in turn works closely with the Collision system to ensure proper physics and interactions.
• The Entities module should have a two-way connection with both the SpriteFactory and Collision system, indicating that each game entity is represented visually and is involved in collision handling.
• The HUD interacts with the GameCore to provide game state feedback, and the Settings component interacts both with the HUD and the GameCore.
• Finally, the XMLParsing module feeds data into Room/Level Management, establishing how game levels are constructed at runtime.
Architectural Patterns and Design Principles
• Component-Based Design: The project segments functionality into clearly separated components (e.g., Entities, Controllers, Collision, HUD, etc.) which makes the system modular.
• Separation of Concerns: The game logic is segmented into various aspects (e.g., rendering, collision, input) that communicate through well-defined interfaces.
• State Machines: Multiple state machines are evident for entities, particularly for Link and the enemies, and these should be highlighted.
• Command Pattern: The command classes are used to encapsulate actions, allowing flexible input handling.
• Data-Driven Level Loading: Mark the XMLParsing component as the driver for reading level data from XML files, which allows game levels to be data-driven.