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 / Problems with object animation

Author
Message
Vlad
19
Years of Service
User Offline
Joined: 5th Oct 2005
Location:
Posted: 24th Jan 2006 15:35
Hi mates

I have an X file with animations in it. I can see the animations in the DirectX viewer, I know the animations are bone based, so I think everything should work right.

I read a thread on the forums about object animations that was a bit unconclusive and I can't get it too work.

For the purpose of my game, the best approach would be to have control over the frame I'm using for each object. This is due the fact that I have a board with 39 cloned objects and to give it a natural feel, I want each one on a diferent frame of a given animation. I tried something like this inside a function:



and later on a dbSync() occurs. But the object is in it's standard 0 frame, never moving.

From what I've read, I could use a dbObjectLoop. I don't get why there is some code written like this:



But it does not work, not only that but I would have no control over the frame where I'm at. But I would be happy if I could get any animation to work at this time.

I tried other approachs, like setting the object animation speed before the animation, nothing ever happens. The object never does anything. It's just froze.

I have a function that makes the object rotate when the mouse-hovers it. That works wonders. Anything that is related with the object's frames and animations, doesn't.

I have the feeling this is some kind of newcomer problem that maybe someone has faced, but I tried so many things that I really have no idea what is happening and my brain is starting to fry behond help.

Sorry if the command names are wrong and the lack of actual code, but I'm at work and the project files are not here.

Thank you for any help.

V

The only lazy people that can complete games are genius. You don't look like a genius, so you better stop being lazy.
Support your local Riker 9 Chapter.
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 24th Jan 2006 19:38 Edited at: 24th Jan 2006 19:56
i also ran into a lil confusion, so i decided to do it this way...
(object number 6 is being animated...)

***** oooops, just noticed this is the sdk forum *******
*****
***** the code below is in DarkBASIC Pro, but it
***** should still be helpfull seeing as the commands
***** are so similar
*****
********************************************************

in the main loop...



346 is the total number of frames... and the value at which you increase anx# determines how fast it runs...

using this method you could tag each section of animation and jump directly to it depending on what you need the object to be doing...

good luck

--Mike
Vlad
19
Years of Service
User Offline
Joined: 5th Oct 2005
Location:
Posted: 25th Jan 2006 01:10
Thank you Red Ocktober. I'm going to try something of that sort, but I found out what the problem was.

I wrote a viewer to understand how this all thing works and it was quite entertaining and severly brain-damaging. But it works.

Thank you for the tip.

V

The only lazy people that can complete games are genius. You don't look like a genius, so you better stop being lazy.
Support your local Riker 9 Chapter.
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 27th Jan 2006 00:25
Hi Vlad .

Could you provide the viewer or its code, to give me and others more insight in what you learned by that; this would be really nice!


Btw I am having also a problem with an obect that is bone-animated.
when running in Debug mode it is shown and animated.
but when I build the Release version it doesnt show up.

First I thought its because it cant find the file, but I provided an absoulte path to it, and even when I put it in the same as the exe (with changed source code), it would not show up!

And last but not least, when running in window mode I get over 1200fps with that object, but when setting to windowOff, I only have 60. Ah now I remember, this could be due to the monitors vertical sync rate... can't I disable the wait for that in DBP??
dbSyncRate(0) doesnt seem to do it..

Thanx for all your help!!!!

greets,
Barnski.

-- I just started with DarkSDK, by translating DBP Projects. So please be patient when helping me thanx! --

Login to post a reply

Server time is: 2024-11-19 04:33:58
Your offset time is: 2024-11-19 04:33:58