Special

Special Print Closeout!

We're clearing out the remainder of our print issues at fire sale prices -- as much as 75% off! Quantities are extremely limited and only available while supplies last. Hurry to take advantage of this one-time offer.

RBD Magazines

Once these printed back issues are gone, they are gone!

Article Preview


Buy Now

Print:
PDF:

The Topographic Apprentice

Shape Animation

An animation system based on Object3D's Shape property

Issue: 2.2 (October/November 2003)
Author: Joe Nastasi
Author Bio: Joe Nastasi is a full-time REALbasic consultant and the developer of A-OK! The Wings of Mercury and FTP Suite. He also wonders where the heck the last year went!
Article Description: No description available.
Article Length (in bytes): 10,246
Starting Page Number: 38
RBD Number: 2218
Resource File(s): None
Related Web Link(s):

http://support.realsoftware.com/feedback

Known Limitations: None

Excerpt of article text...

In this issue's column we will look at the code behind the major functions of the previously-defined classes. We won't cover the getter and setter methods unless they do more

than simply get or set a value.

AnimationClass -- Revisited

Before we start with the code, let's make a small change to the Animation Class that has major implications. Initially, I defined this class as a sub-class of a Timer. While this would work, it is not an approach that allows for easy integration with the other needs of a game loop, such as navigation, camera

control, and weapons control. AnimationClass is now a top-level class.

Not using a timer as a parent class does make it more difficult to control the speed of the animation on a pose-by-pose basis since we no longer can set the Period property. However, it is more important to have an easy way to integrate the Animation System into a game.

PoseClass Code

There are three important pieces of code in this class. First, we set up some properties:

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com