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 / Frame rate independent movement

Author
Message
ByronAJ
22
Years of Service
User Offline
Joined: 16th Jan 2003
Location:
Posted: 16th Jan 2003 18:42
How is smooth framerate independent movement achieved in DBPRo?

Normally we do a QueryPerformance counter to get the time period taken to render the last frame and use this as a delta in any animation so that no matter what the frame rate the animation will be constant - is this possible in DBPro?
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 16th Jan 2003 19:12
yes - there is something about this a few pages in.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
ByronAJ
22
Years of Service
User Offline
Joined: 16th Jan 2003
Location:
Posted: 16th Jan 2003 19:52
Can you post up a link?

I have had a look and there are lot of pages to wade through...

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Jan 2003 20:00
It's here : http://www.darkbasicpro.com/apollo/view.php?t=4533&b=1

I've now got it coded into my utility DLL as a third party command with a few other bits and pieces added too.

I've not uploaded it yet as I want to add some more stuff - It'll be out sometime this weekend hopefully - source included.
ByronAJ
22
Years of Service
User Offline
Joined: 16th Jan 2003
Location:
Posted: 16th Jan 2003 20:04
Okay, you would do it through an extension DLL - I can live with that..

I only have the 'lite' version in which the help isn't very clear - can you add floating point values to movement?

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Jan 2003 20:09
If you expand the code sections in that post, you will see there is source to produce a hi-resolution timer in DBPro.

All 3D object and camera positions are floating point, so you can move by whatever you want.
ByronAJ
22
Years of Service
User Offline
Joined: 16th Jan 2003
Location:
Posted: 16th Jan 2003 20:48
Hmm.. quite impressed.

I was worried that DBPro would be too inflexible, but it seems quite nice.

Login to post a reply

Server time is: 2025-05-18 15:27:21
Your offset time is: 2025-05-18 15:27:21