Opened 3 years ago

Closed 2 years ago

Last modified 6 weeks ago

#4317 closed defect (fixed)

Merge duplicate Unknown map code

Reported by: elexis Owned by: elexis
Priority: Should Have Milestone: Alpha 23
Component: Maps Keywords:
Cc: Patch:

Description (last modified by elexis)

The three maps "Unknown", "Unknown Land" and "Unknown Nomad" share the same basic map generation code. The duplication should be removed. Perhaps it could be moved to a new file rmlib-unknown/unknown.js.

The map "Unknown Nomad" can be removed entirely once #3591 is implemented.

Change History (4)

comment:1 Changed 3 years ago by elexis

Keywords: simple removed
Priority: Nice to HaveShould Have

WIP patch over at https://code.wildfiregames.com/D252

There should be only one of the three maps with gamesetup options ideally (#4838)

Last edited 2 years ago by elexis (previous) (diff)

comment:2 Changed 2 years ago by elexis

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 20420:

Obliterate Unknown (rP12545), Unknown Land (rP12654) and Unknown Nomad (rP12747) triplication of doom, fixes #4317.

Refactor by moving from procedural programming to functional programming.
Fix the horrendous shoreline performance bug on "Continent" of Unknown as in rP14162 by dropping the historic differences between the maps.

Remove misleading player coordinate computation when generating the terrain on Unknown Nomad, because the players are spawned elsewhere then.
Remove names like md, mdd1 and mdd2 with different connotations in every landscape type.
Remove six more paintRiver copies in the "Edge Seas" variant as in rP20185.
Remove createShoreJaggedness and createExtensionsOrIslands duplication within this triplication.
Remove heightmap initialization octuplication by adding initHeight.
Remove horizontal/vertical duplication by using logical operators.
Remove Painters redundant with the paintTerrainBasedOnHeight calls, pointless comments and cleanup createArea calls as in rP20301.
Remove some forest helper duplication as in rP20406.
Remove references to Math proxies and use the prototype functions directly.
Remove whitespace issues.

Describe remaining calls with human-readable log messages.
Always spawn enough treasures for a CC (instead of sometimes only giving enough for a dock), refs rP16447.
Generate "Mainland" variant with the same probability as the other landscape types.
Generate "Central Sea" variant on Unknown Land too by forcing an Isthmus then.
Don't split players on Unknown Nomad on the "Rivers And Lake" variation, because the resource imbalance is too drastic.
Consistently call markPlayerArea before terrain generation on non-Nomad maps.

Differential Revision: https://code.wildfiregames.com/D252

comment:3 Changed 2 years ago by elexis

Description: modified (diff)
Milestone: BacklogAlpha 23

comment:4 Changed 6 weeks ago by elexis

In 23392:

Landscape and Daytime gamesetup options for the Unknown, Danubius and Polar Sea, refs #4838.

Allow gamesetup options other than biome to determine the map peview image, refs #4962, rP21523.
Add previews for the 12 Unknown, 2 Danubius and 2 Polar Sea variations.
Concludes deduplication of the Unknown (rP12545), Unknown Land (rP12654) and Unknown Nomad (rP12747), refs #4317.

Differential Revision: https://code.wildfiregames.com/D2564

Note: See TracTickets for help on using tickets.