Skip to content

v0.21.0 — Grid streets

Choose a tag to compare

@sligara7 sligara7 released this 03 Jun 02:50

Towns can now be planned, not just organic. A new layout knob lays a real geometric street grid aligned to the town's long axis, with matching rectangular blocks.

Added

  • SettlementConfig.layout"organic" (default) or "grid". In grid mode a town gets:
    • a geometric street grid aligned to the footprint's principal (long) axis — two families of parallel thoroughfares clipped to the footprint, the central line of each marked "main";
    • gates where the main streets pierce the perimeter (plus a harbour gate when coastal);
    • grid-aligned lots — blocks are bisected along the grid axes, so buildings come out rectangular and street-aligned;
    • walls that splice the mid-edge grid gates into the wall ring as real gatehouse gaps.
  • New preset grid_city and a grid-city gallery showcase.
  • New reusable geometry primitive clip_line_to_convex (Liang–Barsky line ↔ convex-polygon clipping).

Compatibility

  • The default (layout="organic") output is byte-identical to v0.20.0 — all grid logic is gated behind the new mode.
  • Purely additive: layout serialises via to_dict / json_schema (new enum-field support in SettlementConfig). No public-API names added.

Full changelog: 7d18d4e...v0.21.0