Opened 9 years ago
Last modified 2 years ago
#3049 new defect
Rewrite/restructure gamesetup
Reported by: | leper | Owned by: | leper |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | UI – Game setup | Keywords: | |
Cc: | Patch: |
Description (last modified by )
Currently gamesetup.js
is not really extensible to support trigger/campaign maps where some settings should be fixed while others can be changed (e.g. allowing the player to assign himself to slots 1 and 3 on a 4 player map). See also #4838.
The logic to decide what settings can be changed (for RMS, Skirmish Maps, and Scenarios) is also quite duplicated. (done in r19504)
The code could also use some improvement such that the persistent game settings can work with just storing the minimum of information needed to recreate the settings instead of saving everything and then hoping that it doesn't cause conflicts/issues later (see #3044, #3033).
--
See https://trac.wildfiregames.com/ticket/3049#comment:16 for updates
Change History (19)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Is there a gamesetup-wishlist?
Things like the ability that each player in a networked gamesetup should be able to choose his/her own civ/color/position - perhaps a more AOE-like behaviour could be taken, so that colors are hardwired to positions or such.
Anyway, yes, gamesetup needs a rewrite.
comment:3 by , 9 years ago
comment:6 by , 9 years ago
Milestone: | Alpha 19 → Backlog |
---|
comment:9 by , 6 years ago
Description: | modified (diff) |
---|
comment:10 by , 6 years ago
Description: | modified (diff) |
---|
comment:11 by , 5 years ago
Component: | UI & Simulation → Game setup |
---|
Move tickets to Game Setup
as UI & Simulation
got some sub components.
comment:12 by , 4 years ago
Currently gamesetup.js is not really extensible to support trigger/campaign maps where some settings should be fixed while others can be changed
Phab:D2483 rewrites/restructures gamesetup to be really extensible to support trigger/campaign maps where some settings should be fixed while others can be changed.
The question is only what "some" means.
Either it means a map can predetermine every mapsetting, which would be the greatest extent of freedom of map authors, or it means only a subset of the settings, such as the example you mentioned (which is covered in that patch):
(e.g. allowing the player to assign himself to slots 1 and 3 on a 4 player map)
Notice that allowing the map to fix every type of setting will also break the "Random" random map selection. That item inherently requires the random map to adapt to the user given settings.
For example if the users chose 8 players with 4 AIs on a large mapsize with revealed map and locked teams on a random map, but then the randomly chosen map only supports medium size with 2 players, diplomacy mode and unrevealed map, either the players will get the opposite of what they ordered, or that map will be excluded from the list of random maps that can be chosen (idea by bb few years ago on irc). The latter however means that no map at all may be compatible with the user chosen settings if all maps make restrictions. Random map scripts are made from code, so they can perfectly shape the map according to user provided settings. So that gamesetup support may be implemented, but it would still be a poor map design decision for the stated reasons, which is why I closed #1834 as won't fix.
So the points mentioned in this ticket may either be closed as fixed or closed as "needs info", where info is actual feature design.
Especially notice that there is literally no distinction between Skirmish and Scenario maps anymore if both maptypes can restrict or open up the same amount of settings, which is something that should have been planned before introducing the Skirmish map type.
The gamesetup rewrite at Phab:D2483 will allow Skirmish/random maps to fix AIs and Civs per playerslot while for the other setting types overwriting the user chosen values with the map values while still leaving the user the freedom to change these settings, and simultaneously discouraging maps from using this feature in preference of keeping user setting value choices when there is no strict necessity to overwrite those.
Notice one could also change the mapData format to allow both specifying only a default value for a setting type and fixing a setting value. For example { "Civ": { "value": "rome", "fixed": true } }
. This would cover the point "some settings should be fixed while others can be changed" to the fullest extent but would come at the disadvantage of introducing a new format and more complexity (and still breaking the random-random map item and still surprising the user with settings he didn't chose).
So either this is what is wanted by the ticket description, or close as fixed, or close as needs info, or close as invalid.
comment:16 by , 3 years ago
Milestone: | Backlog → Alpha 26 |
---|
Adding that the player assignments should be reworked. First, the GUID -> data map is inconvenient for actual assignments, and second the C++ should not care until the game is started, letting JS handle it (see also game settings, where that's the case).
The initial description is still valid though some work towards lockable setting is in place, and settings are decoupled from the GUI somewhat.
Persistent settings should be improved by having their own deserialisation function IMO.
comment:17 by , 3 years ago
Description: | modified (diff) |
---|
comment:19 by , 2 years ago
Milestone: | Alpha 26 → Backlog |
---|
In 16346: