Help! Linux version is very very slow!

Hi,

I just started using Linux and compiled my game for it using SDL and GCC.
Under Windows it was very fast and smooth (running in 800 x 600 in 256
colors). However, when I run it on Linux it craaaaaaaaaaaaaaaaaaaaawls! I
understand that this has something to do with not being able to get hardware
surfaces or enable SDL_DoubleBuf when I set up the videomode.

But I haven’t been able to find any messages or information on what my best
alternative might be. I understand that I have to do something like set an
environmental variable called SDL_VIDEODRIVER but I’m wonder which video
driver people would recommend…?

Any more info on this would be very much appreciated.

Oh… I’m running Red Hat Linux 7.1 with KDE, with 256MBs RAM, 1Ghz AMD and
an 8MB ATI Rage 3D Card (it’s a laptop, btw)

Cheers.

I just started using Linux and compiled my game for it using SDL and GCC.
Under Windows it was very fast and smooth (running in 800 x 600 in 256
colors). However, when I run it on Linux it craaaaaaaaaaaaaaaaaaaaawls! I
understand that this has something to do with not being able to get hardware
surfaces or enable SDL_DoubleBuf when I set up the videomode.

Hi,

Only a few video targets under Linux are able to take advantage of
hardware acceleration. First, you should make sure that the surfaces you
blit to the screen use the same format that the screen surface, or SDL
will have to perform heavy conversions. So all your surfaces should be
passed to SDL_DisplayFormat before doing any blit.

Also, if your game is in 8 bits and your X server in 16 or 24, SDL will
have to perform screen conversions before actually displaying. You’d
probably be well adviced to set the game’s depth to the one
SDL_VideoModeOK returns you, and then convert your surfaces with
SDL_DisplayFormat.

But I haven’t been able to find any messages or information on what my best
alternative might be. I understand that I have to do something like set an
environmental variable called SDL_VIDEODRIVER but I’m wonder which video
driver people would recommend…?

The fastest targets under GNU/Linux are probably dga (you can set
SDL_VIDEODRIVER to dga or dga2, haven’t noticed any difference though
;)), and fbcon, if you have a good framebuffer support. directfb should
work too (I have just seen a directfb target, but this one isn’t
mentionned on the FAQ - can’t test it unfortunately but I guess this one
could be VERY fast).

The problem being, that dga targets require root priviledges, and fbcon
and directfb are far from being well supported everywhere. The
performance issue is being discussed right now, and I hope we will come
with a better target that works from X without any extre priviledges
(lots of discussions about OpenGL recently). But in your case, and
unless you are doing lots and lots of blits, I think you should have
decent performances by making sure your surfaces are in the right
format. It will probably still be far from what you can get by using
SDL’s DirectX backend, though. Hope this get fixed soon!

See you,
Alex.–
http://www.gnurou.org

I’ve got a similar laptop video chip to yours i think.
I’ve got an ATI rage mobility chip with 8 megs. And redhat 7.2.
I took me a while to figure out why DRI wasn’t working.
I’m not sure if your sdl code is using openGL, but if it is, and glxinfo is
telling you DRI is not enabled, chances are that you are rendering with
Mesa, which can be very slow.

According to a post i found on dri.sourceforge.net, 8 megs of video is not
all that much for 3D
So I switched X from 24 to 16 bit in 1024x768, DRI became enabled and things
were good :slight_smile:

Check out the recent posts in loki.games.ut
I put my X config up there.

Luis

“Sweeney, Steven (FNB)” wrote in message
news:mailman.1015074362.11159.sdl at libsdl.org

Hi,

I just started using Linux and compiled my game for it using SDL and GCC.
Under Windows it was very fast and smooth (running in 800 x 600 in 256
colors). However, when I run it on Linux it craaaaaaaaaaaaaaaaaaaaawls! I
understand that this has something to do with not being able to get
hardware
surfaces or enable SDL_DoubleBuf when I set up the videomode.

But I haven’t been able to find any messages or information on what my
best
alternative might be. I understand that I have to do something like set an
environmental variable called SDL_VIDEODRIVER but I’m wonder which video
driver people would recommend…?

Any more info on this would be very much appreciated.

Oh… I’m running Red Hat Linux 7.1 with KDE, with 256MBs RAM, 1Ghz AMD
and> an 8MB ATI Rage 3D Card (it’s a laptop, btw)

Cheers.

Oh no… My game uses good old 2D! hehehe! :slight_smile: I’ll see what I can do by
playing about with stuff. I must be doing something very very wrong
somewhere. Yes, but game runs in 8 bit, but my X screen is 16 bit. So,
yeah… something’s a miss… :|> -----Original Message-----

From: none [SMTP:none at none.com]
Sent: Sunday, March 03, 2002 7:54 AM
To: sdl at libsdl.org
Subject: Re: [SDL] Help! Linux version is very very slow!

I’ve got a similar laptop video chip to yours i think.
I’ve got an ATI rage mobility chip with 8 megs. And redhat 7.2.
I took me a while to figure out why DRI wasn’t working.
I’m not sure if your sdl code is using openGL, but if it is, and glxinfo
is
telling you DRI is not enabled, chances are that you are rendering with
Mesa, which can be very slow.

According to a post i found on dri.sourceforge.net, 8 megs of video is not
all that much for 3D
So I switched X from 24 to 16 bit in 1024x768, DRI became enabled and
things
were good :slight_smile:

Check out the recent posts in loki.games.ut
I put my X config up there.

Luis

“Sweeney, Steven (FNB)” wrote in message
news:mailman.1015074362.11159.sdl at libsdl.org

Hi,

I just started using Linux and compiled my game for it using SDL and
GCC.
Under Windows it was very fast and smooth (running in 800 x 600 in 256
colors). However, when I run it on Linux it craaaaaaaaaaaaaaaaaaaaawls!
I
understand that this has something to do with not being able to get
hardware
surfaces or enable SDL_DoubleBuf when I set up the videomode.

But I haven’t been able to find any messages or information on what my
best
alternative might be. I understand that I have to do something like set
an
environmental variable called SDL_VIDEODRIVER but I’m wonder which video
driver people would recommend…?

Any more info on this would be very much appreciated.

Oh… I’m running Red Hat Linux 7.1 with KDE, with 256MBs RAM, 1Ghz AMD
and
an 8MB ATI Rage 3D Card (it’s a laptop, btw)

Cheers.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl