News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Win7x64 111.3 Crash on returning to fullscreen

Started by TheUniqueTiger, July 29, 2012, 12:32:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TheUniqueTiger

Hello,

Whenever I play in fullscreen and try to switch to another window by using Alt+Tab, and later again return back to Simutrans, Simutrans simply crashes. I can't say from when this bug was introduced but I remember playing earlier versions (about 2-3 years earlier) without such crashes. It crashes only while playing fullscreen and not in windowed mode. Also it does not matter whether the game resolution is different from desktop resolution. I tried keeping the same resolution and switching to desktop but it still crashed.

If it has been known then please forgive me but searching for "alt tab" didn't come up with any results.

Thanks.

My specs:
Win7 Ultimate x64
3GB RAM
ATI Radeon 5450 HD

Ters

I can't reproduce on Win7 x64 (though x86 Simutrans) ATI Mobility Radeon 5850. My Simutrans uses SDL for graphics. Do you know if you use the SDL or GDI version of Simutrans?

prissi

#2
I suspect the GDI version. DId you start/install simutrans ad administrator (via sinstaller)? Then simutrans tries to set the screen resolution to 16 bit. While this is a valid API command, it is quite an obsolete modus and many drivers do not supported it properly any more.

Indeed, the GDI version using fullscreen quits with a beep when switching back on my Windows7, while working nicely with windows XP.

EDIT: This should occurs since ages. No idea why nobody reported it. Fixed in 5843

TheUniqueTiger

Yes I use the GDI version. Thanks Prissi for fixing it! :)

dom700

Quote from: prissi on July 29, 2012, 06:48:46 PM
EDIT: This should occurs since ages. No idea why nobody reported it. Fixed in 5843

There is a fullscreen mode?!

Ters

As I see it, fullscreen mode isn't very useful anymore. Compared to just maximizing the window, you gain a handfull of pixels otherwise occupied by the title bar and the task bar, but lose the ability to rapidly switch to other windows and see various information on the task bar (like the clock). Back in the old days, these pixels were more valuable, as there weren't so many pixels avaiable on the screen. (I used to auto-hide the task bar back then, now I have it fixed at double height.) Any secondary monitors also become pretty useless, as the mouse is restricted to the Simutrans monitor. Modern LCD monitors also have a single optimal resolution, so games that switch to a lower resolution in order to potentially gain some performance, will look worse.

That might be why no one noticed. Very few used the feature, even fewer bothered reporting.

dom700

Seriously, I have no idea how to switch to fullscreen mode. Alt+Enter only results in "bing" :P (no crash though)

Dwachs

Quote from: dom700 on July 30, 2012, 07:27:36 AM
Seriously, I have no idea how to switch to fullscreen mode. Alt+Enter only results in "bing" :P (no crash though)
Start with command-line option '-fullscreen'.
Parsley, sage, rosemary, and maggikraut.

Ters

or set fullscreen = 1 in simuconf.tab (not tested, but it's there)

TheUniqueTiger

@ Ters,

Exactly that is the reason I thought why nobody reported. Even I have a 1920x1080 display but running Simutrans maximized results in CPU consumption of around 30-35% of dual core. This is simply too much considering it just renders 2D at 25fps with a 5450HD graphic card. As an adjustment I prefer 1440x900 fullscreen which still displays without distortion and results in just 12-18% dual core CPU usage. It also makes objects appear bigger.

prissi

As written several times ago, the rendering speed of simutrans does not depend on the graphics board but on the shared memory bandwidth. Larger screen, more object to draw, more memory bandwidth. And this goes quadratically with size, as with increased width also height increases.

However, zooming in (i.e. larger tiles) will give you almost the same speed again.


Ters

I wish my Simutrans would use more CPU, though I wonder if I'm I/O bound, or if the game just underutilize the CPU.

prissi

Simutrans will work fine until 45% dual core CPU usage (it cannot use more than 65% of a dualcore at most, using GDI builts and multithreaded redraws). However, some dualcore report 4 CPU to the OS.

Moreover, due to the way graphics are drawn, CPU rates of 15 fps or so will not lead to stuttering trains, as the finest distance they can move on a straight track horizontally is 2 pixels. Such will take a lot of load from the CPU.