Page 1 of 2
Very Slow?
Posted: Mon Oct 10, 2005 5:56 pm
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

Posted: Mon Oct 10, 2005 8:02 pm
by dell_jockey
you did turn off the debugger, didn't you?
Posted: Mon Oct 10, 2005 10:32 pm
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

Posted: Mon Oct 10, 2005 11:42 pm
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 ?
Posted: Mon Oct 10, 2005 11:54 pm
by Blade
Ehm... He said that the windows version is slower than the linux one...

Posted: Tue Oct 11, 2005 12:03 am
by Fred
damit, i read the contriary

. This is worse, then. Which gfx card do you use ?
Posted: Tue Oct 11, 2005 12:08 am
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..
Posted: Tue Oct 11, 2005 1:04 am
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.
Posted: Tue Oct 11, 2005 2:01 am
by dracflamloc
Ran too fast for me but then again I do have a 3800+ AMD64 and a 6800GT vid card
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.
Posted: Tue Oct 11, 2005 4:27 am
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?
Posted: Tue Oct 11, 2005 2:56 pm
by Flype
win32 version runs very fine for me - good job.
Posted: Tue Oct 11, 2005 8:39 pm
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

Posted: Tue Oct 11, 2005 8:46 pm
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.
Posted: Tue Oct 11, 2005 11:08 pm
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.
Posted: Wed Oct 12, 2005 4:03 pm
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...