Repository navigation
Menus
The game includes four menus: the main menu, pause menu, settings menu, and save/load menu, each of which comprises at least two components - a Display component that handles the graphics and UI elements, and an Actions component that handles the functionality of each menu, which typically is triggered by buttons or other menu components, and typically results in an event being broadcast.
The main menu is implemented as its own screen, and allows the player to navigate to one of three screens - MainGameScreen, LoadSaveScreen, or SettingsScreen - or to close the game. The menu has four buttons:
-
Playnavigates to theMainGameScreen, allowing the player to start a new game. -
Continuedisplays theLoadSaveScreen, allowing the player to return to an existing game or delete a save file. -
Settingsdisplays theSettingsScreen, allowing the player to modify the game's settings -
Exit Gamecloses the game window and terminates the game process.
The pause menu is accessible from the MainGameScreen, and from the Cyclops and Blackjack screens, via the ESC key. While the pause menu is displayed, the game is paused, preventing all entities from moving or otherwise updating (see Entities/Pausing Entities for more information). The menu has four buttons:
-
Continuecloses the menu and unpauses the game (this can also be done by pressing theESCkey a second time). -
Settingsopens theSettingsMenuDisplayInGame, which allows the settings menu to be accessed without switching screens (which would result in the game state not being preserved). -
Controlsdisplays a graphic allowing the user to view the game's keybinds. -
Exitreturns the player to theMainMenuScreen.
The pause menu is also used by the minigame screens. The Cyclops minigame opens it with Esc (it has no pause button), hides the Controls button and shows the cave background behind Settings. The Blackjack screen opens it with Esc or its Pause button. While the menu is open in the Cyclops minigame, the looping snoring and walking sounds are paused and then carried on when the menu closes.
The settings menu is accessible in one of two ways - either as its own screen via the MainMenuScreen, or as an overlay from the MainGameScreen. In either case, the layout and visuals of the menu are identical. The setting menu allows the player to modify the following game settings:
-
FPS Caplimits the maximum framerate of the game for a more stable, but possibly slower, framerate. -
Full Screentoggles windowed vs. full-screen display modes. -
VSynctoggles vertical synchronisation, synchronising the graphics card's frame rate with the monitor's refresh rate to reduce screen tearing. -
Volumescales the game's volume, including background music and sound effects. -
Resolutionchanges the game's windowed resolution.
The menu also contains the following buttons:
-
Applysaves and applies the currently selected settings -
Exitreturns to theMainMenuScreenif settings was accessed from there or closes the overlay if the menu was accessed from the pause menu.
The save/load menu is accessible from the MainMenuScreen via the Continue button, or via the Play button if save data already exists. The menu allows the player to return to one of three saved game states. Clicking on one of the three save buttons will load that save, while clicking the corresponding X icon will delete that save (after a confirmation prompt). Only three save files can be saved at a time - once all three slots are full, the player can only continue from an existing save or delete one of their saves to start a new game. The Back button returns the player to the MainMenuScreen.
Entities and Components
Input Handling
Arrow Selection Wheel Arrow Selection Wheel — Sprint 3
Game Screens and Areas
Enemies
-
Individual Enemy Pages:
-
Misc Enemy Pages: