Home /Modules/bash/CONFIG.md

CONFIG.md

bash/model-3D/CONFIG.md · 259 line(s) · markdown

City 3D configuration

Part of SleelaTerminal™ (Phraign™ City 3D), SLeeLa's terminal product, built on GNU Bash (GPL, © Free Software Foundation).

City 3D reads a simple text config file (city.config by default). The format is key = value, one per line; # begins a comment; blank lines are ignored. Unknown keys are ignored (forward-compatible) and missing keys keep their defaults, so a partial config is always valid.

Keys

Model

KeyTypeDefaultMeaning
grid_colsint > 064City width in blocks
grid_rowsint > 064City height in blocks (64×64 = 4096 ≈ 4000)
usertextanonPer-user identity
seeduint640Generation seed; 0 ⇒ derive a stable seed from user

Every user gets their own reproducible city: with seed = 0, the seed is derived from the user name, so the same user always regenerates the same city. Set an explicit non-zero seed to pin a specific layout.

Year — modernity

The city is a model of finality (quality of condition) driven by a Year. A larger, more modern year makes the city newer: taller buildings, more floors and windows, more glass, and better condition. Try a modern future number like 2807 or 2407.

KeyTypeDefaultMeaning
yearint > 02807The city's Year (drives modernity)
year_baselineint2000Year mapped to modernity 0
year_spanfloat > 01000Years above the baseline that reach modernity 1

Modernity is clamp((year - year_baseline) / year_span, 0..1). It scales the building form and feeds finality (below). For example year = 2807 gives modernity 0.807; year = 2050 gives 0.05.

Three drivers shape the design: the Year (modernity), the person's IQ (design quality / order), and the person's native Legislature (the regime that produces the city's lines and linear outcomes). All three are config-driven and all three feed the model.

IQ — the person's IQ / the city's design quality

The city is designed from the person's IQ. This is both a person-level input and, in the project's terms, a system design-quality metric — IQ means insight/quality, not a human psychometric rating. A higher IQ yields a better-planned city: more order and grid regularity, less random jitter, better connectivity (more bridges), and a higher baseline condition (finality).

KeyTypeDefaultMeaning
iqint130The person's IQ (drives design quality)
iq_baselineint100IQ mapped to design quality 0
iq_spanfloat > 0100IQ points above the baseline that reach design quality 1

Design quality is clamp((iq - iq_baseline) / iq_span, 0..1). For example iq = 200 gives design quality 1.0; iq = 100 gives 0.0; iq = 150 gives 0.5.

Legislature — the native regime that shapes the city's lines

The person's native legislature is the defining characteristic of their nature and, in turn, their design; it selects a civic regime whose rules produce the city's lines and linear outcomes — how regular the grid is, how strongly corridors run in straight lines, which axis dominates, and how well they interconnect.

KeyValuesDefaultMeaning
legislature(see below)federalThe civic regime shaping the layout
ValueLines / linear outcome
federalstrong balanced grid — two equal axes
parliamentaryorderly grid with a dominant primary axis
municipaldense, very regular local blocks
bicameraltwo strong crossing axes — pronounced crossing lines
unicameralone dominant axis — banded, strongly linear city
directlooser, more organic lines (least regimented)

Each regime resolves to a profile (regularity, linearity, axis bias, connectivity, and road/bridge spacing adjustments) that, together with the IQ's order, determines the city's straight-line structure.

General cityscape graph — radix / diameter / randomness

The general model (CITYSCAPE_MODEL.md) grows a graph from the center of centricity in the 3rd (vertical) dimension. Its main distribution is drawn as mating pairs of cylinders (columns) that grace spheres of known moral symmetry — a fixed positive, benevolent orientation. These three dimensions add seeded variability over the whole model:

KeyTypeDefaultMeaning
radixint ≥ 13Branching base of the graph (more ⇒ denser distribution)
diameterfloat > 024Radial reach from the center of centricity (blocks)
randomnessfloat 0..10.35Seeded variability over the graph + drivers
draw_cylindersbooltrueRender the mating cylinder pairs + neighbor links

The graph is reproducible for a given (seed, radix, diameter, randomness) plus the Year/IQ/Legislature drivers; higher randomness yields more organic variation while staying reproducible.

Building quality targets

Buildings vary around these targets; modernity scales them up as the city becomes newer.

KeyTypeDefaultMeaning
avg_floorsfloat ≥ 014Target mean number of floors
floor_heightfloat > 01.1World units per floor (height = floors × this)
windows_per_floorfloat ≥ 06Target windows on a visible face, per floor

Each building stores its own floors, windows, and height. Window detailing is drawn on the two visible faces when draw_windows is on.

Roads & bridges — real features

Roads are corridors laid every road_spacing blocks; bridges are spans laid along those corridors. Proximity to roads and bridges is computed per building (a breadth-first distance over the grid — not a config weight), and that computed distance feeds finality through the weights below.

KeyTypeDefaultMeaning
road_spacingint ≥ 28Every Nth row/column is a road corridor
bridge_countint ≥ 06Number of bridge spans placed on the road grid

Finality — quality of condition

Each building's finality is a score in [0,1]: how finished, modern, and well-conditioned it is. It is a normalized weighted mix of modernity (Year), floors, windows, design quality (IQ), and the computed proximity to the nearest road and bridge. The city-wide finality (mean over buildings) is reported by city3d and stored in the model. Higher finality renders brighter/cleaner; lower renders darker/duller.

KeyTypeDefaultMeaning
w_yearfloat ≥ 01.0Weight of modernity (newer ⇒ higher finality)
w_iqfloat ≥ 00.7Weight of design quality (higher IQ ⇒ higher finality)
w_floorsfloat ≥ 00.6Weight of floor count (more ⇒ more finished/dense)
w_windowsfloat ≥ 00.6Weight of windows (more ⇒ more modern/glassy)
w_road_proximityfloat ≥ 00.8Weight of closeness to a road (better serviced)
w_bridge_proximityfloat ≥ 00.5Weight of closeness to a bridge (better connected)
proximity_fallofffloat > 06.0Distance (blocks) at which proximity benefit fades to 0

Only the relative sizes of the weights matter (they are normalized).

Appearance — color theme

KeyValuesDefaultMeaning
themegreen | white | bluegreenColor palette for the render

Green is the default. Each theme resolves to a palette (background, ground, roof, lit wall, shaded wall) so buildings read with a lit top/side and a darker shaded side. Face brightness is then modulated by each building's finality.

Detailing toggles

KeyValuesDefaultMeaning
draw_bridgesbooltrueDraw bridge spans as raised decks
draw_windowsbooltrueDraw window bands on visible building faces

Booleans accept true/false, 1/0, yes/no, on/off.

Viewpoint — seen from the top and slightly to the side

The camera is an oblique projection: the city is viewed from above and angled slightly to one side. It is fully described by these scalars, so the viewpoint is modifiable entirely from the config file.

KeyTypeDefaultMeaning
tilt_xfloat0.55Horizontal skew per unit of depth (side angle)
tilt_yfloat0.42Vertical foreshortening per unit of depth (top-down amount)
scale_xfloat9.0Pixels per block along X (east/west)
scale_heightfloat1.1Pixels per unit of building height
block_pitchfloat9.0Pixels between block centers
origin_xfloat150.0Screen X (px) where the city's near corner lands
origin_yfloat380.0Screen Y (px) where the city's near corner lands

The taller, modern default cities need a smaller scale_height and a lower origin_y than a short city so the skyline fits the frame.

Tuning hints:

Frame — the Phraign per-pixel render target

KeyTypeDefaultMeaning
frame_widthint > 01024Phraign frame width in pixels
frame_heightint > 0768Phraign frame height in pixels

Persistence — where a saved model lives

KeyValuesDefaultMeaning
save_targetgithub | server | locallocalDestination kind
save_locationtext(empty)owner/repo (github), upload URL (server), or path (local)

city3d save prints the save plan for the configured target (for example, the git add/commit/push steps for github, or an upload command for server).

Example

grid_cols = 64
grid_rows = 64
user      = ada
seed      = 0

# A modern, high-finality, well-planned city with strongly linear lines.
year          = 2807
iq            = 165          # high design quality
legislature   = unicameral   # one dominant axis -> banded, linear city
radix         = 3            # graph branching base
diameter      = 24           # radial reach from the center of centricity
randomness    = 0.35         # seeded variability
avg_floors    = 16
windows_per_floor = 8
road_spacing  = 8
bridge_count  = 6
w_iq              = 0.7
w_road_proximity  = 0.8

theme        = blue
draw_bridges = true
draw_windows = true

tilt_x       = 0.55
tilt_y       = 0.42
scale_x      = 9.0
scale_height = 1.1
block_pitch  = 9.0
origin_x     = 150.0
origin_y     = 380.0

frame_width  = 1024
frame_height = 768

save_target   = github
save_location = mearvk/SLeeLa