Week 4: Pounded!
Ground Pound
To get ground pound working meant reworking the entire ground check system. Instead of using the dot product to check if the player is grounded, a series of three raycasts shot downward from different location on the player is now used instead. When the player collides with the something the IsBelow function is called which performs those raycasts, if the player is colliding with something below them, we then check if the collision object is the ground and if the player is in the act of ground pounding. If they are we then call the functions Smash and Start Smoke, reset their bools for IsGrounded and IsDown, and reset their mass and jumps available. If the player is not ground pounding the functions are not called. The Smash function creates an array storing colliders tagged as player that are with the area of effect, using a for loop the TakeDamage and damage Flash functions are called and knockback is applied to all players that are not the initiating player. The StartSmoke function calls the Smoke script to enable the sprite renderer on the smoke effect and play the animation, it then disables the sprite renderer. StartSmoke also calls the StartShake function, which is part of the CameraShake script, in this script the Shaking coroutine is started which moves the main camera's position based on an animation curve to create the screen shake effect.
Mass Powerup
The mass boost power up works the same way as the other powerups mentioned in the other previous devlog. The only difference that it also effects the player's jumpForce as well so the player can still jump normally while their mass is increased.
Warp Zone Fade
When a player interacts with a warp point, the FadeOut coroutine starts which fades the players opacity down to zero via a for loop before moving them to the new warp point where the FadeIn coroutine starts which just does the opposite of FadeOut and brings their opacity back up to one.
Powerup Sprites and Indicator
Feedback from last week brought up that the powerups were not clear on what they would do for the player. So, I made custom sprites for each of them to make them more obvious. An addition was also made to the player UI at the top of the screen to indicate if a player has a powerup active. This uses a new function on the UIContainer script called UpdatePowerup, which sets a UI image to that of the powerup that is active, this function is called when a powerup is enabled and then disables when the powerup timer expires.
Retro Rumble
Throwback Mayhem!
Status | Prototype |
Author | Zack Pianta |
More posts
- User GuideMay 26, 2023
- DocumentationMay 26, 2023
- Week 5: Particle TimeMay 22, 2023
- Game TestingMay 16, 2023
- Week 3: Powered Up!May 16, 2023
- Week 2: More Stuff!Apr 28, 2023
- Player MovementApr 23, 2023
- Concept LogApr 13, 2023
Leave a comment
Log in with itch.io to leave a comment.