O'Reilly logo

DarkBASIC Pro Game Programming, Second Edition by Joshua R. Smith, Jonathan S. Harbour

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

Angular Motion

Angular motion is an interesting technique for moving sprites in a realistic manner on the screen. Traditional methods of sprite movement, where the position of the sprite is updated based on a fixed velocity, tend to produce games with a very limited and unrealistic level of gameplay. Typically, sprites that do not use angular motion are limited to only eight directions of travel. Figure 16.13 shows an example of an airplane with this limitation.

Figure 16.13. A sprite with only eight directions of movement is very limited.

Another example is the tank sprite shown in Figure 16.14, which also has eight directions of travel, but ...

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