-
Notifications
You must be signed in to change notification settings - Fork 0
Player Gravity
SirAardvark edited this page Aug 30, 2021
·
2 revisions
Player gravity is added so when the user jumps they have something to bring them back to the ground.
The amount of gravity can be changed however it must also be changed in KeyboardPlayerInputComponent
If we want to change gravity during a game a GravityComponent
will need to be made to update it for all functions.
All code is in PlayerActions
The old way player movement was initiated:
OLD VARIABLE - private Vector2 walkDirection = Vector2.Zero.cpy();
The new way player movement is initiated. The player is added with -1f (1 m/s force downwards) instead of not moving on spawning.
The gravity variable is used to check the player is not moving. e.g. not moving up, down, left or right.
// Sets gravity to 1 m/s for comparing
private static final Vector2 gravity = new Vector2 (0, -1f);
// Sets player movement and adds gravity of 1 m/s
private Vector2 walkDirection = new Vector2 (0, -1f);
Anywhere that used the below has been replaced with (mostly in KeyboardPlayerInputComponent
)
// OLD
variable = Vector2.Zero;
// NEW
variable = gravity;
- 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