realbasic-games
[Top] [All Lists]

Animation Builder a1

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Animation Builder a1
From: Lo Saeteurn <realbasic at miensoftware dot com>
Date: Sun, 17 Jul 2005 09:36:39 -0700
Delivered-to: realbasic-games at lists dot realsoftware dot com
Finally add animation to your RB games with ease!!!

This is only a test build. If you decide to implement the animation classes, please be warned that this has not yet been tested in game so be sure to backup your original code. Not all features have been implemented.

Included is a sample animation with 4 different animation states in all 3 levels of detail. Please do not use my sample zombie animation in your project. You may test with it, but not use it. It is only there for demonstration.

Download (source code included):
http://www.miensoftware.com/files/rb/3Danimationbuilder.zip


How easy is it to use?
1. Add the Animation3D classes to your project
2. Make sure the super classes of all the objects you want animated is an Animation3D 3. Load the animation you created using the Animation Builder by calling .LoadFromFile(f as folderitem) 3. Call the .UpdateAnimation(timepassed as double) in your game loop to update the animation 4. Call the Play, Stop, and SetAnimationState(name as string) methods to control your animation



Support for Level of Detail:
- Set the level of detail in game with the method:
        SetLevelOfDetail LOD//1=High 2=Medium 3=Low

Checking the state of your animation:
- Animation3D.isPlaying as boolean
- Animation3D.SelectedAnimationName as string
- Animation3D.SelectedAnimationIndex as integer

Playback options for AnimationState:
- AnimationState.isLooping as Boolean
- AnimationState.isReversed as Boolean
- AnimationState.isLoopBackAndForth as boolean
- AnimationState.SetPosition(Time as double)
- AnimationState.SetFrame(frame as double)
- AnimationState.FrameCount as integer

Cloning:
Animation3D.Rebuild as Animation3D


Notes:
The 3D Animation Builder uses the MBS Plugin collection for the multi- folderitem dialog box. If you would like to modify the code, make sure you have the MBS plugin or remove that section of code and replace it with the standard single folderitem dialog box.

Author:
Lo Saeteurn
lo at miensoftware dot com
www.miensoftware.com

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>