Balance lobe distances
This commit is contained in:
parent
1ea595fbda
commit
bb651ee1aa
2 changed files with 3 additions and 3 deletions
|
@ -142,7 +142,7 @@ export const HILLY_FOREST: LobeGeneratorConstructor =
|
|||
const hillTiles = centralForest.filter(
|
||||
(pos) => islands.data[pos] >= MOUNTAIN
|
||||
);
|
||||
return hillTiles.length > 0;
|
||||
return hillTiles.length > 10;
|
||||
};
|
||||
|
||||
/** form low-lying beach with eroded sections */
|
||||
|
|
|
@ -28,7 +28,7 @@ export class IslandGrid {
|
|||
this.choose(GREEN_ISLANDS),
|
||||
this.choose(SMALL_ISLANDS),
|
||||
this.choose(SMALL_ISLANDS),
|
||||
this.choose(SMALL_ISLANDS),
|
||||
this.choose(ALL_ISLANDS),
|
||||
this.choose(ALL_ISLANDS),
|
||||
NO_ISLAND,
|
||||
NO_ISLAND,
|
||||
|
@ -45,7 +45,7 @@ export class IslandGrid {
|
|||
const xScale = width / 4;
|
||||
const yScale = height / 4;
|
||||
for (let i = 0; i < islandCount; i++) {
|
||||
const rScale = this.rng() / UINT_MAX + 0.5;
|
||||
const rScale = (this.rng() / UINT_MAX) * 2 - 1;
|
||||
const y = rootY + Math.sin(spacing * i) * yScale * rScale;
|
||||
const x = rootX + Math.cos(spacing * i) * xScale * rScale;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue