speed differs with resolution

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
warden
Posts: 11
Joined: Thu Nov 24, 2005 3:54 pm

speed differs with resolution

Post by warden »

hi there, i have a car moving due to user input. speed of the car is highly dependend of what resolution i use. it's faster with 800x600 than with 1024x768 or even 1280x800. i optimized all values to the latter one, but people with 4:3 displays should play the game as well. are the units of different size with irrlicht in different resolutions?

thanks
warden
Ced666
Posts: 86
Joined: Fri Jan 13, 2006 10:29 am
Location: Belgium

Post by Ced666 »

This is very dependent of how you make it run. Post the code, it will be usefull.
For example, if at every new frame you move your car by a certain distance, then it is wrong because the time between frames will vary a lot in function of the processor speed, resolution, ...
You should instead pass the time elapsed between the frames and calculate a distance based on this time and the speed you want to have (distance = speed * time).
Quall
Posts: 154
Joined: Mon Mar 07, 2005 10:16 pm

Post by Quall »

Alter the camera properties for your different resolution ratios (edit FOV, etc...). I believe that is what you are trying to acheive.

edit: Maybe I misread your post. The car is moving faster/slower because the fps is higher and lower depending on the resolution. People with slower computers will also have different speeds as you. To fix this, you have to base your movement on the time that has passed rather than the frames per second. Search the forum as this is asked alot.
warden
Posts: 11
Joined: Thu Nov 24, 2005 3:54 pm

Post by warden »

okay thanks a lot! i first tried to do this with vectors but failed due to the many forces. i now have it simple and smoothly working on my computer. however, do you know of one or two good threads or webpages about how to deal with accleration, speed, braking and reservedriving?

thanks again
warden
Post Reply