szdytom b6656f5023
feat: Add biome-based terrain generation and Perlin noise implementation
- Introduced a new biome system with various biome types and properties.
- Implemented terrain generation using Perlin noise to create diverse landscapes.
- Added examples for basic tilemap generation and biome analysis.
- Created helper functions for displaying tiles and biomes in the console.
- Enhanced the TileMap class to support chunk-based tile management.
- Developed a PerlinNoise class for generating smooth noise patterns.
- Updated generation configuration to include climate parameters for biomes.
- Implemented error handling for out-of-bounds access in TileMap.

Signed-off-by: szdytom <szdytom@qq.com>
2025-08-01 14:28:36 +08:00

23 lines
429 B
C++

#ifndef ISTD_TILEMAP_CHUNK_H
#define ISTD_TILEMAP_CHUNK_H
#include "tile.h"
#include <cstdint>
namespace istd {
// Represents the position of a tile in the map, using chunk and local
// coordinates
struct TilePos {
uint8_t chunk_x;
uint8_t chunk_y;
uint8_t local_x;
uint8_t local_y;
};
struct Chunk {
static constexpr uint8_t size = 64;
Tile tiles[size][size]; // 64x64 array of tile types
};
} // namespace istd
#endif