Page MenuHomeWildfire Games

improve placement of resources on random map 'Persian Highlands'; keep goats away from lava tiles on random map 'Pompeii'
AbandonedPublic

Authored by Phormio on Jun 2 2017, 10:09 AM.

Details

Reviewers
elexis
Summary

1. On the random map 'Persian Highlands' resources are poorly placed

Trees grow into mines and Iberian walls:

Trees next to the civic center have been abolished because:

  • ~ 1/3 failure rate for placing any trees at all
  • they now can no longer grow into mines
  • trees growing on city tiles are implausible

Straggler trees now have a mandatory distance to city tiles, which keeps them away from Iberian walls.

Goats and sheep are placed inside Iberian walls and walk through them:

They now have a mandatory distance to city tiles to avoid that.

Berry bushes are growing into Iberian walls:

They are now placed closer to the civic center. This sometimes has the side effect that a single berry bush overlaps with it, yet it can be harvested and alternative distance values only lead to worse results.

Berry bushes are growing into mines:

This problem has not been adressed, because a consequence of enforcing a significant distance between both objects is often that one of them can't be placed at all.

Base resources are too close together:

This problem can only partially be adressed, because it is far more likely that objects are not placed as a result of enforcing their separation than some players gaining an unfair starting advantage. Chicken groups are now kept separate, and there is a minimum distance of 1 tile between starting resources of different types.

Unfortunately, mines are now not placed in ~ 1/10 of all cases. I found no remedy.
Overall it cannot be guaranteed that each player has equivalent starting conditions.

2. On the random map 'Pompeii', which overall leaves much to be desired, goats frequently walk over lava tiles:

Possible remedies:

  • place the goats further away from the volcano, so that they will never set foot on them. This would be also their natural behaviour. This differential includes that change.
  • make lava tiles impassable, or, alternatively
  • let units rapidly lose health while positioned on them

The locations of starting settlements should also be improved:

Test Plan

Not applicable. I tested my patch.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 2106
Build 3409: arc lint + arc unit

Event Timeline

Phormio created this revision.Jun 2 2017, 10:09 AM
Owners added a subscriber: Restricted Owners Package.Jun 2 2017, 10:09 AM
Phormio edited the summary of this revision. (Show Details)Jun 2 2017, 10:10 AM
elexis added a subscriber: elexis.Jun 2 2017, 12:34 PM

Unfortunately, mines are now not placed in ~ 1/10 of all cases. I found no remedy.
Overall it cannot be guaranteed that each player has equivalent starting conditions.

It can with retry loops or ensuring sensible angles.

The pompeii change looks good.

binaries/data/mods/public/maps/random/persian_highlands.js
78

Why do we need 4 base resource classes instead of just using that one base resource class?

We can avoid collisions of initial resources by just placing them at a fixed (same) distance to the CC and increasing angles. The non-initial resources can just avoid clPlayer (which is also needed for iberian walls).

79

Why do we need a clCity class if we can just increase the clPlayer distances?

What do we need clCentralPlateau for? I'm if its really not intended to not have mines in the middle and so forth.

144

I doubt having 15 meters distance between chicken is right

180

Mines should always be avoid with distance 4 or greater due to their size.

187

Don't delete startign trees, especially on this map that has about no trees to begin with.

Just use mAngle += something to avoid the resource collisions.

Also all of these initial resource placement calls need to be unified, just like the placeDefaultChicken thing, so that we can add a retry loop too without having to change every occurance in every map.

216

Since the comment says the exact same as the log entry, it should be removed.

Like this doing it (for all?) maps https://github.com/elexis1/0ad/commit/3d371959bcfcc685a1d8fc8a5fb7aaab7cb69948

Phormio edited the summary of this revision. (Show Details)Jun 2 2017, 12:53 PM
Phormio edited the summary of this revision. (Show Details)
Phormio edited the summary of this revision. (Show Details)
elexis requested changes to this revision.Jun 2 2017, 2:59 PM

I propose to make a new differential revision proposal for Pompeii and if we have to fix this one map with resource collisions of startign resources and iberian walls (instead of every map), change the angles used (see for example arctic summer) and base resources closer than walls and other resources farther than the current clPlayer distance to adapt to iberian walls.

binaries/data/mods/public/maps/random/pompeii.js
76

clLava, because the volcano isn't completely covered by lava, so we can even get things placed on top of the volcano with this check. Hence I'd also increase the distance to 5 maybe

This revision now requires changes to proceed.Jun 2 2017, 2:59 PM
elexis added a comment.Jun 3 2017, 2:48 AM

Could have also gotton away with increasing the distance to the "mountain" tileclass, but it's a more appealing result if we allow resources near (but not on) the lava and mountain too.

binaries/data/mods/public/maps/random/pompeii.js
100

Got starting trees exactly on the lava spot on tiny mapsize, default civs, seed 3597. A topic I don't want to get into now. :s

176

This should have a lava call too if we add it for stragglers as well (even if improbably with regards to the mountain distance)

265

same

288

same

335

same

354

Skeletons in lava might be ok

elexis accepted this revision.Jul 9 2017, 2:37 AM

Fixed Pompeii change was committed in rP19722.
Persian highlands change doesn't seem to be the ideal fix. Would be much happier about a solution for every map (unifying the starting resources code one resource for each map)

This revision is now accepted and ready to land.Jul 9 2017, 2:38 AM
elexis abandoned this revision.Jul 9 2017, 2:39 AM

Well, seems I can't close it for good.