I need speed!

Started by
15 comments, last by NightZero 21 years, 2 months ago
I''ve developed this 2D platform game, a la Super Mario. On most computers it runns very smooth. However, with o few computers I tried it on, it is realy slow, even if they are "better". Why?! I have a timing funktion which updates my gameloop every 20th millisecond... It''s not any advanced graphics. I made it for DirectDraw with DirectX 8.1. If it helps, my game may be downloaded here: http://w1.457.telia.com/~u45706202/ regards, Mattias
Advertisement
first make sure you use hardware accleration if
it is avilaible..
then check up the image format that you use, 256 is the best
performance you know..etc..
tell me what you get.
regards
I fought this battle just only a few days ago.

On one on system ( Win ME, DX9, 2MB Video Card ) it ran fine.
On another system ( Win2K, DX9, 64MB GeForce ) it ran slower.

The source of my problem was GetTickCount() controlling the update. I switch to timeGetTime() in the multimedia library winmm.lib and everything worked correctly on ALL platforms again.

Hope this helps

- J
Jeff OutlawPresidentDigitalOutlawhttp://www.digitaloutlaw.com
Thanks for your answares...
I use hardware acceleration, but bitmaps (bmp) with a color depth of 24 bits. But it works fine with my old graphics card and is slower with a newer graphics card... Strange...

Joutlaw: Thanks I''ll try it out! (I use GetTickCount)

Regards,
Mattias
Can't uninstall it, the uninstall.exe is bugging my system...
Can't even close the uninstall program... it keeps changing Process name...

[edited by - Pipo DeClown on January 31, 2003 5:28:04 AM]
timeGetTime is till not very accurate

instead use

QueryPerformanceFrequency
QueryPerformanceCounter
timeGetTime is fine for times around 20ms. you really only need QueryPerfomanceCounter when you need to time things in the 1ms area and below.
quote:Original post by Pseudo
timeGetTime is fine for times around 20ms. you really only need QueryPerfomanceCounter when you need to time things in the 1ms area and below.

timeGetTime can return values within 1 ms of each other. you only need qpc if you go below 1 ms accuracy.

how? read the docs.
All right I conceed QueryPerformanceCounter() is THE best way to go, however that being said, my evidence has shown the following:

GetTickCount() behaves inconsistently on different platforms/OSes

timeGetTime() behaves consistenttly on ALL platforms/OSes at has been much more better than GetTickCount() for synching the frame rate in my games.

Again, I agree QueryPerformanceCounter is THE best choice but for something quick and dirty, it hard to beat timeGetTime().

- J
Jeff OutlawPresidentDigitalOutlawhttp://www.digitaloutlaw.com
Well, i had the exact problem once, i was ussing 24 bits depth, some old card with only 2 or 4 MB can manage 24 bits, but newer cards use 16 or 32 bits, if you are ussing 24, change it to 16 and it is done.

Hope this helps

If God with me, Who against me?
--------------------------------------------- If God with me, Who against me?Personal Web Samuel Prince Blog...

This topic is closed to new replies.

Advertisement