add cellular automata generator

This commit is contained in:
2026-04-26 04:20:06 +02:00
parent 7f0869ffa4
commit b2a406ca2b
17 changed files with 937 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
using Godot;
namespace Mr.BrickAdventures.Tools.CaLevelGenerator;
public enum CaMode { Cave, Platform, Terrain }
public class CaGeneratorSettings
{
public CaMode Mode { get; set; } = CaMode.Cave;
public int Width { get; set; } = 40;
public int Height { get; set; } = 22;
public Vector2I Offset { get; set; } = Vector2I.Zero;
public float FillDensity { get; set; } = 0.48f;
public int SmoothingPasses { get; set; } = 4;
public bool BorderWalls { get; set; } = true;
public int Seed { get; set; } = 12345;
// TerrainSet == -1 → raw tile mode
public int TerrainSet { get; set; } = 0;
public int Terrain { get; set; } = 0;
// Used only when TerrainSet == -1
public int SourceId { get; set; } = 0;
public Vector2I AtlasCoords { get; set; } = Vector2I.Zero;
}