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

63 lines
2.1 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,
tundraLatitude: 0.66,
// The polar ice and tundra edges are bent by a finer noise field so the
// sheets are jagged rather than straight bands. `iceRoughness` is how far (in
// latitude) the edges may wander; the equatorward core beyond that bound is
// always ice (and always tundra below it).
iceNoise: {
frequency: 0.13,
octaves: 2,
lacunarity: 2.0,
gain: 0.5,
},
iceRoughness: 0.06,
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.22, size: 30 },
{ 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,
};