Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

NightZero

I need speed!

This topic is 5645 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
timeGetTime is till not very accurate

instead use

QueryPerformanceFrequency
QueryPerformanceCounter

Share this post


Link to post
Share on other sites
timeGetTime is fine for times around 20ms. you really only need QueryPerfomanceCounter when you need to time things in the 1ms area and below.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!