Skip to main content
gamedev.net
🔒 Locked

A few problems...

Started by Solarbeam 1 reply 200+ views
Original Post
Solarbeam
Solarbeam
First off, I designed my little d3d demo around my 200 Mhz pentium w/no 3d accel. Now, its too fast on people with better comps! How do I make it slower (i.e. make DirectInput slower)? Also, when i switch windows, my projection matrix gets screwed up, no idea why. Any help appreciated
------------------------------Large explosion consumes building, hero walks away unharmed (wtf? why?) CUT
Dark
Dark
Hi,

You need to set a timer function which is called to
1 Get input from the input devices
2 Render the next frame.
3 any other time critical shit

This can be easily accomplished with a WM_TIMER event (Although it might fail in very time critical situations... just look at its help description for more details) that calls the function Update or something like that.

I hope this helps, Dark
(Mail me at: mitolah@hotmail.com)

ICQ: 130925152Email: e.j.folkertsma@student.utwente.nl
Incommunicado
Incommunicado
Hi!
I recommend using the high resolution timers provided by the WIN32 API. QueryPerformanceCounter and QueryPerformanceFrequency are much more reliable and much more precise than WM_TIMER messages. Just get the timercount everytime your renderfunction is called and compare it to the time stored in the previous call to your renderfunction. Then compare these numbers and if enough time as passed refresh the screen. This works also pretty good for interpolation of keyframes and other animation stuff.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.