The Articulated Figure Application


Pros and Cons of Keyframe Animation

The advantage of using multiple models is they can be designed and created outside of Java 3D with software specific to the task (I used Poser). Model creation can be carried out independently of game development, perhaps assigned to someone skilled in 3D modeling. An animation sequence is a combination of poses, which you can mix and match. For example, the poses needed in a fighting game will be different from those in a sports game.

Several Java 3D loaders support keyframe animation. For example, the NWN loader (http://nwn-j3d.sourceforge.net/loader.about.php) defines animations as frames sequences which refer to the Never Winter Night models. Playing an animation consists of calling the loader's playAnimation( ) method with the name of the animation sequence. You'll find a list of all the keyframe animation loaders in Chapter 14.

A major drawback is the potential size of each model and the number of models required to cover all the necessary positions. I chose the simplest figure (size 20 KB) and a small number of poses (13), coming to 260 KB, which must be loaded at startup. These numbers could become unmanageable with larger models and more poses, but that depends on the application. One means of reducing the memory requirements is to share poses between the sprites (by using Java 3D SharedGroup nodes), which would be useful for groups of similar sprites, such as soldiers. This would require changes to the implementation detailed in this chapter.



Killer Game Programming in Java
Killer Game Programming in Java
ISBN: 0596007302
EAN: 2147483647
Year: 2006
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net