Game windows suggestions

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
User avatar
Jubilee
Engineer
Engineer
Posts: 72
Joined: 18 May 2011 08:03

Game windows suggestions

Post by Jubilee »

  1. A way to save the current position of a in-game window as the default would be nice.
  2. A way to automatically open certain windows after loading a game would also be nice.
-----
Chaney 'Jubilee' (Steam powered)
LaChupacabra
Route Supervisor
Route Supervisor
Posts: 391
Joined: 08 Nov 2019 23:54

Re: Game windows suggestions

Post by LaChupacabra »

Jubilee wrote: 20 Apr 2023 13:50 1. A way to save the current position of a in-game window as the default would be nice.
Some time ago a slightly related issue (#9029) was reported on github (warnings appearing in unexpected places), but the solution I proposed there I think would also be a solution for your expectations. :)
It consists in adding a button in the top bar of the window that would save the position for this window in the same way as the button with the square icon saves its size. Then every time you open this window, it will always appear in the same place, regardless of other windows.
Window position lock icon.png
Window position lock icon.png (60.67 KiB) Viewed 2104 times
Jubilee wrote: 20 Apr 2023 13:50 2. A way to automatically open certain windows after loading a game would also be nice.[/list]
It seems feasible to have the save contain information about open windows, their size and positions, but it would require adding a new setting, as this would be rather unwanted behavior for most, and when it comes to adding new settings, developers are quite allergic in this matter. ;)
I am sorry for may English. I know is bed.
User avatar
jfs
Tycoon
Tycoon
Posts: 1763
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Game windows suggestions

Post by jfs »

Adding a way to store open windows and their positions in a saved game would also need some special handling for multiplayer. Keep in mind that when you join a multiplayer game, part of what happens is that the server actually sends you a savegame which your client then loads, and it would be rather wrong for someone else's windows to open on your screen when you join a game.

Also consider the situation where you move a saved game between multiple computers that might run the game in different screen resolutions.

The reason the feature to save window sizes works well enough is that it's a client setting, that's only stored on your computer, and does not get saved in the game file. Windows can also change size when you change the UI scale setting, or change font, or change language.
All windows that open are auto-positioned so they don't depend (as much) on their size possibly being different.


It could be interesting to get a feature like this to "suspend" a game and then pick up exactly where you left off, I have definitely wished for that before too, but there's a bunch of questions to consider first.
User avatar
Jubilee
Engineer
Engineer
Posts: 72
Joined: 18 May 2011 08:03

Re: Game windows suggestions

Post by Jubilee »

jfs wrote: 21 Apr 2023 09:36The reason the feature to save window sizes works well enough is that it's a client setting, that's only stored on your computer, and does not get saved in the game file.
So, why not save the "window should be opened" setting locally too? :) I like to have certain windows always open, in all games, that's why i asked this. I never though it should be a game-based setting.
-----
Chaney 'Jubilee' (Steam powered)
User avatar
Jubilee
Engineer
Engineer
Posts: 72
Joined: 18 May 2011 08:03

Re: Game windows suggestions

Post by Jubilee »

