Book Image

Panda3D 1.7 Game Developer's Cookbook

Book Image

Panda3D 1.7 Game Developer's Cookbook

Overview of this book

Table of Contents (20 chapters)
Panda3D 1.7 Game Developer's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Controlling actions using intervals


The gameplay of many great video games is defined by certain movement patterns as well as their speed and timing. For example, each of the ghosts in Pac-Man has its own and unique way of hunting the player. Another great sample for gameplay-defining movement patterns can be found in Half-Life, where a Headcrab, the simplest type of enemy, tries to attack directly from the front, while fighting Marines is harder as they are taking cover and try to flank the player.

Without the proper tools, defining such action sequences can be a very time-consuming and tedious task that often requires an experienced animator or games designer to make them seem natural and compelling. But with Panda3D and its intervals system, this won't be a problem for you after reading and working through the following recipe.

Getting ready

The following code and steps build on top of Setting up the game structure found in the Chapter 1, Setting Up Panda3D and Configuring Development Tools...