O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Simple Jumping

Jumping is an integral part of many different types of games and can be achieved quite easily in Blitz3D. Whether it’s your character jumping over obstacles, hurdles, or bad guys, the process of creating a bounce is fairly easy. I called this section “Simple Jumping” because it creates a code that will have an object jump only when a key is pressed on the keyboard. We haven’t added any extra parameters. For example, the shape in this example doesn’t have to be on the ground in order to jump; it can actually jump again midway through the first jump.

In order for jumping to work in this example, we need to have gravity already created on our object. Refer back to the previous section for information on creating gravity. Open the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required