Page MenuHomeWildfire Games

Corsica vs Sardinia tiny mapsizes
ClosedPublic

Authored by elexis on Apr 25 2017, 3:30 PM.

Details

Summary

As reported by bb in #4531, the map Corsica vs Sardinia completely fails to generate on many map seeds, probably since the map was introduced.
This is because it tries to paint the beaches outside of the map border.

So adding a simple check for map boundaries fixes the issue. If someone comes up with a better formula, feel free to post it.

Test Plan

Generate lots of tiny corsica vs sardinia maps.

Notice that if we do the boundary checks earlier for example before the createArea call or even the startX boundary check before the endX assignment, we get way worse results and inaccessible beaches.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

elexis created this revision.Apr 25 2017, 3:30 PM
Vulcan added a subscriber: Vulcan.Apr 25 2017, 4:15 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/890/ for more details.

bb accepted this revision.Apr 26 2017, 10:01 PM

Noticing some style ugliness in the surrounding code, but out of scope.
Tested with about 20 different seeds on tiny, and a couple more on other map sizes.

This revision is now accepted and ready to land.Apr 26 2017, 10:01 PM
This revision was automatically updated to reflect the committed changes.

Thanks for the review