Phase 3: World generation — procedural tilemap for Catalytic Wastes
- simplex-noise with seeded PRNG (mulberry32) for deterministic generation - Biome data: 8 tile types (scorched earth, cracked ground, ash sand, acid pools, acid shallow, crystals, geysers, mineral veins) - Elevation noise → base terrain; detail noise → geyser/mineral overlays - Canvas-based tileset with per-pixel brightness variation - Phaser tilemap with collision on non-walkable tiles - Camera: WASD movement, mouse wheel zoom (0.5x–3x), world bounds - Minimap: 160x160 canvas overview with viewport indicator - 21 world generation tests passing (95 total) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
38
src/data/biomes.json
Normal file
38
src/data/biomes.json
Normal file
@@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"id": "catalytic-wastes",
|
||||
"name": "Catalytic Wastes",
|
||||
"nameRu": "Каталитические Пустоши",
|
||||
"description": "A blasted landscape of scorched earth, acid pools, and crystalline formations",
|
||||
"descriptionRu": "Опалённый ландшафт из выжженной земли, кислотных озёр и кристаллических формаций",
|
||||
"tileSize": 32,
|
||||
"mapWidth": 80,
|
||||
"mapHeight": 80,
|
||||
"tiles": [
|
||||
{ "id": 0, "name": "scorched-earth", "nameRu": "Выжженная земля", "color": "#2a1f0e", "walkable": true, "damage": 0, "interactive": false, "resource": false },
|
||||
{ "id": 1, "name": "cracked-ground", "nameRu": "Потрескавшаяся земля", "color": "#3d2b14", "walkable": true, "damage": 0, "interactive": false, "resource": false },
|
||||
{ "id": 2, "name": "ash-sand", "nameRu": "Пепельный песок", "color": "#4a3d2e", "walkable": true, "damage": 0, "interactive": false, "resource": false },
|
||||
{ "id": 3, "name": "acid-pool", "nameRu": "Кислотное озеро", "color": "#1a6b0a", "walkable": false, "damage": 10, "interactive": false, "resource": false },
|
||||
{ "id": 4, "name": "acid-shallow", "nameRu": "Кислотная отмель", "color": "#3a9420", "walkable": true, "damage": 3, "interactive": false, "resource": false },
|
||||
{ "id": 5, "name": "crystal", "nameRu": "Кристаллическая формация", "color": "#7b5ea7", "walkable": false, "damage": 0, "interactive": false, "resource": false },
|
||||
{ "id": 6, "name": "geyser", "nameRu": "Гейзер", "color": "#e85d10", "walkable": false, "damage": 0, "interactive": true, "resource": false },
|
||||
{ "id": 7, "name": "mineral-vein", "nameRu": "Минеральная жила", "color": "#c0a030", "walkable": true, "damage": 0, "interactive": false, "resource": true }
|
||||
],
|
||||
"generation": {
|
||||
"elevationScale": 0.06,
|
||||
"detailScale": 0.15,
|
||||
"elevationRules": [
|
||||
{ "below": 0.22, "tileId": 3 },
|
||||
{ "below": 0.30, "tileId": 4 },
|
||||
{ "below": 0.52, "tileId": 0 },
|
||||
{ "below": 0.70, "tileId": 1 },
|
||||
{ "below": 0.84, "tileId": 2 },
|
||||
{ "below": 1.00, "tileId": 5 }
|
||||
],
|
||||
"geyserThreshold": 0.93,
|
||||
"mineralThreshold": 0.90,
|
||||
"geyserOnTile": 4,
|
||||
"mineralOnTiles": [0, 1, 2]
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user