Files
RP412/tools/pages/tracks.tpl
T
Cyd 0e39075a20 The track plans are the map screen's drawing again
With the models resolving properly there is nothing left to infer, so the
inference goes. Out: the gate tracing, the route/field test, the collapse
of each wall bar to a centreline, the dropping of "isolated" placements.
Every one of those existed to make sense of a track that appeared to be
one model repeated, and it is not.

What is left is what the map screen does. Every placement, its model's
GaugeImage looked up by name, laid down rotated and positioned, at the
LOD the engine would pick for that scale, in the palette the display is
configured with, on the display's own black. So the walls are grey
because index 51 is grey and the score zones are amber because sc50 and
sc500a are drawn in 56 - nothing on the page is a styling choice.

Also right way round now: +X runs right and +Z up, matching the engine and
the map viewer. The nine console pictures are still here, below each
drawing where they exist, captioned as mirrored - they are illustrations
rather than screenshots, and the page no longer quietly adopts their
handedness for everything else.
2026-08-07 15:07:36 -05:00

76 lines
4.2 KiB
Smarty

<!doctype html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Red Planet - the tracks</title>
<style>{css}</style>
<header class="top">
<div class="wrap">
<p class="eyebrow">Red Planet 4.12 &middot; plans drawn from RPL4.RES</p>
<h1>Every track,<br><em>seen from above</em></h1>
<p class="lede">There are no track maps in the game's files, but the game draws
one every race: the map screen renders the track from above. <strong>These plans
are that same drawing, reconstructed outside the game</strong> &mdash; the same
models, the same placements, the same palette, straight down. Nine tracks also
have the picture the setup console showed, and those are here too.</p>
</div>
</header>
<div class="bar">
<div class="wrap bar__in">
<div class="seg" role="group" aria-label="Filter">
<button type="button" data-filter="all" aria-pressed="true">All</button>
<button type="button" data-filter="arcade" aria-pressed="false">Arcade</button>
<button type="button" data-filter="r411" aria-pressed="false">4.11</button>
<button type="button" data-filter="later" aria-pressed="false">Community</button>
<button type="button" data-filter="race" aria-pressed="false">Death race</button>
<button type="button" data-filter="football" aria-pressed="false">Football</button>
</div>
<input id="search" class="search" type="search" placeholder="Search track&hellip;"
aria-label="Search track">
<span class="count" id="count">{n} / {n} TRACKS</span>
</div>
</div>
<main class="wrap">
<div class="key">
<span><i style="background:#4b4b4b"></i>Walls</span>
<span><i style="background:#bf9300"></i>Score zones</span>
<span><i style="background:#870700"></i>Drop zone and markers</span>
<span><i style="background:var(--sys)"></i>Offered for the death race</span>
<span><i style="background:var(--pilot)"></i>Offered for football</span>
</div>
<div class="grid">{cards}</div>
<p class="empty-state" id="nomatch" hidden>No track matches that.</p>
<p class="foot">{n} tracks: {arcade} shipped in the 4.10 arcade cabinets, {r411} added
in 4.11, {later} built by the community afterwards. Each plan follows
<code>NavDisplay::DrawStatic</code>: for every placement in the track's instance
stream, look up that model's <code>GaugeImage</code> and lay it down rotated and
positioned, at the LOD the engine would choose for this scale. Colours are palette
indices resolved through <code>secpal.pcc</code>, the palette the pod's secondary
port is configured with, on the display's own black &mdash; so the walls really are
grey, the score zones really are amber, and nothing here is a styling choice.</p>
<p class="foot">A record is an <code>Entity::MakeMessage</code>
(<code>MUNGA/ENTITY3.h</code>), read by <code>InterestManager::LoadMapStream</code>,
and it carries its own length &mdash; most placements are 76 bytes but every track
has eight of 140, two of 80 and one of 336. It names the model's <em>Model List</em>,
whose <code>GaugeImage</code> is filed under the same model name, so the name is the
join. Models with no gauge image &mdash; <code>oao</code>, <code>snAwork</code>,
<code>pz1</code> &mdash; are skipped here exactly as the map screen skips them, which
is why a card can draw fewer placements than the track contains.</p>
<p class="foot">Seen from above the engine's +X runs right and +Z up:
<code>L4GaugeImagePrimitive::Draw</code> plots <code>(x, z)</code> and the graphics
view's origin is bottom left. The console's own pictures are <em>mirrored</em>
against that &mdash; they are illustrations, not screenshots &mdash; so where a card
shows both, the two are handed differently and each is right for what it is.</p>
<p class="foot">There is still no driving surface anywhere in the file: the track is
walls, zones and markers, never tarmac. Extent is the span of the placements in world
units, so a long thin plan is a point-to-point canyon run and a squat one a circuit
or an arena. Tracks marked NOT IN THE MENU exist in the resource file but the setup
screen does not offer them.</p>
</main>
<script>{js}</script>