Basic Animation Principles by MikeS17th Mar 2004 17:36
|
---|
Summary Learn about animation in darkbasic pro. Description Learn about animation in darkbasic pro. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com ` This tutorial was created by Yellow -Mike- 3-12-04 ` Although not necessary, it would be nice to be credited and ` notified at yellow1dbp@hotmail.com if this was used in a game ` Thanks, and I hope the tutorial helps. `Animation Tutorial `You'll need an animated 3D model for this tutorial. sync on : sync rate 60 `Set our screen refresh rate backdrop on `Sets up the 3D display remstart The object we'll be loading. Only certain object formats contain animation. .X,.mdl for example, both contain animation support inside them. .3ds however, does not.(Except in a few exceptions) remend load object "Put the object's file path here.",1 do `In our loop to view the animation we have a few choices. `We can either 'loop object' the animation(continually play it) `or just 'play object'(plays through animation cycle once) `For this tutorial, we'll use loop object. loop object 1,0,90 `You'll have to input the animation frames. `Sometimes the animation plays too fast or too slow. `You can set the animation speed to fix this problem.(0-100) set object speed 1,50 `Finally, we conclude by getting the animation frame. `This is helpful so we know what keyframes will play. set cursor 0,0 print object frame(1) sync loop `You now know how to get animated objects into Dark Basic Pro. `This tutorial can also be combined with the button tutorial, `to create an 3D/animation viewe. `Hope this helped `Copyright(c) CurvedBasic 2004 |