islaApocalypse/Core/Scripts
beezm 0910338a2a F2: continuous road grade — along-segment elevation + joint smoothing (D-021)
Road elevation is now sampled at the point on the road segment nearest the
column being carved, instead of at the segment's midpoint. The old behaviour
gave every column near a segment that segment's single midpoint height, so each
stretch of road was one flat plank and consecutive planks stepped like a
staircase wherever the road crossed a gradient.

Elevation now varies continuously along the segment, and because neighbouring
segments share an end point the height matches exactly at the joins. A new
ROAD_GRADE_SMOOTHING constant dials between holding a straight grade
(cut-and-fill) and hugging the land, per D-021.

Untouched: density field, Marching Cubes, chunk dimensions, the .dat contract,
and the 2D A* road network itself. Only how existing paths are carved into 3D.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 02:20:50 -04:00
..
BiomePalette.cs F1: soft-fade biome color blending (BLEND_BAND_METERS, geometry untouched) 2026-08-05 01:51:06 -04:00
BiomePalette.cs.uid baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
BlockData.cs baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
BlockData.cs.uid baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
BlockRegistry.cs baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
BlockRegistry.cs.uid baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
ChunkData.cs F1: soft-fade biome color blending (BLEND_BAND_METERS, geometry untouched) 2026-08-05 01:51:06 -04:00
ChunkData.cs.uid baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
ConfigManager.cs baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
ConfigManager.cs.uid baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
Constants.cs F2: continuous road grade — along-segment elevation + joint smoothing (D-021) 2026-08-05 02:20:50 -04:00
Constants.cs.uid baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
Enums.cs baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
Enums.cs.uid baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
MapDataParser.cs baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
MapDataParser.cs.uid baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
MarchingCubes.cs F1: soft-fade biome color blending (BLEND_BAND_METERS, geometry untouched) 2026-08-05 01:51:06 -04:00
MarchingCubes.cs.uid baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
MATH_MARCHING_CUBES.md baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
README.md baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00

📜 Core Scripts Directory - Isla Apocalypse

Overview

The /Core/Scripts directory is the dedicated code repository for all pure C# data structures, universal enumerations, and static mathematical utilities. Everything in this folder is compiled into the shared assembly used by both the authoritative /Server and the rendering /Client.

Core Philosophy: "Pure Data, Zero State." Scripts in this folder define what things are and how to calculate them, but they never remember current game events. They do not track who is online, what chunks are loaded, or what time of day it is. They are stateless, universal blueprints.


🧩 Current Systems (Phase 2)

1. The Voxel Palette System

  • BlockData.cs: The fundamental struct defining the properties of a single voxel (ID, Name, IsSolid, BaseColor).
  • BlockRegistry.cs: The static master dictionary. Contains the hardcoded IDs for every block in the game (Air, Bedrock, Dirt, Asphalt) and provides a safe lookup method (GetBlock) for both the mesher and the physics engine.
  • BiomePalette.cs: The translation layer between 2D and 3D. Contains the logic that dictates the vertical stacking of blocks based on biome and depth (e.g., ensuring mountains have stone beneath snow, and roads are topped with asphalt).

2. Universal Identifiers

  • Enums.cs: The master repository for global enums (Biome, TownTier, MapHalf). By keeping these here, the offline Map Generator, the Server, and the Client are guaranteed to use the exact same integer values for biomes and POIs.

🚀 Future Roadmap & Planned Additions (Phase 2 & 3)

As we build the 3D Chunk Manager and multiplayer networking, this folder will expand to include:

3. The Blueprint Parser

  • MapDataParser.cs (Next Step): A static utility to open and decode the MapData_Seed_[X].dat binary file into usable C# arrays for the Server to ingest.

4. Chunk Data Structures

  • ChunkData.cs: The raw 3D array (byte[,,]) that holds the voxel IDs for a specific 16x16x64 area.
  • Note: This structure will include the IsPlayerProtected boolean flag to support the "Land Claim" delta-backup system, preventing player bases from being wiped out by chunk corruption.

5. Math & Coordinate Utilities

  • VoxelMath.cs: Static helper functions for translating massive 3D World Coordinates into local Chunk Coordinates (e.g., finding out which specific chunk file to load when a player walks to X: 5000, Z: -200).

6. Network Packet Definitions

  • Structs that define the exact byte layout of multiplayer messages (e.g., PlayerDigPacket, ChatPacket) to ensure precise Server/Client synchronization.

⚠️ Directory Rules & Best Practices

  1. No Godot Node Inheritance: Scripts here should rarely, if ever, inherit from Node or Node3D. They are pure C# classes, structs, or static utilities.
  2. No _Process or _Ready: Because these are not attached to active objects in the game world, they do not use Godot's frame-by-frame loop functions.
  3. Strictly Independent: A script in /Core/Scripts cannot reference anything in /Client or /Server. The dependency flows one way: the Client and Server look in to the Core; the Core never looks out.