Page MenuHomeWildfire Games

Harbor rewrite
Needs ReviewPublic

Authored by smiley on Jun 14 2018, 7:37 PM.

Details

Reviewers
FeXoR
Trac Tickets
#4947
Summary

Rewrite harbor without the proxies used in rmgen2 and fix some know issues. Such as circles of grass being painted under the water. The shape of the harbors are also slightly modified to a more natural look.
Not quite ready for review just yet.

Test Plan

Apply and generate.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6250
Build 10376: Vulcan BuildJenkins
Build 10375: arc lint + arc unit

Event Timeline

smiley created this revision.Jun 14 2018, 7:37 PM
Owners added a subscriber: Restricted Owners Package.Jun 14 2018, 7:37 PM
Vulcan added a subscriber: Vulcan.Jun 14 2018, 8:17 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'heightOffsetSpine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/harbor.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/harbor.js
|  60|  60| 
|  61|  61| g_Map.log("Creating spines");
|  62|  62| var numSpines = ((numPlayers <= 3 || mapSize >= 320) && numPlayers <= 4 ? 2 : 1) * numPlayers;
|  63|    |-var [spineSize, spineTapering,  heightOffsetSpine] = mapSize <= 192 ? [0.02, -0.1, 20] : [0.5, -1.4, 35];
|    |  63|+var [spineSize, spineTapering, heightOffsetSpine] = mapSize <= 192 ? [0.02, -0.1, 20] : [0.5, -1.4, 35];
|  64|  64| 
|  65|  65| for (let i = 0; i < numSpines; ++i)
|  66|  66| {

Link to build: https://jenkins.wildfiregames.com/job/differential/650/display/redirect

Worth having?

FeXoR added a reviewer: FeXoR.Jan 5 2019, 6:38 PM
FeXoR added a subscriber: FeXoR.

Removing dependencies without much duplication sounds like a good idea to me, yea.

elexis updated the Trac tickets for this revision.Jan 6 2019, 4:04 PM
elexis added a subscriber: elexis.Jan 6 2019, 4:08 PM

(In general currentBiome() conditions are meh, the biome should specify biome-specifc things and then the map should unconditionally use the biome templates.)

binaries/data/mods/public/maps/random/harbor.js
219

here and below, move template to the top for consistency

This diff is with changes to the shape of the harbor to minimise perfect circles ftw. If that’s bad, I am sure there would be a DiskPlacer changed to ClumpPlacer somewhere.