LaChupacabra wrote: 20 Apr 2023 22:14Some time ago a slightly related issue (#9029) was reported on github (warnings appearing in unexpected places), but the solution I proposed there I think would also be a solution for your expectations. :)
It consists in adding a button in the top bar of the window that would save the position for this window in the same way as the button with the square icon saves its size. Then every time you open this window, it will always appear in the same place, regardless of other windows.
I don't see such a button in the game. May i assume it has not been implemented/included in the main game? If this is the case, is there perhaps a patch to enable it? Also, would this button appear in all windows (not only messages)?
-----
Chaney 'Jubilee' (Steam powered)
LaChupacabra
Route Supervisor
Route Supervisor
Posts: 391
Joined: 08 Nov 2019 23:54

Re: Game windows suggestions

Post by LaChupacabra »

Jubilee wrote: 21 Apr 2023 10:16 I don't see such a button in the game.
Because it's just an idea. ;)
jfs wrote: 21 Apr 2023 09:36 Also consider the situation where you move a saved game between multiple computers that might run the game in different screen resolutions.
The save could contain window positions, but the game would only use this information for the single computer where the game was saved.
I am sorry for may English. I know is bed.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Game windows suggestions

Post by Eddi »

and how would the game know whether it was the same or a different computer?
MrHindsight
Engineer
Engineer
Posts: 1
Joined: 15 Nov 2022 19:04

Re: Game windows suggestions

Post by MrHindsight »

Wait a minute. In android, if you tap ctl and then the button with 🔳 in the top right of each window. It will then remember the window size? Can I delete this post?
Last edited by MrHindsight on 22 May 2023 20:34, edited 2 times in total.
LaChupacabra
Route Supervisor
Route Supervisor
Posts: 391
Joined: 08 Nov 2019 23:54

Re: Game windows suggestions

Post by LaChupacabra »

Eddi wrote: 14 May 2023 11:16 and how would the game know whether it was the same or a different computer?
The game has or may have an individual number / identifier. There may even be several of these identifiers with varying degrees of confidentiality and availability (for different purposes). The one with the lowest level could be completely public and would be stored in saves and the private.cfg file. If the ID in the save was the same as in the computer when loading the game, it would be possible to load the saved window positions.
jfs wrote: 21 Apr 2023 09:36 Also consider the situation where you move a saved game between multiple computers that might run the game in different screen resolutions.
This identifier can also include the resolution of the monitor. Alternatively, window positions can be saved as proportions, e.g. 1030/1980-247/920 instead of 1030-247 coordinates.

Btw. This is not a function I care about. I'm just answering your doubts. ;)
I am sorry for may English. I know is bed.
User avatar
Jubilee
Engineer
Engineer
Posts: 72
Joined: 18 May 2011 08:03

Re: Game windows suggestions

Post by Jubilee »

I don't know if there are other user requests that would have such problems with storing the data inside the save file, but a solution could be to enhance the game file loading/saving process.

Explaining the idea:

Support a new savegame file extension in addition to .sav (i.e. .saz) which will actually be a zip file. Inside it, the .sav file will exist as is today. It could also contain additional files which would contain all extra data that for any reason is difficult to save in the .sav file. Any additional files that may contain Window positions or anything else, would not be crucial for the game so if they exist, fine, if they don't, fine again, the defaults would be used. The game will only search for the .sav file inside the .saz and if not found, it will complain that the game cannot be loaded. If some settings are PC-specific, a file containing the PC's name (i.e. MyPC'sName.cfg) could exist in the .saz, containing all the necessary settings.

Too much??? Could this be problematic?
-----
Chaney 'Jubilee' (Steam powered)
skc
Traffic Manager
Traffic Manager
Posts: 177
Joined: 17 Sep 2022 02:02

Re: Game windows suggestions

Post by skc »

A better way to handle this:
Save the window positions completely separately from the save game - that's what the config file is for!
That way, if I send you a copy of my saved game, you're not getting any information specific to my PC or myself that could be identifiable beyond what's already in the save game (I often use my own name as the manager's name and to build the company's name).

I certainly love the idea of having certain windows automatically open when I load a game and having their position remembered as well would be great - I really like to have the transparency controls open all the time.
There is already a windows.cfg file, which stores 3 values: preferred sticky state, width, and height. It wouldn't take much to add auto-open, and the x- & y- co-ordinates, to that file.
LaChupacabra
Route Supervisor
Route Supervisor
Posts: 391
Joined: 08 Nov 2019 23:54

Re: Game windows suggestions

Post by LaChupacabra »

Jubilee wrote: 24 May 2023 06:30 Support a new savegame file extension in addition to .sav (i.e. .saz) which will actually be a zip file. Inside it, the .sav file will exist as is today. (...)
Too much??? Could this be problematic?
It's completely unnecessary. There shouldn't be any problems with including some additional information - almost every game update introduces some changes to the save format.
skc wrote: 24 May 2023 06:54 A better way to handle this:
Save the window positions completely separately from the save game - that's what the config file is for!
You may have missed the first post. ;) We are talking about two separate functions here:

1. Saving default/fixed window positions as currently can be done for their size.
Yes, in this case, the parameters can and should be saved in the windows.cfg configuration file

2. Saving the game with open windows positions and loading the game with these open windows without having to re-open them manually.
Here we are talking about an effect similar to what jfs described, i.e. loading a suspended game. There was no question of opening these windows every time a new game was launched, because that's not even fully possible. You won't open a city, enterprise or vehicle window that was open in the previous game, because they simply won't be there in the new game. Also, I don't think it makes much sense to open any windows by default. At least from my point of view, it doesn't make sense. I prefer to start every game with a clean sheet of paper. Continuing a saved game is a different matter, where thanks to loaded windows it is easier to find yourself at the point where you left off.

Regarding the transparency option, I admit that this is an exception and the option to permanently open this window would not be meaningless. Although, is using the Ctrl+X hotkey a problem? Personally, I don't even use it. I just changed the hotkeys so that the individual transparency options are much more easily accessible (F5 - F12) and I think this is a better solution. So maybe it would be worth considering a change in this direction?

delete_windows = ESC (not any DELATE somewhere far from your hand)
delete_all_windows = SHIFT+ESC

transparency_toolbar = CTRL+X

transparency_signs = F5
transparency_industries = F6
transparency_buildings = F7
transparency_structures = F8

transparency_houses = F9
transparency_trees = F10
transparency_bridges = F11
transparency_catenary = F12

transparency_loading = CTRL+F12


When using the Ctrl+X hotkey, the only problem is that the window always appears in the center of the screen, instead of somewhere on the edge... Then an additional button that saves the window's fixed position would solve this problem. ;)
Transparency Option window + lock position button.png
Transparency Option window + lock position button.png (20.42 KiB) Viewed 1789 times
I am sorry for may English. I know is bed.
User avatar
GarryG
Tycoon
Tycoon
Posts: 5892
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Game windows suggestions

Post by GarryG »

SAND BOX MODE


Could a sand box mode be added to the start up menu to make it easier for young kids and new members to learn how to play?

I regularly go train watching sitting on stations watching what goes by and get to talk to other passengers waiting for a train or have same idea as me. I often mention OpenTTD to encourage new players.

A few weeks ago there was a lady there with her 9 year old autistic son who had already tried to play the game but kept ran out of money quickly. They did not know about the cheat code. So I told them and he now very happy chappy.
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
User avatar
Jubilee
Engineer
Engineer
Posts: 72
Joined: 18 May 2011 08:03

Re: Game windows suggestions

Post by Jubilee »

LaChupacabra wrote: 24 May 2023 17:35It's completely unnecessary. There shouldn't be any problems with including some additional information - almost every game update introduces some changes to the save format.
Well, from the answers in this post, i've got the impression that storing such info (which are PC/User specific) in the savegame file would not be such an easy task, especially in multi-player games, that's why i proposed a new format. Retains the compatibility with old games and introduces the ability to store new stuff for each user separately. Also, as things progress, gives the ability to use newer/open data formats (XML/JSON instead of binary).
GarryG wrote: 10 Jun 2023 23:23Could a sand box mode be added to the start up menu
Nice idea. Seems relatively easy (the keyword here is "seems", hopefully it actually IS easy) to add a mode in which a game would start with giving 1,000,000,000,000 credits to each player...
-----
Chaney 'Jubilee' (Steam powered)
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 13 guests