HomeWildfire Games

Reverse engineer and unify the 14 copies of the river drawing random mapgen…

Description

Reverse engineer and unify the 14 copies of the river drawing random mapgen code.

Splits unrecognizably blended magic numbers and makes them available for map editors.

Removes copied terms of copies of conditions of copied of functions,
unused variables, overwritten values, checks that are always true, dead code from checks that are always false and
things like 9 pairs of unneeded parentheses in a single line that was copied several times.

Remove the useless RectPlacer terrain painting call on Guadalquivir River.
Make danubius river borders parallel and drop thetha/seed differences.
Use planar instead of slopy water ground level for Phoenician Levant.

Copied and obscured by
rP11137 Aegan Sea, Guadalquivir River, Hyrcanian Shores, Phoenician Levan, Nile,
rP12545 Unknown,
rP12654 Unknown Land,
rP12747 Unknown Nomad,
rP12786 English Channel,
rP13134 Kerala,
rP19434 Danubius.

Details

Committed
elexisSep 15 2017, 5:24 AM
Parents
rP20184: petra: remove some unused code + some minor tunings
Branches
Unknown
Tags
Unknown
Build Status
Buildable 3170
Build 5472: Post-Commit BuildJenkins

Event Timeline

elexis added inline comments.Jan 8 2018, 5:43 PM
/ps/trunk/binaries/data/mods/public/maps/random/rmgen/misc.js
179

Typo in l179. cuX is the river curve of one riverside, built from the sinus thing consuming seedX/thethaX. Fixed in rP20429,

186

The amplitude of the fuzz should not be proportional to the location of the river but to the distance to the river border.
(Didn't come into play yet (as of rP20423) since only Guadalquivir River uses the deviation and only at a fixed location.)

Fixed in rP20429