From 2968fe378839025303dcf59176be78c2363ab895 Mon Sep 17 00:00:00 2001 From: tobspr Date: Tue, 19 May 2020 00:00:13 +0200 Subject: [PATCH] Reduce chunk size --- src/js/core/config.js | 2 +- src/js/game/map_chunk.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/core/config.js b/src/js/core/config.js index 1b8bea2b..93e2b04a 100644 --- a/src/js/core/config.js +++ b/src/js/core/config.js @@ -27,7 +27,7 @@ export const globalConfig = { maximumTickRate: 500, // Map - mapChunkSize: 32, + mapChunkSize: 16, mapChunkPrerenderMinZoom: 1.3, mapChunkOverviewMinZoom: 0.7, diff --git a/src/js/game/map_chunk.js b/src/js/game/map_chunk.js index ee0ff12a..f51f63a0 100644 --- a/src/js/game/map_chunk.js +++ b/src/js/game/map_chunk.js @@ -244,14 +244,14 @@ export class MapChunk { // Determine how likely it is that there is a color patch const colorPatchChance = 0.9 - clamp(distanceToOriginInChunks / 25, 0, 1) * 0.5; - if (rng.next() < colorPatchChance) { + if (rng.next() < colorPatchChance / 4) { const colorPatchSize = Math_max(2, Math_round(1 + clamp(distanceToOriginInChunks / 8, 0, 4))); this.internalGenerateColorPatch(rng, colorPatchSize, distanceToOriginInChunks); } // Determine how likely it is that there is a shape patch const shapePatchChance = 0.9 - clamp(distanceToOriginInChunks / 25, 0, 1) * 0.5; - if (rng.next() < shapePatchChance) { + if (rng.next() < shapePatchChance / 4) { const shapePatchSize = Math_max(2, Math_round(1 + clamp(distanceToOriginInChunks / 8, 0, 4))); this.internalGenerateShapePatch(rng, shapePatchSize, distanceToOriginInChunks); }