Implemented All 18 Biomes + Complete Documentation - Dec 25 2025

This commit is contained in:
David Kotnik
2025-12-25 17:31:14 +01:00
parent fd634f6233
commit 10772a9646
20 changed files with 3960 additions and 49 deletions

View File

@@ -18,12 +18,12 @@ class BiomeSystem {
color: 0x4a9d5f,
tileColor: '#4a9d5f',
features: {
trees: 0.05, // 5% tree coverage
trees: 0.05,
rocks: 0.02,
flowers: 0.15
},
weather: 'normal',
temperature: 20 // Celsius
temperature: 20
},
forest: {
id: 'forest',
@@ -31,7 +31,7 @@ class BiomeSystem {
color: 0x2d5016,
tileColor: '#2d5016',
features: {
trees: 0.60, // 60% tree coverage!
trees: 0.60,
rocks: 0.05,
bushes: 0.20,
mushrooms: 0.10
@@ -60,7 +60,7 @@ class BiomeSystem {
features: {
rocks: 0.40,
largeRocks: 0.20,
snow: 0.10 // At peaks
snow: 0.10
},
weather: 'cold',
temperature: -5
@@ -78,6 +78,219 @@ class BiomeSystem {
},
weather: 'foggy',
temperature: 18
},
// ===== NEW BIOMES - NORMAL (4) =====
snow: {
id: 'snow',
name: 'Frozen Tundra',
color: 0xE0F7FA,
tileColor: '#E0F7FA',
features: {
ice: 0.40,
frozenTrees: 0.15,
snowDrifts: 0.25,
icicles: 0.10
},
weather: 'blizzard',
temperature: -20
},
wasteland: {
id: 'wasteland',
name: 'Wasteland',
color: 0x4a4a4a,
tileColor: '#4a4a4a',
features: {
ruins: 0.30,
rubble: 0.40,
scrapMetal: 0.20,
brokenMachinery: 0.15
},
weather: 'dusty',
temperature: 25
},
tropical: {
id: 'tropical',
name: 'Tropical Beach',
color: 0xFFE082,
tileColor: '#FFE082',
features: {
palmTrees: 0.25,
coconuts: 0.15,
shells: 0.20,
water: 0.40
},
weather: 'sunny',
temperature: 30
},
radioactive: {
id: 'radioactive',
name: 'Radioactive Zone',
color: 0x39FF14,
tileColor: '#39FF14',
features: {
glowingRocks: 0.30,
mutantPlants: 0.25,
radioactiveBarrels: 0.15,
toxicPuddles: 0.20,
glow: true
},
weather: 'toxic',
temperature: 28
},
// ===== NEW BIOMES - ANOMALOUS (9) =====
dino_valley: {
id: 'dino_valley',
name: 'Dino Valley',
color: 0x6B8E23,
tileColor: '#6B8E23',
features: {
prehistoricTrees: 0.45,
largeFerns: 0.35,
dinoFootprints: 0.20,
fossils: 0.10,
eggs: 0.05
},
weather: 'humid',
temperature: 32,
anomalous: true,
unlockRequirement: 'portal_dino'
},
mythical: {
id: 'mythical',
name: 'Mythical Highlands',
color: 0xB39DDB,
tileColor: '#B39DDB',
features: {
magicalTrees: 0.30,
crystals: 0.25,
floatingRocks: 0.20,
rainbows: 0.10,
magicAura: true
},
weather: 'magical',
temperature: 18,
anomalous: true,
unlockRequirement: 'portal_mythical'
},
endless_forest: {
id: 'endless_forest',
name: 'Endless Forest',
color: 0x1B5E20,
tileColor: '#1B5E20',
features: {
ancientTrees: 0.80,
mysteryFog: 0.30,
strangeFootprints: 0.15,
hiddenPaths: 0.20
},
weather: 'misty',
temperature: 12,
anomalous: true,
unlockRequirement: 'portal_endless_forest'
},
loch_ness: {
id: 'loch_ness',
name: 'Loch Ness',
color: 0x546E7A,
tileColor: '#546E7A',
features: {
scottishPines: 0.35,
heather: 0.25,
lochWater: 0.40,
castleRuins: 0.10
},
weather: 'rainy',
temperature: 10,
anomalous: true,
unlockRequirement: 'portal_scotland'
},
catacombs: {
id: 'catacombs',
name: 'Catacombs',
color: 0x3E2723,
tileColor: '#3E2723',
features: {
bones: 0.50,
tombs: 0.30,
skulls: 0.25,
ancientUrns: 0.15,
darkness: true
},
weather: 'underground',
temperature: 15,
anomalous: true,
unlockRequirement: 'portal_catacombs'
},
egyptian_desert: {
id: 'egyptian_desert',
name: 'Egyptian Desert',
color: 0xFFD54F,
tileColor: '#FFD54F',
features: {
pyramids: 0.05,
sandDunes: 0.60,
hieroglyphs: 0.15,
scarabs: 0.20,
sphinx: 0.01
},
weather: 'scorching',
temperature: 45,
anomalous: true,
unlockRequirement: 'portal_egypt'
},
amazon: {
id: 'amazon',
name: 'Amazon Rainforest',
color: 0x1B5E20,
tileColor: '#1B5E20',
features: {
jungleTrees: 0.75,
vines: 0.40,
exoticFlowers: 0.30,
tribalTotems: 0.10,
piranhaRivers: 0.15
},
weather: 'monsoon',
temperature: 35,
anomalous: true,
unlockRequirement: 'portal_amazon'
},
atlantis: {
id: 'atlantis',
name: 'Atlantis',
color: 0x00BCD4,
tileColor: '#00BCD4',
features: {
coralReefs: 0.40,
underwaterRuins: 0.35,
pearls: 0.15,
seaweed: 0.30,
bubbles: true,
underwater: true
},
weather: 'underwater',
temperature: 20,
anomalous: true,
unlockRequirement: 'portal_atlantis'
},
chernobyl: {
id: 'chernobyl',
name: 'Chernobyl',
color: 0x757575,
tileColor: '#757575',
features: {
reactorRuins: 0.20,
abandonedBuildings: 0.40,
radioactiveBarrels: 0.25,
sovietRelics: 0.20,
hazmatSigns: 0.15,
radiation: true
},
weather: 'nuclear',
temperature: 22,
anomalous: true,
isFinalZone: true,
unlockRequirement: 'train_to_chernobyl'
}
};

View File

@@ -167,6 +167,202 @@ class Flat2DTerrainSystem {
}
graphics.generateTexture('tile2d_swamp', size, size);
// ===== NEW BIOMES - NORMAL (4) =====
// SNOW/FROZEN TUNDRA - LIGHT BLUE/WHITE
graphics.clear();
graphics.fillStyle(0xE0F7FA, 1.0); // Light cyan
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 30; i++) {
graphics.fillStyle(0xFFFFFF, 0.7); // White snowflakes
graphics.fillCircle(Math.random() * size, Math.random() * size, 1 + Math.random() * 2);
}
for (let i = 0; i < 15; i++) {
graphics.fillStyle(0xB3E5FC, 0.5); // Ice patches
graphics.fillCircle(Math.random() * size, Math.random() * size, 4);
}
graphics.generateTexture('tile2d_snow', size, size);
// WASTELAND - DARK GRAY/BROWN
graphics.clear();
graphics.fillStyle(0x4a4a4a, 1.0); // Dark gray
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 25; i++) {
graphics.fillStyle(0x333333, 0.6); // Darker rubble
graphics.fillCircle(Math.random() * size, Math.random() * size, 3 + Math.random() * 4);
}
for (let i = 0; i < 10; i++) {
graphics.fillStyle(0x654321, 0.4); // Brown rust
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_wasteland', size, size);
// TROPICAL - YELLOW SAND
graphics.clear();
graphics.fillStyle(0xFFE082, 1.0); // Light yellow sand
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 20; i++) {
graphics.fillStyle(0xFFD54F, 0.5); // Darker sand
graphics.fillCircle(Math.random() * size, Math.random() * size, 4);
}
for (let i = 0; i < 10; i++) {
graphics.fillStyle(0xFFF59D, 0.6); // Light sand
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_tropical', size, size);
// RADIOACTIVE - NEON GREEN
graphics.clear();
graphics.fillStyle(0x39FF14, 1.0); // Neon green
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 20; i++) {
graphics.fillStyle(0x00FF00, 0.8); // Bright green glow
graphics.fillCircle(Math.random() * size, Math.random() * size, 3 + Math.random() * 5);
}
for (let i = 0; i < 15; i++) {
graphics.fillStyle(0x76FF03, 0.6); // Light green spots
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_radioactive', size, size);
// ===== NEW BIOMES - ANOMALOUS (9) =====
// DINO VALLEY - OLIVE GREEN
graphics.clear();
graphics.fillStyle(0x6B8E23, 1.0); // Olive drab
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 25; i++) {
graphics.fillStyle(0x556B2F, 0.6); // Dark olive
graphics.fillCircle(Math.random() * size, Math.random() * size, 3);
}
for (let i = 0; i < 15; i++) {
graphics.fillStyle(0x9ACD32, 0.5); // Yellow green
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_dino_valley', size, size);
// MYTHICAL HIGHLANDS - PURPLE
graphics.clear();
graphics.fillStyle(0xB39DDB, 1.0); // Light purple
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 20; i++) {
graphics.fillStyle(0x9575CD, 0.6); // Medium purple
graphics.fillCircle(Math.random() * size, Math.random() * size, 4);
}
for (let i = 0; i < 10; i++) {
graphics.fillStyle(0xE1BEE7, 0.7); // Light pink/purple
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_mythical', size, size);
// ENDLESS FOREST - VERY DARK GREEN
graphics.clear();
graphics.fillStyle(0x1B5E20, 1.0); // Very dark green
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 30; i++) {
graphics.fillStyle(0x104010, 0.7); // Almost black green
graphics.fillCircle(Math.random() * size, Math.random() * size, 3);
}
for (let i = 0; i < 15; i++) {
graphics.fillStyle(0x2E7D32, 0.5); // Slightly lighter green
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_endless_forest', size, size);
// LOCH NESS - BLUE GRAY
graphics.clear();
graphics.fillStyle(0x546E7A, 1.0); // Blue gray
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 20; i++) {
graphics.fillStyle(0x455A64, 0.6); // Darker blue gray
graphics.fillCircle(Math.random() * size, Math.random() * size, 4);
}
for (let i = 0; i < 15; i++) {
graphics.fillStyle(0x607D8B, 0.5); // Lighter blue gray
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_loch_ness', size, size);
// CATACOMBS - DARK BROWN
graphics.clear();
graphics.fillStyle(0x3E2723, 1.0); // Very dark brown
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 25; i++) {
graphics.fillStyle(0x1B0000, 0.7); // Almost black
graphics.fillCircle(Math.random() * size, Math.random() * size, 3);
}
for (let i = 0; i < 10; i++) {
graphics.fillStyle(0x6D4C41, 0.5); // Medium brown
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_catacombs', size, size);
// EGYPTIAN DESERT - BRIGHT YELLOW
graphics.clear();
graphics.fillStyle(0xFFD54F, 1.0); // Bright yellow
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 25; i++) {
graphics.fillStyle(0xFFCA28, 0.6); // Amber yellow
graphics.fillCircle(Math.random() * size, Math.random() * size, 4);
}
for (let i = 0; i < 15; i++) {
graphics.fillStyle(0xFFE082, 0.5); // Light yellow
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_egyptian_desert', size, size);
// AMAZON RAINFOREST - DARK GREEN (jungle)
graphics.clear();
graphics.fillStyle(0x1B5E20, 1.0); // Dark green
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 30; i++) {
graphics.fillStyle(0x2E7D32, 0.7); // Medium green
graphics.fillCircle(Math.random() * size, Math.random() * size, 3);
}
for (let i = 0; i < 20; i++) {
graphics.fillStyle(0x43A047, 0.6); // Lighter green
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_amazon', size, size);
// ATLANTIS - CYAN/BLUE
graphics.clear();
graphics.fillStyle(0x00BCD4, 1.0); // Cyan
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 25; i++) {
graphics.fillStyle(0x0097A7, 0.7); // Dark cyan
graphics.fillCircle(Math.random() * size, Math.random() * size, 4);
}
for (let i = 0; i < 20; i++) {
graphics.fillStyle(0x4DD0E1, 0.6); // Light cyan
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
// Bubbles
for (let i = 0; i < 10; i++) {
graphics.fillStyle(0xFFFFFF, 0.4);
graphics.fillCircle(Math.random() * size, Math.random() * size, 1);
}
graphics.generateTexture('tile2d_atlantis', size, size);
// CHERNOBYL - GRAY (ruined city)
graphics.clear();
graphics.fillStyle(0x757575, 1.0); // Medium gray
graphics.fillRect(0, 0, size, size);
for (let i = 0; i < 30; i++) {
graphics.fillStyle(0x616161, 0.7); // Dark gray
graphics.fillCircle(Math.random() * size, Math.random() * size, 4);
}
for (let i = 0; i < 15; i++) {
graphics.fillStyle(0x424242, 0.6); // Very dark gray
graphics.fillCircle(Math.random() * size, Math.random() * size, 3);
}
// Radioactive glow spots
for (let i = 0; i < 5; i++) {
graphics.fillStyle(0x39FF14, 0.3); // Green radiation
graphics.fillCircle(Math.random() * size, Math.random() * size, 2);
}
graphics.generateTexture('tile2d_chernobyl', size, size);
// GRASS WITH FLOWERS (VIBRANT!)
graphics.clear();
graphics.fillStyle(0x3CB371, 1.0);
@@ -401,6 +597,36 @@ class Flat2DTerrainSystem {
} else if (biome === 'swamp') {
tileTexture = 'tile2d_swamp';
}
// NEW BIOMES - NORMAL (4)
else if (biome === 'snow') {
tileTexture = 'tile2d_snow';
} else if (biome === 'wasteland') {
tileTexture = 'tile2d_wasteland';
} else if (biome === 'tropical') {
tileTexture = 'tile2d_tropical';
} else if (biome === 'radioactive') {
tileTexture = 'tile2d_radioactive';
}
// NEW BIOMES - ANOMALOUS (9)
else if (biome === 'dino_valley') {
tileTexture = 'tile2d_dino_valley';
} else if (biome === 'mythical') {
tileTexture = 'tile2d_mythical';
} else if (biome === 'endless_forest') {
tileTexture = 'tile2d_endless_forest';
} else if (biome === 'loch_ness') {
tileTexture = 'tile2d_loch_ness';
} else if (biome === 'catacombs') {
tileTexture = 'tile2d_catacombs';
} else if (biome === 'egyptian_desert') {
tileTexture = 'tile2d_egyptian_desert';
} else if (biome === 'amazon') {
tileTexture = 'tile2d_amazon';
} else if (biome === 'atlantis') {
tileTexture = 'tile2d_atlantis';
} else if (biome === 'chernobyl') {
tileTexture = 'tile2d_chernobyl';
}
// Create tile sprite
const tileSprite = this.scene.add.image(worldX, worldY, tileTexture);