No description
HeightAtPixel read a single heightmap cell after truncating the coordinate with (int). Road path points are fractional and spaced under a metre apart, so consecutive points truncated into the same cell (flat), then tipped into the next one (a full inter-cell jump) — a metre-scale staircase under F2's fix. It now reads the four surrounding cells and blends them bilinearly using the fractional part of the coordinate, so height varies continuously with position. Edge clamping is preserved: at the map border the second cell clamps back onto the first, making the blend a no-op rather than an out-of-range read. Only the sampling helper changed. Signature and both callers are untouched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| Client | ||
| Core | ||
| Data | ||
| Resources | ||
| Scenes | ||
| Server | ||
| Tools | ||
| .gitignore | ||
| icon.svg | ||
| icon.svg.import | ||
| islaApocolypse.csproj | ||
| islaApocolypse.csproj.old | ||
| islaApocolypse.sln | ||
| project.godot | ||
| README.md | ||
| ServerConfig.json | ||
IslaApocalypse - Voxel Engine Architecture
Current Version: v0.0.1 (Phase 2 - Voxel Engine Online, v0.0.x Prototyping / Tech Demo) Engine: Godot 4 (C#)
Project Overview
IslaApocalypse is a procedurally generated, multiplayer-ready survival/driving game. The engine uses a two-phase generation system: first building a massive 4096x4096 2D topographical blueprint, and then dynamically translating that data into a 3D Marching Cubes voxel world at runtime.
Development State
- Phase 1: 2D Blueprint Engine -> [COMPLETE]
- Phase 2: 3D Voxel Engine -> [IN PROGRESS - Basic Rendering Online]
Current Capabilities (What works right now):
- The 2D Blueprint (
MapGenerator.cs): Generates a 4096x4096 map usingFastNoiseLite. It features dynamic sea levels, a massive impact crater, tiered city placements (Capitol, Hubs, Villages), and a heavily optimized A* pathfinding network (Highways, Branch Roads, Trails) that utilizes Chaikin's smoothing algorithm. - Binary Serialization: Exports the entire 16-million pixel array and path vectors into a lightweight, byte-aligned
.datfile. - The Data Bridge (
MapDataParser.cs): Seamlessly deserializes the.datfile back into RAM as aWorldBlueprintfor the server to read. - Authoritative Chunk Management (
ServerChunkManager.cs): Dynamically locates the Capitol City, converts pixel coordinates to 3D chunk coordinates, and generates a grid ofChunkDataobjects (32x32x256 meters) around the player. - Marching Cubes Rendering (
MarchingCubes.cs): Translates 2D heightmaps into 3D geometry. Features analytical normals for smooth lighting and dynamically paints Vertex Colors based on the 2DBiomeMap(Wasteland, Sand, Grass, Stone).
Directory Architecture
/Tools/: Contains the v1.0 2D Map Generator and preview scenes. RunMapCaptureTool.tscnto generate a new world seed./Core/: The math and data foundation. Contains the Binary Parser, Marching Cubes algorithm, Biome Palettes, andChunkDatastructs./Server/: The Authoritative Server logic. Manages chunk loading, calculates voxel densities, and handles chunk culling./Client/: The visual layer. Takes rawChunkDataand translates it into GodotMeshInstance3Dobjects with vertex-colored materials.
Next Immediate Steps (Phase 2, Step 4)
- Road Carving: Inject A* road vector data into the
ServerChunkManagerto override the natural heightmap, physically flattening the 3D terrain and painting Asphalt blocks to create drivable highways through the mountains. - Chunk Seams: Implement normal-blending across chunk borders to remove grid-line lighting artifacts.