Linux and game speed

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
brankok
Engineer
Engineer
Posts: 24
Joined: 13 Dec 2004 14:25
Location: Bodenwerder

Linux and game speed

Post by brankok »

Hello,

I've just installed SUSE Linux 9.2 on my computer to play OpenTTd without using Windows anymore. But unfortunetaly there is one big problem. The game will not work on a good perfomance. Using a size more then 640 x 480 slows down the speed , the vehicles are stuttering and scrolling through the map will cause a very slow screen refresh.
I'm using an Athlon 700 Mhz with a GeForce 2 MX 400 graphics card.
I've installed the latest Nvidia driver without any effect.
On Windows (98SE) i've never had any problems playing with hundreds of panes, RV and trains on 1600 x 1200 using accelerated game speed.
I know somewhat about Linux, but I'm not an expert at all and so I want to know if this is a known problem with this graphic card ,of the X-Server of Linux, or only my private bad luck, and if there are any solutions for this problem. (if possible non-expert solutions :D )I don't want to have Windows installed only to play OpenTTd. This would really be a overkill :wink: .
I'm grateful for every help
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

Change your desktop colour depth to '8 bit' that will speed up openttd a lot! The current SDL implementation of OTTD is not so good :|
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
ConductorBob
Director
Director
Posts: 560
Joined: 21 Jun 2004 16:17
Location: Train station 1

Post by ConductorBob »

Nvidia's 3d acceleration software for Linux Suse is pretty terrible, try Mandrake or Slackware and you'll probably get 30 times better results.
Archonix
Chief Executive
Chief Executive
Posts: 733
Joined: 01 May 2003 17:29
Location: Manchester, UK
Contact:

Post by Archonix »

They all use the same drivers.
ConductorBob
Director
Director
Posts: 560
Joined: 21 Jun 2004 16:17
Location: Train station 1

Post by ConductorBob »

Suse is independent as it has a different system intirerly for 3d.. Doesn't use the standard XYZ-Sys like other distros.
Archonix
Chief Executive
Chief Executive
Posts: 733
Joined: 01 May 2003 17:29
Location: Manchester, UK
Contact:

Post by Archonix »

By efault, maybe, but it's pretty easy to install better drivers.
User avatar
Celestar
Director
Director
Posts: 574
Joined: 02 Jul 2004 10:56
Contact:

Post by Celestar »

I'm on SuSE and I use exactly the same drivers that I use on other distros.

Celestar
brankok
Engineer
Engineer
Posts: 24
Joined: 13 Dec 2004 14:25
Location: Bodenwerder

Post by brankok »

Now I'm a little bit confused :) .
Darkvater told it's a problem with the SDL implementation, ConductorBob said SUSE and Nvidia 3d acceleration is a mess.(Does OpenTTd use 3D software in any way ???)
The first time I run Openttd with the drivers automaticly installed by SUSE without 3D acceleration. All 3D software didn't run or if,it was very slow.
So I installed the latest nvidia driver and all 3D programmes worked fine.
The game speed of OpenTTD didn't improved.
Only reducing the color depth to 8 BIT (like Darkvater proposed) improved the speed many times and it worked fine in high resolutions too. But don't ask how my desktop looked :shock: .

IS it a problem with SDL and if, will there be a better implemantation some day, or have I to reconfigure/change my system/graphics card?
nzhook
Engineer
Engineer
Posts: 115
Joined: 02 Jul 2004 13:15
Location: NZ
Contact:

Post by nzhook »

I know I was having problems with the speed of the fast forward button, becuase of the full detail, and full animation options.

Are you running in fullscreen or window mode?

windowed will mean the graphics have to be converted back from 8 bit to the normal mode (which as you say when its running in 8 bit goes faster, anthing else will take conversion time (not much tho)) whereas full screen should run well on any mode.
brankok
Engineer
Engineer
Posts: 24
Joined: 13 Dec 2004 14:25
Location: Bodenwerder

Post by brankok »

There is no diffrerence between full screen mode and windowed mode.
The windowed mode is as slow as the fullscreen mode.
SergeS
Traffic Manager
Traffic Manager
Posts: 147
Joined: 07 Jun 2003 19:46
Location: CZ / Prague
Contact:

Post by SergeS »

On Suse you must install nVidia drivers ( if they will work there ) - because there is no 3d implemenation in SuSe ( i seen only one distribution where acceleration is default ). SDL work much wroster without this drivers ( tested on my Linux distribution )
iain
Engineer
Engineer
Posts: 9
Joined: 07 Nov 2004 16:29
Location: Szeged, Hungary

Post by iain »

Hi,

Try running openttd from a console. Before starting ./openttd or whatever path, (and assuming you are using bash) enter the line :
export SDL_VIDEODRIVER=dga

This proved to be much better on my hardware, but YMMV. It also means that you run openttd and can't task-switch or run in windowed mode.

It it's good for you and you want to have this done automatically, add the export line to your ~/.bashrc file.
brankok
Engineer
Engineer
Posts: 24
Joined: 13 Dec 2004 14:25
Location: Bodenwerder

Post by brankok »

That works!
Great!
Many thanks :D
brankok
Engineer
Engineer
Posts: 24
Joined: 13 Dec 2004 14:25
Location: Bodenwerder

Post by brankok »

Some little new problem: Starting the game like described before, I'm not able to use upper case. That's not handy if I want to rename towns, trains a.s.o.
Starting the game "normally" I have no problems -but its soooo slow ... :(
hachiman
Engineer
Engineer
Posts: 2
Joined: 23 Sep 2006 08:34

Post by hachiman »

I found the same problem at changing from 0.4.7 to 0.4.8[-RC1]
linux, debian, sdl on X11 on framebuffer :cry:

it was annoying that the game is stuttering, ?(
so i tried to find the guilty CPU eating code.
The slow code is near./video/sdl_v.c

Code: Select all

                        if (++pal_tick > 4) {
                                CheckPaletteAnim();
                                pal_tick = 1;
                        }
:idea:
after changing the number 4 to number 100 (or any higher value)
the palette animation slowed down but lagging are more rare. :D

I think it would be a great feature to create a Patch for it, allowing the user to change palette animation frequency. (on slow machine high value recommended) :bow:
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 4 guests