Opened 13 years ago

Closed 13 years ago

#691 closed enhancement (fixed)

Separate playable maps from testing maps

Reported by: Kieran P Owned by: Philip Taylor
Priority: Must Have Milestone: Alpha 3
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by Kieran P)

Implementation Notes:

  • Should be able to add new folders into maps/scenarios and move maps into them and have them still work properly (map should still display in the overall map list, i.e. folders do not affect listing of the maps). Purely for organizing files, not the GUI.
  • Add field to map files, <MatchType name="...." />
  • Generate match type dropdown from various different map types in the xml files, and have them filter map list by that MatchType value.
  • Clean up code so you don't need to change so many mapType if and case statements in JS and C++.

End Goal:

  • I create maps/scenarios/testing, throw some maps into it, edit the maps and set MatchType to "Testing".

End Result:

In the gui, you have a match type dropdown with options derived from <MatchType>, namely 'Playable' and 'Testing'. When I select testing, I see only maps where they have <MatchType name="Testing" />

Change History (4)

comment:1 by Kieran P, 13 years ago

Description: modified (diff)
Owner: changed from Kieran P to Philip Taylor

comment:2 by Kieran P, 13 years ago

Priority: majorcritical

comment:3 by historic_bruno, 13 years ago

  • Should be able to add new folders into maps/scenarios and move maps into them

One issue specific to nested directory structure like that: the game setup would be required to store the path of the map not just the name, and that means in multiplayer games everyone would need their maps to be in the exact same path (because the host chooses the map). That may or may not be a major concern, and it would go away if we made the server "send" modded files to the other players before the game started - that's an issue for another ticket :)

  • Add field to map files, <MatchType name="...." />

Right now, the maps are unofficially divided into scenarios and random (different directories as they are different file types and incompatible). So those are the two "map types" of the game, unless we add saved games later in the same UI - they would also be a different format.

One problem with a new XML tag is it's one more thing we have to parse before displaying the list, but also we have to think about how to handle variations in caps and spelling: is "Testing" the same as "Test", are those the same as "test" or "TEST", etc. Will the tag be required for every map or is it optional, and how to handle the case where it's missing? Maybe it's as simple as adding a "Testing" checkbox to the Atlas GUI - then automatically fill in the tag.

We could use the recursive directories concept you mentioned first, to filter testing from playable maps or packs that people choose to distribute. "...maps/scenarios/test" could be for test maps, "...maps/scenarios" for normal maps, "...maps/scenarios/jmpack" for maps made by Joe Modder, etc. It seems more intuitive to me if directory structure determines whether a map is "special" and how it should be filtered.

comment:4 by Kieran P, 13 years ago

Resolution: fixed
Status: newclosed

This has been done. Nested folder support is enabled. Keywords are now set in the map xml and filters defined in gamesetup.js for filtering in the GUI. A very nice, clean implementation. Good job historic_bruno!

Note: See TracTickets for help on using tickets.