#4993 closed defect (fixed)
Remove rmgen2 circle patterns
Reported by: | elexis | Owned by: | elexis |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 23 |
Component: | Maps | Keywords: | |
Cc: | Patch: |
Description
The Alpha 20 rmgen2 maps provided by _kali, most prominently Ambush place bluffs and mountains that avoid the player civic center in a perfect circle.
This looks quite ugly and it should be possible to use the ClumpPlacer or ChainPlacer to generate a more randomized land. Then it should be placed completely if it doesn't conflict with player territory - or otherwise not be placed at all.
Attachments (7)
Change History (11)
comment:1 by , 6 years ago
Milestone: | Backlog → Alpha 23 |
---|---|
Owner: | set to |
by , 6 years ago
Attachment: | screenshot1593.jpg added |
---|
by , 6 years ago
Attachment: | screenshot1599.jpg added |
---|
Note:
See TracTickets
for help on using tickets.
Problem sounds easy, solution isn't.
The circle comes from the fact that a big circular area around the player is ignored by bluffs, so that the playerbase, starting resources and starting walls are all on the same ground.
So the first step is easy: change it from a circular avoidance to a ChainPlacer (many circles of different sizes and locations, creating a non-regular pattenr).
But the irregularity of that implies that we can only ensure a small playeraera so that sometimes a single giant bluff entirely surrounds a playerbase with impassable terrain, locking that player in.
Setting the fail-fraction of the bluff from 50% to 0% (i.e. a bluff can only be placed if all of its points avoid the player) would solve these issues. But it is not possible currently due to performance issues. It would be an infinite loop or consume half an hour or more...
So I decided to go for a workaround and place a ramp from the starting base to a nearby bluff. It solves the issue and in most cases changes the gameplay for good. Bluffs now have to ways to enter a mountain. This means it's less a defensive turtle game and there is more competition for these mountains.
But in few cases passages on the ground are blocked by the ramp. Another thing I don't like is that terrain entities (trees) have to be removed from the ramp. This is bad practice and usually first the terrain should be placed, then entities, rather than changing ones mind in the middle of the map generation. But
rmgen2
is not designed for these things (addBluffs
adds the terrain + entities in one go).At the end of the day the circle patterns are so ugly and the circumstances forcing me to use the workaround. With more days of development to spend, more performance improvements and cleanup of
rmgen2
, the situation might change.Another thing I have done in this patch is trying to improve the performance. Tileclasses constraints have a very bad complexity. So in this diff I reduced the time measurably but not sufficiently (still can consume a minute loading screen time) by marking the area bluffs should ignore after painting these areas (rather than recomputing these areas each time the constraint is tested). This adds a lot of code (20-30 lines), but I'll keep it now. It can be removed in case we develop a more general approach (Static constraints? multi caches for constraints? #5011)