The code should be pretty self-explanatory.
This just shows the concept for what I'm planning on doing, and from what I can tell it works thusfar.
What it does is it uses limbs for individual frames of an animation and animates off that.
Tell me what you all think!
Constructive criticism only, please.
Rem Project: limbsanim
Rem Created: Friday, September 30, 2011
Rem By: Ryan "Da_Rhyno" Lloyd
Rem ***** Main Source File *****
// Get proper display mode, and let us control the drawing in the app.
SET DISPLAY MODE 640, 480, 32
SYNC ON : SYNC RATE 60
// Turn off autocam and let us set the LookAt ;-)
AUTOCAM OFF
POSITION CAMERA 0, 0, -15
POINT CAMERA 0, 0, 0
// We start off by making our primary object and positioning it.
MAKE OBJECT CUBE 1, 1
POSITION OBJECT 1, 0, 0, 0
// Then what we do is set up a temporary object to make a mesh
// from, then make a limb from that mesh, and set the limb's
// offset from the object. Then we delete the temporary object
// and mesh and hide all the next limbs (which are being used
// in this case as "frames").
//
// This might not seem too practical with how we have it set up,
// but it's the basis for what we're going to do next: Load in
// objects and set them up via VertexData, and then create their
// "frames", or in this case limbs via the same method as the objects.
//
// It should work well. =)
For i = 1 To 100
MAKE OBJECT CUBE 2, 1
MAKE MESH FROM OBJECT 1, 2
ADD LIMB 1, i, 1
OFFSET LIMB 1, i, i*.1, 0, 0
DELETE MESH 1
DELETE OBJECT 2
HIDE LIMB 1, i
NEXT
// Our variables, "i" is the frame count and fps is used to make sure
// we're running at a near-consistent frame rate for our animation.
i = 0
fps = TIMER()
// Our main loop, in which the first things we check are to make sure
// that our animation has a steady frame rate, and also to make sure
// we're not going past our frame bounds.
// For each new frame, we hide the previous limb, then we increase the
// frame count and show the new limb.
// Simple as... pie? Mmmm... pie.
DO
IF (TIMER() - fps) >= 17
IF i > 99
HIDE LIMB 1, i
i = 0
ENDIF
fps = TIMER()
HIDE LIMB 1, i
i = i + 1
SHOW LIMB 1, i
ENDIF
SYNC
LOOP