Opened 8 years ago

Last modified 6 years ago

#3851 new enhancement

Confusing initial metal/stone mine placement on Stronghold

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

Description (last modified by elexis)

When the stronghold pattern is selected by one of the new random map scripts, players are placed side by side in small a circle. Initial metal/stone mines are being placed at a random angle near the CC. This means that it is likely that they will be placed right between two allied players, confusing them which one to gather from.

The placeStronghold function could pass some information to createBase, so that the latter can ensure they are placed at nice angles in case stronghold is the selected placement pattern.

http://trac.wildfiregames.com/raw-attachment/ticket/3851/stronghold_mines.jpg

Attachments (1)

stronghold_mines.jpg (417.4 KB ) - added by elexis 8 years ago.

Download all attachments as: .zip

Change History (5)

by elexis, 8 years ago

Attachment: stronghold_mines.jpg added

comment:1 by elexis, 8 years ago

Description: modified (diff)

comment:2 by elexis, 6 years ago

Description: modified (diff)

Civic centers of allies can even be placed into the starting mines.

The correct way to implement a stronghold base can be found in the very first map that implemented the pattern: Island Stronghold (prior to the introduction of rmgen2 stronghold placement code that shows the reported bug).

It computes the angle of each resource so that the resources are never placed in between players or in the same place as civic centers.

It would be great to avoid further duplication of the starting base code, so maybe retry loops for resources after the civic centers were placed and marking the area between the 4 civic center points as unplaceable would equally solve the issue without hardcoding things.

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

comment:3 by elexis, 6 years ago

In 20516:

Remove getTeamsArray copy from Island Stronghold (r17734) following the introduction of rmgen2 in rP17903 (r18113).

(Don't replace the starting base code of that map to a call to placeStronghold because the code in this variant is the only one that doesn't have resource collisions on tiny maps currently, refs #3851.)

comment:4 by elexis, 6 years ago

In 20891:

Cleanup Island Stronghold starting resources code using vector algebra, mapcenter getter, distributePointsOnCircle, refs #4845, #4854.
Since it is the only map with stronghold placement where the mines are placed facing away from the team center, this code should be moved to a library eventually, refs #3851.

Note: See TracTickets for help on using tickets.