-
Notifications
You must be signed in to change notification settings - Fork 0
Player Double Jumping Functionality
While jumping, the player can hit SPACE
at the apex of their jump to perform a double jump.
The Double Jumping functionality is closely intertwined with the Player Jumping Functionality. The Double Jump makes use of the DoubleJumpComponent
class to control the players' state, detect collisions and trigger the players' descent.
The DoubleJumpComponent
has an enum to store the players' JumpingState
public enum JumpingState {
LANDED, JUMPING, DOUBLE_JUMPING
}
There are also an array of other variables to store jump-related information, including
-
JUMP_HEIGHT
: the 'height' of the players jump. Changing this variable changes how strictly the player jumps upwards with respect to their current direction -
jumpStartTime
: the time the player started their jump. -
isJumping
: whether or not the player is jumping. -
jumpState
: the players' jumping state. (LANDED
,JUMPING
orDOUBLE_JUMPING
)
To determine when the player has LANDED
, physics collisions are used. In the DoubleJumpComponent
's create
function, a listener for collisionStart
is added to the DoubleJumpComponent
's onCollision
function.
Upon collision, the player is set to LANDED
if their collision was with something beneath them, otherwise they are still considered to be jumping.
The jumping mechanism is dictated by the DoubleJumpComponent
s JUMP_TIME
variable. On every frame, if the total JUMP_TIME
has elapsed, the KeyboardPlayerInputComponent
handleFalling
function is called to bring the player back down (Details can be found on the Player Jumping Functionality Wiki Page).
- Player UI
- Popup Menus
- Obstacles
- Boss Enemies
- Progress Tracker
- Checkpoint Design and Functionality
- Score System
- Lives System
- Game Background
- Multiple game-level
- Visual Improvements
- Tutorial Level
- Character Design and Animations
- Character Damage Animations
- Player Animation Functionalities
- Player and Serpent Portal Transition
- Pop-up Menus
- Obstacles
- Lives & Score User Testing
- Buffs & Debuffs
- Buffs & Debuffs redesign
- Obstacle Animation
- Background Design
- Level 2 Background Appearance
- Enemy Monster User Testing
- Level 1 Floor Terrain Testing
- Introduction Screens User Testing
- Character Movement Interviews & User Testing
- Sound user testing
- Level 2 Obstacles and enemy
- Story, Loading, Level 4 and Win Condition Sound Design User Testing
- Giant Bug and Purple Squid animation user testing
- General Gameplay and Tutorial Level User Testing
- Level 4 Terrain User Testing
- Game Outro User Testing