Power Up Jump

Remixing a Platformer Game - Power Up Higher Jump

power up higher jump

  • Name: Power Up Higher Jump

  • Description: The player is able to jump higher if they collect a token that acts as a way of powering up their abilities.

  • Need for Pattern: Having a Power Up Higher Jump is a way of increasing the interest and challenge of our game. The designer is able to create areas of the game that the player can only get to if they collect the power up.

  • Related Game Patterns: Add Static Enemy [related]

  • Coding Concepts involved: Data, Loops, Events

  • Links to other Computing Patterns: , Change Listener, Input Event, Systems Dynamics

How to implement this Pattern in MakeCode

Create our power up sprite

To create a power up we will replicate the for element loop used to display the Food elements on our game. So the first step is to duplicate that and to make changes to the values. You can find more detailed instructions on how to do this is the create static enemies pattern. To start change your level Tilemap design to add a new colour tile to act as our power up and change the design to include an area that the player would not be able to access with their normal jump.

power up higher jump

Follow the code pattern shown in the screenshot below to make the power up appear in our game. power up higher jump

Create a new Variable

To be able to change the jump height of our player we will need to create a new variable for our game. This will then be used when the player presses the jump button. To do this create a new variable called jumpVelocity and and set it to the value you have in your on A button pressed input listener.

power up higher jump

Change Input Listener

You can now replace the original velocity y (vy) value with this new variable.

power up higher jump

Create the new Variable Value

Then we will add a condition listener to see when the player is overlapping this power up. When they do we can make the power up dissappear and increase the velocity of the players jump. By increasing the value of the variable that we have just created.

power up higher jump

Test your Changes and Next Steps

Test your game to check that your changes have the desired behaviour and that there are no side effects.

To check that you are making the most of this pattern you can ask yourself the following questions:

  • Can you jump up to your target area only after you collect your power up?
  • Maybe you can make it tricky to access some areas when you have a higher jump, this increases the challenge by making the player be careful about the order they do things.

This Game Pattern is one of many allowing you to make improvements to your platform game and to learn coding and wider computing concepts. Find more on the Game Pattern page.