Skip to Content

Using Loops to Make a Gravity System (for Video Games)

In this lesson you will build a gravity system that can be used in video games. When a character jumps, they will move in the air 10 spaces then gravity will pull them back to the ground

In this lesson you will build a gravity system that can be used in video games. When a character jumps, they will move in the air 10 spaces then gravity will pull them back to the ground. In other examples we have used keyboard control blocks to send a message to move a character up and down. This is NOT what we will do with this program. In this example, we will use a process called “looping” that will do this for us automatically. While this is much more difficult to program (and understand) it is much more realistic and gives a game a more natural feel.

Other Files: