Very Slow?

Windows specific forum
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

Very Slow?

Post by Brujah »

When I compile my game for Windows its running perfectly,
but it is horribly slow. Maybe 20% of the Speed I get using Linux.
So its not really fun to play it.

Could that be an error in my code?
I really don´t know what to do... as its the same code on both operating systems...

The homepage is:
http://laby.toybox.de

Its Open Source so we got the sourcecode and everything there.
If somebody wants to try :-)
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Post by dell_jockey »

you did turn off the debugger, didn't you?
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
Brice Manuel

Post by Brice Manuel »

If you are using a Nvidia card, try updating your drivers. Some versions are buggy when it comes to displaying text on the screen and will choke, dunno if this carries to linux or not.

Very nice looking game :D
Last edited by Brice Manuel on Mon Oct 10, 2005 11:51 pm, edited 1 time in total.
Fred
Administrator
Administrator
Posts: 18360
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

SDL is unfortunately often way slower that DirectX due to poor driver/acceraleration support. BTW, could try to see which function does the slowdown ?
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Ehm... He said that the windows version is slower than the linux one... :)
Fred
Administrator
Administrator
Posts: 18360
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

damit, i read the contriary :). This is worse, then. Which gfx card do you use ?
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@Brujah:
Can you tell use your fps of the windows and linux version!? Maybe there is any different of your drawing functions!? Have you checked the VBlank flag in FlipBuffers() !? just an idea..
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Brice Manuel

Post by Brice Manuel »

ack, I modified my post based on Freds. I thought I had misread something.

Ran fine on Windows for me.

XP Home
Celery 1Ghz
512MB RAM
Geforce FX 5200 128MB

Speed seemed fine.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Ran too fast for me but then again I do have a 3800+ AMD64 and a 6800GT vid card :wink:

You should base the whole game on elapsed time since the last frame (movement, etc) if you want the game to play the same on every computer.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

One thing I have noticed in my own cross platform games is that if I use SetFrameRate under Windows, the game will run at the specified frame rate and works fine.
If I use SetFrameRate under Linux, this command seems to be ignored and the game runs as fast as the processor/gfx card will allow.

Maybe a bug?
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

win32 version runs very fine for me - good job.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

Post by Brujah »

Wow so many mails. Thanx folks!
- When I create the executable the debugger should be off? Will try that...
- I am not using an NVidia Card. I got an old laptop here. With a strange graphics card. But should be supported perfectely in 2D with Windows.
- True I got the command SetFrameRate. Will remove it and try again.
- Too fast? Thats crazy :-)))) But I integerated an option where you make the game slower. Only faster is not possible :-)
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Your old 2d laptop card is most likely the issue. What method are you using to create the large black area with the transparent circle?

Also, you have a lot of black area. Make sure you aren't drawing things needlessly and then drawing black over them.

Make sure your running with the latest drivers. And also, if your card has shared video/system ram, it will be very slow on certain memory intensive graphical operations like filling, etc.
Brice Manuel

Post by Brice Manuel »

With a strange graphics card. But should be supported perfectely in 2D with Windows.
Most "generic" cards cannot handle DD properly. With a laptop, you are stuck since you cannot change graphics card. I have an old clunker laptop and I get around 1-2 FPS for anything in PB using DirectDraw.
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

Post by Brujah »

Okay, tried around yesterday and can say now that the Debugger and the SetFramerate do not change a thing.

One other user with a 400MHz Maxchine told me too that is unplayable on his machine...
But I fear I cannot change a thing.

Most Users seems to have fast enough machines... So it does not really matter.

Changing drivers and stuff is not needed for me, because the linux version runs fast enough on my machine.
I just still do not understand why this is the case... Somebody wrote me that Linux itself runs faster. Or SDL there can handle DD but DirectX cannot? Wondering...
Post Reply