Details of Space Intruders architecture. Last updated 8/7/2024
Systems
Scenes
5 Scenes:
- GameScene
- Handles the gameplay loop of the game itself
- With the addition of Cards, GameScene should hold UI elements for selecting cards and managing the game state
- Includes the player vs alien game and determining a victory or a loss
- ManagerScene
- The first scene to be loaded
- Involves loading and unloading of other scenes
- Uses Listeners to decide the loading or unloading of scenes
- Involves metadata of the GameScene such as pausing and resuming time
- Prepares setup for the GameScene
- MainMenuScene
- Involves simple main menu features and UI
- Does not handle the process of loading or unloading the GameScene, but can tell the process to start
- PlayerWinScene
- Involves simple UI for playing again or going back to the main menu
- Currently holds Cards though that should be moved to GameScene
- When PlayerWinScene should be shown is not determined yet (upon completion of a level, the player selects cards instead of being shown victory)
- PlayerLossScene
- Simple UI for playing again or going back to the main menu
Managers
- SceneManager (ManagerScene)
- Handles the functions for adding, removing, and setting active scenes
- Generally unloads all scenes (except manager) and loads desired scene
- Also has quit game function
- GameManager (ManagerScene)
- Manages meta details of the game
- Currently just handles the pause and unpause of the game
- StatsManager (ManagerScene)
- Handles the loading of creature stats.
- Currently only handles resetting player, alien, weapon, and bullet stats
- AlienManager (ManagerScene)
- Manages functions for calling a victory event (when all aliens are dead)
- Also manages spawning of aliens for a level
- Inconsistently with the other managers, holds its own listeners
Events, Parameterized Events, and Listeners
Events
- A ScriptableObject that should be attached to other scripts.