Day and Night Cycle Summary - UQdeco2800/2022-studio-1 GitHub Wiki

Page Navigation

Jump to a section

Summary

The day/night cycle is important to the game loop for Atlantis Sinks as it drives gameplay, allowing enemies to spawn at night and progression towards the game's win condition (surviving all four nights). The cycle also allows restrictions to be placed on player actions, such as buildings only being able to be placed during the day, and on how the crystal can heal.

The implementation of the cycle itself is broken up into three main sections: a service, a game filter, and a clock UI element.

Day and Night Cycle Service

The day and night cycle service uses GameTime to leep track of the current day, time and part of day/night cycle. This then triggers events that inform other components of the game to perform actions based on what stage of the day the game is in (e.g. enemies can spawn at night).

See here for more details.

Day and Night Cycle Filter

The day night cycle filter is represented by a component in the codebase called DayNightCycleComponent.java. It is responsible for giving the dawn, day, dusk and night look of the game. Underneath, it uses OpenGL Shader Language files to accomplish the shading. It hooks in to the game rendering cycle to apply the shading all the while making sure to avoid shading UI components.

See here for more details.

Day and Night Cycle Clock

The design of the day and night cycle clock follows the agreed upon design principles to allow for a consistant game design. More information on the design of the clock and its ideation for Atlantis Sinks may be found here!

Clock Testing & Validation

User Testing was completed in order for user expectation to be recognised in regard to the clock implementation and design! This paved the way for the various design fidelities.

Day and Night Cycle Clock UI

See here for more details.

Sprint 4 User Testing

User Testing was completed within sprint 4, testing commencing before changes were made (pre user testing) to recognise user expectations and thoughts regarding the already implemented day and night cycle and the associated features. After obtaining valuable information about points of improvement and validation, changes were implemented to then another round of testing was conducted (post user testing)