Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

speed

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 derjerg   Members   

100
Like
0Likes
Like

Posted 27 June 2009 - 03:39 AM

i really enjoy learning open gl through this amazing tutorial and i get along with it really great. theres just one problem. the programs run much to fast. is there a general way to reduce speed? i think its not the best way just reducing rotation-values, right? thank you in advance, jerg

#2 Big Evil Corporation   Members   

533
Like
0Likes
Like

Posted 27 June 2009 - 03:44 AM

You should update your rotation using Delta time. You need a function to return the time elapsed since the last frame, and use it something like:

Rotation += 0.1f * GetDeltaTime();


That will give you a constant rotation speed regardless of the FPS.

"The right, man, in the wrong, place, can make all the dif-fer-rence in the world..." - GMan, Half-Life 2

 

A blog of my SEGA Megadrive development adventures: http://www.bigevilcorporation.co.uk


#3 derjerg   Members   

100
Like
0Likes
Like

Posted 27 June 2009 - 05:33 AM

thank you for your quick answer. this idea sounds great.
eeehm, my skills just aint good enough to implement it, though i tried doing it on my own, after i found some information about getdeltatime().

could someone please be so kind to modify lesson 9's source?

#4 Caste   Members   

973
Like
0Likes
Like

Posted 27 June 2009 - 07:33 PM

I'm still working on completely new lessons and there everything will take account of the elapsed time. Thus I hope I'll finish the lessons in the next time and show how to do time based animations.

#5 derjerg   Members   

100
Like
0Likes
Like

Posted 29 June 2009 - 01:37 AM

that would be awesome!
i'm a little stucked..




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.