Magical gene / magical coat genes

Coastline

A rust landmass lies across a sage sea with a pale grey coastline drawn all the way round it, and small rust islands, each with its own shore, scattered off it.

What it can come out as

OutcomeCarrying
CoastlineCl/Cl · Cl/Cm · Cl/n
Coloured coastlineCm/Cm
Wild typeCm/n · n/n

How each one is actually drawn - region by region, and the layers it is built from - is on the coding tab.

Crossing two of them

Finding one

About 1 in 893 wild horses is born showing this. That is the whole of the supply: catch one, or make one with the carrot below. Breeds set their own pools and a breed built around this gene will carry it far more often than the wild population does.

Wild pairShows asHow often
Cl/ClCoastline0.004% — 1 in 25,000
Cl/CmCoastline0.016% — 1 in 6,250
Cl/nCoastline0.076% — 1 in 1,316
Cm/CmColoured coastline0.016% — 1 in 6,250
n/nWild type99.888%

Its gene carrot

The file

common/src/main/resources/horsegenetics/genes/coastline.json — a data-driven gene, not a Java class. It is listed in the index.json beside it and registered by Genes' class initialiser at startup.

Keyhorsegenetics.coastline
Phasemagical — it adds signed colour in phase 3, after the pigment has resolved
Priority109 — where it sits in the one (priority, key) paint order
AllelesCl · Cm · n
Varies per horse6 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look
Built fromALL, FRACTAL, NOISE, SPOTS, TOWARD

Why it is built this way

The source was an SVG: four flat colours traced off a photograph of a lichened seed pod, about 59 KB. A rust mass against dark sage, a pale grey line following the boundary between them, and small rust islands out in the sage, each ringed by the same pale grey.

Both the mass and the coastline come off ONE FRACTAL field. The land is everything above 0.50; the shore is everything between 0.46 and 0.54, which is the second threshold inverted and multiplied in. They share $landSeed, $landScale, octaves and warp, so the line cannot drift off the coast it is drawing - it is the same function read at two nearby levels.

Those three thresholds are constants rather than knobs, and that is the compromise in this file. A knob for the sea level would be the obvious thing to vary per horse, but the shore has to bracket it and the format has no arithmetic - two independent knobs could roll a shore that does not contain its own coast. The variation goes into $landScale instead, which changes how big the continents are without ever breaking that relationship.

The shore's WIDTH in body units is therefore not a number this file sets. A 0.08 slice of the field is wide where the slope is shallow and a hairline where it is steep, which is what a real coastline does - but it also means a steep-sloped horse can lose the line under a texel. Lower $landScale if that happens: a larger continent has gentler slopes.

The islands are a separate SPOTS scatter, cut to the sea by the inverted land mask, and their rims are the same lattice at a larger radius - seed, spacing, vary and chance shared, radius the only difference, which is what keeps each rim around its own island. 1.85 against 1.3 leaves 0.55 body units of shore, a hair over a texel; spacing 5.0 against a 1.85 outer radius leaves 1.3 units of open water.

The rim is painted BEFORE the island rather than after. A rim drawn over the top would need the island mask inverted inside it and would come out as a ring with a seam where the two coverages met; drawn under, the island simply covers its own middle.

What it paints

Each outcome, described the way the gene file describes it, and then the layers that draw it in the order they are painted. The prose is the part a reader checks a bake against; the list underneath is what the engine actually did.

Coastline

A rust landmass across a dark sage sea, outlined in pale grey, with small rust islands scattered off its shore.

  1. the sea — ALL, painted with TOWARD
  2. deeper water drifting through it — NOISE, painted with TOWARD
  3. the landmass — FRACTAL, painted with TOWARD
  4. the rim around each island — SPOTS × FRACTAL inverted, painted with TOWARD
  5. the islands — SPOTS × FRACTAL inverted, painted with TOWARD
  6. the coastline — FRACTAL × FRACTAL inverted, painted with TOWARD

Coloured coastline

The same map in two colours this line of horses carries, land against sea.

The recessive coloured half of the usual pair, on two hues, because land and sea are the two halves of the same boundary and one hue driving both would erase it. The shore stays pale grey and near-achromatic on purpose: it is the line that separates the two hues and it has to stay lighter than either whatever they roll.

  1. the sea — ALL, painted with TOWARD
  2. deeper water drifting through it — NOISE, painted with TOWARD
  3. the landmass — FRACTAL, painted with TOWARD
  4. the rim around each island — SPOTS × FRACTAL inverted, painted with TOWARD
  5. the islands — SPOTS × FRACTAL inverted, painted with TOWARD
  6. the coastline — FRACTAL × FRACTAL inverted, painted with TOWARD

Wild type

Unmarked.

Paints nothing.