Files
Battle-for-Tismo/shared/data/map_config.js
T

51 lines
1.7 KiB
JavaScript

// World-generation configuration. The seed is overridden per game; the rest
// tunes the shape and populating of the map.
export const MAP_CONFIG = {
mapSize: { x: 100, y: 100 },
topology: "cylindrical",
terrainSeed: 0,
seaLevel: -0.05,
falloffEnabled: true,
falloffStart: 0.55,
falloffStrength: 0.6,
iceLatitude: 0.9,
noise: {
frequency: 0.02,
octaves: 1,
lacunarity: 2.0,
gain: 0.5,
},
// The finer field that roughens the coastline, and how strongly it bends the
// shore away from the smooth continent outline.
coastNoise: {
frequency: 0.09,
octaves: 2,
lacunarity: 2.0,
gain: 0.5,
},
coastRoughness: 0.4,
// Third pass: clusters of terrain laid over the plains, independent of the
// continent shape so no terrain type follows the landmasses. `coverage` is
// the share of the land aimed for and `size` the tiles per cluster (jittered
// per cluster). Earlier entries take priority where clusters overlap.
terrainBiomes: [
{ terrainType: "Mountain", coverage: 0.03, size: 10 },
{ terrainType: "Hills", coverage: 0.1, size: 26 },
{ terrainType: "Forest", coverage: 0.16, size: 40 },
{ terrainType: "Desert", coverage: 0.08, size: 48 },
],
capitalMargin: 2,
minCapitalDistance: 8,
minCapitalLandmass: 40,
// Landmasses and seas smaller than these fractions of the map are smoothed
// away, so the world reads as a few big continents rather than speckle. The
// thresholds scale with the map, so tiny test maps are left alone.
minIslandFraction: 0.0015,
minLakeFraction: 0.0015,
connectOceans: true,
citiesPerCiv: 10,
// Minimum distance between any two cities during generation (never below 5).
citySpacing: 5,
};