Skip to content

StatusEffects

Kevin-Au-Duong edited this page Sep 15, 2021 · 13 revisions

Status Components

A UML link was created before coding commenced. This laid out the design plans of the classes clearly, allowing all of the team members to work on the code efficiently (i.e. Not wasting time making classes that have already been defined).

UML diagram initial

More classes and slightly increased coupling was required in the end after the design of the UML diagram. Some examples of the added classes were the statusEffectTask class and statusEffectsConfig class. The StatusEffectComponent class was also renamed to StatusEffectController to remain consistent with other similar classes used when creating entities.

Removing entity once run into

Disposing of the statusEffect entity upon player collision proved harder than expected when running the entity.dispose method returned an error which broke the game. To fix this we set the entities scale to be -0.01f which make the entity appear invisible. This left a bug where the entity's collision size remained the initial size (so the player has to jump over it). We fixed this by changing the collision state of the entity to true so that it falls through the floor.

Initialising StatusEffects

Initialising the statusEffect was implemented in the StatusEffectOperation class. This class is called from the StatusEffectsController class (which contains a method that runs when the the player has collided with a statusEffect). The StatusEffectOperation class works as described by the UML above with minor alterations. These alterations include additional methods in the StatusEffectOperation class (one for each statusEffectEnum) as well as additional attributes created (e.g. A static array called originalValues made to save the original values). Each method calls its respective Enum from StatusEffectEnum class which has a Boost method Overridden. The statChange Method has also contains minor alteration form the UML diagram in that there are now three method variables (with the addition of the OriginalValue which is the original speed or jump value).

About StatusEffects

Speed Debuff and Buff

Increases the speed by the amount specified from the enum's attribute statChange in SPEED (currently 5) This lasts for the duration specified from the enum's attribute statDuration in SPEED (currently 4 seconds) The new speed value is calculated through the statChangeMethod which is the original value plus the boost or minus the boost.

Jump Buff

Increases the jump by the amount specified from the enum's attribute statChange in JUMPBUFF (currently 200) This lasts for the duration specified from the enum's attribute statDuration in JUMPBUFF (currently 4 seconds)

Stuck In The Mud

Sets the players speed to 0 so that they cannot move. This lasts for the duration specified from the enum's attribute statDuration in STUCKINMUD (currently 3 seconds)

Void Stop

(Note: This was implemented slightly different to the above methods as we required an instance of the voids entity. Therefore the code for this method was created in TheVoidController class, made public static and called from the StatusEffectOperation class) Sets the void's speed to 0 so that it does not move. Reverts the void's speed back to normal after 3 seconds. This lasts for the duration specified from the enum's attribute statDuration in VOIDFREEZE (currently 3 seconds)

Interference

(Note: Has not been implemented in this sprint) Should obscure the players (your) view of the game for a certain duration of time.

Table of Contents

Home


Game Design

Game Design Document

Void/Antivirus

Loading Screen

Game Sound

Menu Assets

Player Design

     Original Design

     Final Design


Gameplay

Movement

Jumping & Sliding

Jump Pads

Portals & Bridges

Buttons

Pick-Ups

Physics

    Momentum & Physics

    Gravity

    Collision


Level Design

Level 1

     Background

     Textures

     Map Design

Level 2

     Background

     Textures

     Map Design

Level 3

     Background

     Textures

     Map Design

Level 4

     Background

     Textures

     Map Design


Sprint Round-Up

Sprint 1 Summary

Sprint 2 Summary

Sprint 3 Summary

Sprint 4 Summary


User Testing

Testing Plans

Sprint 1

     Team 1
     Team 2
     Team 3
     Team 4
     Team 5

Sprint 2

     Team 1
     Team 2
     Team 3
     Team 4
     Team 5

Sprint 3

     Team 1
     Team 2
     Team 3
     Team 4
     Team 5

Sprint 4

     Team 1
     Team 2
     Team 3
     Team 4
     Team 5

User Testing

Sprint 1

     Sprint 1 - Game Audio
     Sprint 1 - Character Design
     Sprint 1 - Menu Assets
     Sprint 1 - Map Design
     Sprint 1 - Void

Sprint 2

     Sprint 2 - Game Audio
     Sprint 2 - Character Design
     Sprint 2 - Menu Assets
     Sprint 2 - Interactable Design Animation
     Sprint 2 - Levels 1 & 4, and Level Editor
     Sprint 2 - Proposed Level 2 & 3 Designs
     Sprint 2 - Current Game State

Sprint 3

     Sprint 3 - Menu Assets
     Sprint 3 - Map Design
     Sprint 3 - Score Display
     Sprint 3 - Player Death and Spawn Animations
     Sprint 3 - Pick Ups and Pause Screen

Sprint 4

     Sprint 4 - Gameplay
     Sprint 4 - Game UI and Animation
     Sprint 4 - Level Background and Music
     Sprint 4 - Game User Testing
     Sprint 4 - Final Game State Testing


Game Engine

Entities and Components

     Status Components
     Event System
     Player Animations Implementation

Level Editor

Level Saving and Loading

Status Effect


Defunct

Development Resources

    Getting Started

Entities and Components

    Level Editor (Saving and Loading
         Multiple Levels)

    Service Locator

    Loading Resources

    Logging

    Unit Testing

    Debug Terminal

Input Handling

    UI

    Level Saving/Loading

    Status Effects

    Animations

    Audio

    AI

    Physics

Game Screens and Areas

    Terrain

    Concurrency & Threading

    Settings


Troubleshooting

MacOS Setup Guide

Clone this wiki locally