performance independence

Started by
3 comments, last by ehab 22 years, 7 months ago
how to make my game independent in speed from the system? I used WM_TIMER messages instead of using loops but the performance goes down even if I create a timer with 1 millisecond. should I put the drawing in a thread or the action in a thread or what...?
Advertisement
WM_TIMER is a low priority message, in other words, if there''s another message that could be delivered, it will be instead of WM_TIMER. Use another thread, or simply based your physics on a delta (which you''ll have to do for another thread anyway).

[Resist Windows XP''s Invasive Production Activation Technology!]
dont use WM_TIMER for timing.

use timeGetTime() or QueryPerformanceCounter() or GetTickCount() instead to get the Real Time Clock, then base your animation system on that.

You can use my lovely stuff for FPS at my site www.infantrydb.com/kingsrevenge

Eric Wright o0Programmer0o

AcidRain Productions
Eric Wright o0Programmer0o
http://www.gamedev.net/reference/articles/article753.asp

This topic is closed to new replies.

Advertisement