News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

News "scroller" at bottom of screen slows game to a crawl

Started by neroden, September 23, 2009, 04:09:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

neroden

I've found, running 102.0 under Linux, regardless of pakset, that whenever the scrolling news runs along the bottom of the screen, it slows the game to a crawl and makes it completely unresponsive.  As soon as the scroller is gone, the game speeds back up again.

Frankly I would be happy if the scroller could just be turned off (I can look at the message list if I want to see the news, or the popup windows would be fine).  Alternatively perhaps someone could figure out why the "crawling text" is making the game crawl.  ;-)

z9999

You can hide it by changing message option, but you can't hide "Welcome" message.

Current scrolling news is really annoying for me ,too. I'm playing with 9 fps and it is very very slow.
And also recently, people have wide display and scrolling news needs very long time.

I prefer scrolling news than pop-up window, but it is really annoying.

prissi

The scrolling should not make the game much slower. Are you sure it is not connected to generating many messages at the beginning of a month? Then the game is unresponsive , if very many messages are generated. THe current nightlies should do a little better.

The scrolling really is copying very little memory, compared to the whole screen update routine.

In the moment, scroll speed is linked to the fps rate; however a fixed rate (or a speed setting) would be possible too.

z9999

Quote from: prissi on September 23, 2009, 08:34:21 AM
In the moment, scroll speed is linked to the fps rate; however a fixed rate (or a speed setting) would be possible too.

Speed setting is very helpfull, at least for me.
In current, fast forward is also fixed (low) rate and it causes full of message cue.

neroden

Quote from: prissi on September 23, 2009, 08:34:21 AM
The scrolling should not make the game much slower. Are you sure it is not connected to generating many messages at the beginning of a month?

Yes.

If I run the game in, say, 1500, with essentially nothing on the map, it slows to a crawl for the "New Year" message alone.  That's one message.

If *any* message pops up mid-year, by itself, the game slows to a crawl.

If the month starts but there's nothing on the ticker, the game continues to be responsive.

Mind you, I'm running big maps; the game is kind of at the edge of slowing down to a crawl, and can be overloaded without too much trouble.  Uniquely, the ticker renders the game unresponsive precisely from when the ticker appears to when it moves off the screen.

It's the ticker.

Note, I don't have an accelerated graphics card, so graphics redraws can be expensive.  To make a wild guess, I think perhaps the game normally manages with minimal redraws, and the ticker is forcing SDL to do much more graphics work every frame?  If I turn on visuals for day/night, the day-night switch will also freeze the game up while it redraws everything, but not for nearly as long.

Thanks for pointing me to the options to turn the darn thing off, z9999.

prissi

The ticker just redraws the tickes, a 16*screen width area. Simutrans do not use hardware accelration deliberately (apart from a blitter if present). Copying the memory in the blitter region should also have not affect too, as this is really small (for a 1024 screen it is 32kB consecutive memory, which should be done in a few mircoseconds or so.

Any redaws redraws the screen entirely, transferring 100x times more bytes through memory, and those are not even consecutively. The only way that such could happen would be either a broken processor (because on x86 it uses actually assembler:
rep
movsl
instead of the call to memove (which was slower on my Linux system at least.) You can try to compile without this by -DUSE_C, but this will be of course generally make everything slower.

When you use "follow convoi" does the game also slows down to a crawl? THen the display driver is the reason. Maybe your frame buffer driver buffer everything twice or SDL cannot handle it well. In such case you may also try to compile either the 8Bit version or use the Allegro Library.

neroden

Quote from: prissi on September 25, 2009, 10:28:57 AM
When you use "follow convoi" does the game also slows down to a crawl?

Yes, it does!  You're a genius!  :-)

QuoteTHen the display driver is the reason. Maybe your frame buffer driver buffer everything twice or SDL cannot handle it well. In such case you may also try to compile either the 8Bit version or use the Allegro Library.
OK, thanks very much!