Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#4855 closed enhancement (fixed)

Randomize angle on random map scripts for more map variation

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

Description

Random map scripts always use the same angle for rivers seas and other map generation every single time. So it is completely predictable where the enemies are from the first second.

After the code is cleaned up by duplication removal (#4805) and using Vector classes (#4845) that well support arbitrary angles, the rotation of the map generation can be completely randomized.

Thus the player has to explore some territory in order to determine the course of action. The match might be recalled for the unique map generation in the best case.

Change History (9)

comment:1 by elexis, 5 years ago

In 20469:

Unify the other axis of the 8 remaining playerPlacementRiver calls following rP20151, refs #4805.
Use the rotateAround function from rP20468, refs #4845.
Freely randomize the river angle on Corinthian Isthmus following rP20295 and rP20468, refs #4855.

comment:2 by elexis, 5 years ago

In 20910:

Randomize map orientation on most river maps, Gulf Of Bothnia and Migration to remove hardcoded magic numbers and add more variation for the player.
Refs #4855, #4845.

comment:3 by elexis, 5 years ago

Only maps that don't randomize yet:

Linear Player Placement:

  • Hyrcanian Shores
  • Kerala
  • River Archipelago
  • Unknown

Rectangular maps, hence only 4 different angles possible:

  • Corsica
  • Latium
  • Phoenician Levant

Other:

  • Guadalquivir River (weird player angle math)
  • Danubius (would need trigger script changes)

comment:4 by elexis, 5 years ago

In 20933:

Randomize map angle on random maps with linear playerposition pattern, refs #4855, #4845.

comment:5 by elexis, 5 years ago

Milestone: BacklogAlpha 23
Owner: set to elexis
Status: newassigned

comment:6 by elexis, 5 years ago

Resolution: fixed
Status: assignedclosed

In 20934:

Randomize map angle on Guadalquivir River and Latium (refs rP20933), fixes #4855, refs

comment:7 by elexis, 5 years ago

In 20957:

Randomize the river angle on Danubius, refs #4855.

comment:8 by elexis, 5 years ago

In 21082:

Implement a ConvexPolygonPlacer that returns all points in the convex hull of some given points.
Implements the Gift-Wrapping algorithm to compute the convex hull.

Replace the latter half of the pathplacer with this new placer, refs #892.
Improves the performance a bit, refs #5011.

Use the new placer on Kerala and Hyrcanian Shores to replace the workaround from rP20933, refs #4855
(the area is not supposed to be parallel to the meandering river).

comment:9 by elexis, 5 years ago

In 21834:

Fix an OOS on rejoin on Danubius following rP20957, refs #4855, fixes #5198.

Vectors are still deserialized as objects without their prototype functions, so doing math on these obejcts fails upon rejoin, refs #4698.
This patch doesn't add any version incompatibilities and players with the patched version can successfully rejoin unpatched games.

Differential Revision: https://code.wildfiregames.com/D1548
Reviewed By: temple

Note: See TracTickets for help on using tickets.