Chapter 20. An Articulated, Moveable Figure

This chapter describes the implementation of an articulated figure (sprite), composed of moveable and rotatable limbs, which can be instructed to walk, run, and jump around a checkerboard floor.

Tip

This work is based on the first part of a student project carried out for me by Thana Konglikhit in 2003-2004.

Chapter 19 was concerned with sprite animation but used the keyframe animation of multiple models. Advantages of figure articulation over keyframes include the increase in control over the figure and the reduction in memory requirements since only one model is being manipulated.

A disadvantage of articulation is the model will probably be a Java 3D creature of cylinders, spheres, and blocks, which must be “dressed” in some way. This will usually necessitate the loading of 3D models, which may bring back the problem of excessive memory usage.

Another issue is the increased complexity of the control code, which requires some mechanism for coordinating the movement of numerous TransformGroups; for instance, a single step forward will affect many joints, and the exact changes needed aren’t obvious. I utilize forward kinematics in this chapter.

There are several ways of extending the basic articulation technique, including the use of mesh deformation, morphing, and skinning, which I briefly mention at the end.

The Articulated Figure Application

The Mover3D application demonstrates the articulated figure approach.

The lefthand picture in Figure ...

Get Killer Game Programming in Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.