Make the player jump in WoofJS
2D Game Design with WoofJS
🕑 This lesson will take about 10 minutes
In this lesson, you will learn how to create a basic 2D platformer game in WoofJS where you can make a player jump. You will also learn how to add ‘gravity’ to a game so the player falls back to the ground, as shown in the example below.
Create a new project at woofjs.com and use the following code to implement this feature. Make sure you pay attention to the comments in the code that explain how it works.