Show in title bar that game is paused

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
leifbk
Chairman
Chairman
Posts: 814
Joined: 23 Dec 2013 16:33
Location: Bærum, Norway

Show in title bar that game is paused

Post by leifbk »

I'm always running lots of tasks simultaneously on my computer, and have a terrible habit of forgetting to pause OpenTTD when I switch to a different task. Sometimes I even go to sleep while the game is running, only to return like a Rip van Winkle the next day to find that decades have gone by. From what I know of programming, it shouldn't be too hard to change the window title to include the legend ** PAUSED ** (preferrably at the beginning) or something to that effect when pause is on. That would make the problem a lot easier to spot.
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Show in title bar that game is paused

Post by Transportman »

But what is the problem? That it no longer is 1980 but 2017 when you return? If you turn off vehicle expiry and play without breakdowns (or have autorenew), there is no real downside to leaving the game run as long as you are making a profit.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
leifbk
Chairman
Chairman
Posts: 814
Joined: 23 Dec 2013 16:33
Location: Bærum, Norway

Re: Show in title bar that game is paused

Post by leifbk »

Transportman wrote:But what is the problem? That it no longer is 1980 but 2017 when you return? If you turn off vehicle expiry and play without breakdowns (or have autorenew), there is no real downside to leaving the game run as long as you are making a profit.
I won't turn off vehicle expiry, because I feel that it's an essential part of the game.

Yesterday I abandoned a game because it had two long lapses in it. It was started in 1733, and in the 1850s I forgot that it was running and went to bed. Next day it was around 1900, and for a long time I had to replace all my old schooners, barques, and clippers to new Squid ships. All the while I got those dire warnings about obsolete vehicles that couldn't be renewed. Finally I was done with the ships and proceeded to replacing old trams and horse carts with more recent models. I was just done with the 1930 upgrade to 15-tons eGRVTS vehicles, when I again forgot to pause the game, and let it lapse for several hours. When I returned to the game it was the 1960s, and my entire fleet was overdue for replacement.

Usually I do most of the business expansion in the period 1860-1960, as there's a huge development of vehicles in that period. When I was able to resume normal operation in the 1970s, I had effectively lost 100 years of development and still had no more than my 19th century skeleton routes running, and the game simply didn't feel worth continuing.
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: Show in title bar that game is paused

Post by Sylf »

You can increase the number of auto-saves the game keeps (max_num_autosaves in openttd.cfg), up to never-delete any auto saves (keep_all_autosave).
Then, if you forget to pause a game for a few hours, you can go back to the right copy of autosave, and resume the game from there.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Show in title bar that game is paused

Post by Alberth »

I always explicitly save a game before leaving the computer. In that way, you can always go back to your last save.
Being a retired OpenTTD developer does not mean I know what I am doing.
leifbk
Chairman
Chairman
Posts: 814
Joined: 23 Dec 2013 16:33
Location: Bærum, Norway

Re: Show in title bar that game is paused

Post by leifbk »

Sylf wrote:You can increase the number of auto-saves the game keeps (max_num_autosaves in openttd.cfg), up to never-delete any auto saves (keep_all_autosave).
Then, if you forget to pause a game for a few hours, you can go back to the right copy of autosave, and resume the game from there.
That's good advice. I increased the max_num_autosaves to 50. As I only do yearly autosaves, that should be sufficient for a good night's sleep ;)
Alberth wrote:I always explicitly save a game before leaving the computer. In that way, you can always go back to your last save.
The thing is, when I'm sitting at my computer doing several things at once, it would be nice to be able to see at a glance at the taskbar whether OpenTTD is running or not. Probably due to my advanced age, I sometimes forget to check before I leave the computer. I seldom save the game manually unless there's a need to reboot, mostly because I've built a new kernel. A properly maintained Gentoo Linux system on decent hardware is wonderfully stable.
Toffo
Engineer
Engineer
Posts: 62
Joined: 04 Jun 2009 10:59
Location: NSW, Australia

Re: Show in title bar that game is paused

Post by Toffo »

I'm with you, leifbk, it's a good idea.
lcd_47
Engineer
Engineer
Posts: 78
Joined: 27 Sep 2006 18:04

Re: Show in title bar that game is paused

Post by lcd_47 »

leifbk wrote:I'm always running lots of tasks simultaneously on my computer, and have a terrible habit of forgetting to pause OpenTTD when I switch to a different task. Sometimes I even go to sleep while the game is running, only to return like a Rip van Winkle the next day to find that decades have gone by. From what I know of programming, it shouldn't be too hard to change the window title to include the legend ** PAUSED ** (preferrably at the beginning) or something to that effect when pause is on. That would make the problem a lot easier to spot.
The same problem has bothered me for a long time. My solution was to write a patch to pause the game when the main window is minimised. It Works For Me (TM) on UNIX. It probably could have been done a lot better (f.i. it could have had its own button in the settings), but the patch below addresses the case I care for. FWIW.

Edit: I can't seem to be able to attach the patch, so here it is.

Edit 2: The patch only works with the SDL driver (i.e. it won't work on Windows).
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: Quinch and 31 guests