Speed problems
Hello, I''m trying to get through the tutorials, however everything goes so extremely fast. For example the textured box in example 7, if I even tap left then its spinning extremely fast. Or in the previous ones like the cube moving around the triangle, I have to add an extra 0 after the decimal for it to look right where it changes the rotation. How can I implement something to change rotations based on speed or something? For example if I make a 3d world like NeHe World how do I make it so hitting up doesnt take me to the other end of the world whereas its correct on slower computers?
Thanks
Comp Specs:
Dual 2.4GHz P4
1GB RAM
128MB ATI Radeon 9800 Pro
etc.
Well you have v-sync off in your open gl settings in the properties of your video card. Its recomended you turn them on as a default (not always on) so nehe demos don''t blaze on your computer.
For time based momvemnt I base movement on a average frame render time (I call it speedadj). When ever i mutiply or move somthing i mutiply it by that factor(speedadj). You can get the time it takes to render each frame by using a clock call and compairing the time of the current frame to that of the last frame.
I smooth the factor over 4 frames to avoid any "jumps" if a frame rate is dramaticly increased or decresed.
For time based momvemnt I base movement on a average frame render time (I call it speedadj). When ever i mutiply or move somthing i mutiply it by that factor(speedadj). You can get the time it takes to render each frame by using a clock call and compairing the time of the current frame to that of the last frame.
I smooth the factor over 4 frames to avoid any "jumps" if a frame rate is dramaticly increased or decresed.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement