Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Panda3D 1.7 Game Developer's Cookbook
  • Table Of Contents Toc
Panda3D 1.7 Game Developer's Cookbook

Panda3D 1.7 Game Developer's Cookbook

close
close
Panda3D 1.7 Game Developer's Cookbook

Panda3D 1.7 Game Developer's Cookbook

Overview of this book

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

Moving objects based on time


While there is beauty in static images, and they add much to the world of games, in modern video games, action is typically the focus. Today's games are usually very dynamic, having the player and non-player characters moving through scenes containing stacks of crates that can be tossed around, dynamic obstacles such as moving platforms, or flocks of birds that are just there to make a level more compelling.

In this recipe you will learn to make things move around in your scenes and how to use the time that has passed as a parameter for creating the illusion of movement.

Getting ready

We will be using and extending the code created in the recipe Modifying the scene graph, so please take a step back and follow that tip before you haven't already tried that recipe.

How to do it...

It's time to get things moving. Let's animate the scene:

  1. Open Application.py and below the last line of code created in Modifying the scene graph, which is marked here, add the following lines...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Panda3D 1.7 Game Developer's Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon