Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / animating objects in dark basic pro

Author
Message
Mikeygd3
12
Years of Service
User Offline
Joined: 18th Dec 2013
Location:
Posted: 18th Dec 2013 21:15
I barely got into creating video games this year, so im a noob I guess. I need help putting my animated models from blender into dbpro. it would really help because I don't have a clue really. does it involve play object? thank you for your time if you help (:
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 19th Dec 2013 02:03
You're probably going to want to use loop object #, start, end where # is the object number, then your start and end frames are variables. That's how I do it anyway.
Put that in your loop and you can specify which frames to play after a key is pressed my modifying the start and end values, say if frames 10-20 are a jumping sequence. Hopefully that made enough sense.

New sig coming soon..
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 19th Dec 2013 09:32
I would advise taking a little time to learn the DBPro animation commands before doing anything too ambitious. Thing is, some objects need more work than others, like when you mix different actions in the same animation. A windmill for example only has to spin around, but a character would need to walk, run, jump, die etc etc.

I tend to use loop object for things like windmills, but a character I always do my own animation system and handle it with code. I might have mode 0 as idle, which might be a loop of frames 1-10, then walking could be mode 1, with a loop of frames 11-30... so I'd control the current frame number and the mode, and just worry about changing modes to suit the player actions. It takes a bit more thought and organization, but it's really the only way to make the most of animations. With DBPro, you can actually animated different parts of the model with different frames, so you can imagine how complex that would be... but being able to make legs run while arms do something else like swing a sword is really useful. You can also rotate limbs with code without necessarily breaking the animation, like rotating the torso to suit the aiming angle in an FPS. I think the best thing to do is just make yourself a test model, have it animated bouncing up and down, then experiment with the animation commands.

I am the one who knocks...
Mikeygd3
12
Years of Service
User Offline
Joined: 18th Dec 2013
Location:
Posted: 19th Dec 2013 20:07
So using mode, how would you code that? And with limbs, do I use a different model for each limb?
Mikeygd3
12
Years of Service
User Offline
Joined: 18th Dec 2013
Location:
Posted: 19th Dec 2013 20:25
@wattywatts
I tried using loop object and using frames. Can you show me some code how?
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 20th Dec 2013 11:44
Hi there
@Mikeygd3

You can use your animation from blender exporting to .x
You could make a test using this piece of code:



There are some wierd loading animated objects from Blender specially if they are animated with bones.

You can find more information here.

http://forum.thegamecreators.com/?m=forum_view&t=209097&b=1

Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-06 07:52:31
Your offset time is: 2026-07-06 07:52:31