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.

Dark GDK / How Do U Guyz Play Animations?

Author
Message
Sana_Sajjad
11
Years of Service
User Offline
Joined: 9th Jul 2012
Location:
Posted: 9th Jul 2012 11:40
Hello, Just Downloaded the DarkGDK and its update. I am trying to make a simple 3d game. I followed the Samples of DarkGDK. But i found that dbPlayObject(iD); and bdLoopObject(iD); is not working. I searched in forum, found some related threads and some codes in them, but none of them are working. So the big question is How to Play animation of 3D model????
haliop
User Banned
Posted: 9th Jul 2012 14:05
its a bit simplier then thought.


you have the command dbSetObjectFrame(id,frame) , with this you can play your animation



try it see how it goes
you could also add a timer for the frame swapping
or calculate it with the FPS ... you'll get it ,


simple.

nadav.
Sana_Sajjad
11
Years of Service
User Offline
Joined: 9th Jul 2012
Location:
Posted: 9th Jul 2012 17:42
but how do I loop a specific number of frame...like I have a model.x and it has 6961 key frames in 3ds max...in which some idle walk and run animations...how can I loop the idle state of object... are u getting my point?

=============================================================
G!rLz CaN C0d3 GaM3s....!!!!
=============================================================
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 9th Jul 2012 19:35
I think animations are screwed up in pre-2.0 versions, so you must use dbSetObjectFrame instead.
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 9th Jul 2012 20:18 Edited at: 9th Jul 2012 20:27
You have to make the animation update through the class, I made an object class to play and loop animations like GDK used to.

CObject.h

CObject.cpp


It uses a struct to hold info about the model it is using. It is far from complete but the play and loop animation fuctions should work. You have to call CObject.animateObject(curTime) in the loop. Using it should look like this:



You will have to replace "ObjectResource->Pop();" and "ImageResource->Pop();" with your own resource mangment function or you can also use techlords: http://forum.thegamecreators.com/?m=forum_view&t=166572&b=22&msg=1970286#m1970286
Sana_Sajjad
11
Years of Service
User Offline
Joined: 9th Jul 2012
Location:
Posted: 9th Jul 2012 22:15
can I do it like this?

and same for image resources...
and where to define these funtions?

=============================================================
G!rLz CaN C0d3 GaM3s....!!!!
=============================================================
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 10th Jul 2012 02:26
You can do it like that, and you can define the functions where ever you want.

Login to post a reply

Server time is: 2024-03-29 12:45:55
Your offset time is: 2024-03-29 12:45:55