A simple 3D horror game. You have to collect all the keys on the map before the Evil Pumpkin catches you
This education project demonstrates the implementation of Model-View-Presenter (MVP) architectural pattern along with Composite Root in Unity
- WASD (Movement)
- Mouse (Camera)
Scripts/
├── CompositeRoot/ - Composition root that wires all components together
├── Input/ - Input handling system
├── Model/ - Game data and business logic (pure classes)
├── System/ - Core systems and services
└── View/ - Presentation layer (Unity GameObjects and UI)
In this project:
- Model: Contains game data and business logic (domain layer)
- View: Handles visual representation and user input (presentation layer)
- Presenter: Mediates between Model and View (application logic layer)
The Composite Root pattern is used to:
- Centralize object composition
- Manage dependencies between components
- Initialize the entire object graph in one place
-
Initialization:
- The
CompositeRootscript creates and wires all components together - It resolves dependencies between systems, models, and presenters
- The
-
Data Flow:
- User input is captured by the
Inputsystem - Input events are processed by presenters
- Presenters update the Model and notify the View
- View reflects the current state from the Model
- User input is captured by the