Skip to content

stop a flat top stamping its rim down the plateau - #125

Open
Code-Grub wants to merge 1 commit into
DramaticShape:devfrom
Code-Grub:fix/flat-top-rim-repeat
Open

stop a flat top stamping its rim down the plateau#125
Code-Grub wants to merge 1 commit into
DramaticShape:devfrom
Code-Grub:fix/flat-top-rim-repeat

Conversation

@Code-Grub

@Code-Grub Code-Grub commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Cliff tops get their rim line stamped across them several times instead of
once along the north edge. Clearest on the mound the Diglett's Cave mouth
is cut into on ROUTE_2, but it is on cliffs generally.

before and after

Top is dev, bottom is this branch, same camera.

Cause

A flat top fills its depth by cycling the first two drawn rows:

local m = math.min(2, run.extent)
local topTile = map:tileAt(tx, run.north + ((ty - run.north) % m))

That mound's rows are 1,17,17,17,17,17. Tile 1 is the top edge, tile 17
is the rock under it. Cycling two rows lays tile 1 again at ty12, ty14 and
ty16, so the rim turns up three times.

Fix

Where the drawing says the body is all one tile, lay the rim once and hold
the body after it. Art that really does repeat keeps cycling, which matters
for the Safari Zone fences: they alternate two tiles all the way down and
the repeat there is the drawing, not a bug.

Decided per column and per region, since each catches what the other
misses. The columns holding a cave mouth end in the mouth's own tiles, so
per column alone they kept cycling while their neighbours held and left rim
stubs above the doorway. A region vote alone silences a genuine
rim-over-body column sitting in a region of repeating art, of which the
Safari Zone has three. A column holds if either says so. Height is already
reconciled per region in the same function.

Checks

Swept all 222 maps. Of 3088 flat-topped runs, the 1336 rim-over-body ones
change and the other 1752 do not, so the fences and the short walls are
untouched.

  • No geometry change. Comparing frames, nothing changed pixel touches the
    silhouette and no column's extent differs. Only the texel changes.
  • tests/flat_top_test.lua fails if a rim-over-body run revisits an
    earlier row. 1336 failing on dev, 0 here.
  • Safari fence and a Route 4 scene render pixel identical to dev.
  • modkit validate and lint clean. SDK suite 1133/1150, same as dev.

Left the version and CHANGELOG alone so this does not collide with your
release PRs.

Not touched

The Fighting Dojo's walls are drawn on a four row period
(36,37,37,37,36,...) and the two row cycle gets those wrong too. Neither
holding nor cycling is right there so I left them alone rather than guess.

Also worth mentioning: every volume run in all 222 maps has rise = 0, so
the gable branch never runs on terrain and cliffs are flat boxes. That is
why a cave mouth reads square instead of sloping up to its top. Separate
problem, but happy to look at it.

@Code-Grub Code-Grub closed this Aug 6, 2026
@Code-Grub Code-Grub reopened this Aug 6, 2026
@Code-Grub
Code-Grub force-pushed the fix/flat-top-rim-repeat branch from a2cbdb3 to 52ffaf5 Compare August 6, 2026 17:01
A cliff mound is drawn as a rim over a body: its top edge, then the same
rock the whole way down. The top face cycles the first two drawn rows to
fill its depth, so it laid that rim again every second tile. The mound the
Diglett's Cave mouth is cut into came out with three rim lines across it
instead of one along its north edge.

Where the drawing says the body is all one tile, lay the rim once and hold
the body after it. Art that genuinely repeats keeps cycling: the Safari
Zone's fence alternates two tiles the whole way down, and there the repeat
is what the drawing says.

Answered per column and per region, because each catches what the other
misses. The columns carrying a mound's cave mouth end in the mouth's own
tiles, so per column alone they kept cycling while their neighbours held,
leaving rim stubs above the doorway. A region vote alone silences a real
rim-over-body column standing in a region of repeating art, of which the
Safari Zone has three. A column holds if either says so.

Geometry is untouched: the silhouette is pixel for pixel what it was, and
only the texel a top face wears changes. Of 3088 flat-topped runs, the
1336 rim-over-body ones change and nothing else does.

tests/flat_top_test.lua walks every map and fails if any rim-over-body run
revisits an earlier drawn row.
@Code-Grub
Code-Grub force-pushed the fix/flat-top-rim-repeat branch from 52ffaf5 to 20f9e19 Compare August 6, 2026 17:04
@Code-Grub

Copy link
Copy Markdown
Contributor Author
pr125_mound

absol89 added a commit to absol89/DramaticShapeVoxelMod that referenced this pull request Aug 6, 2026
…1 sprites

- OverworldBattle.BattleState:picImage now returns the sprite early for both
  external and ROM images, skipping BattlePics.filled (the opaque-white
  {1,1,1,1} filler). Transparent gaps in ROM sprites now show through instead
  of being painted white. Mode-agnostic (static + animated, species + player).

- Per-slot SHINY options "FRONT SHINY FIX" / "BACK SHINY FIX" (species only;
  players can never be shiny). When ON, the resolver prefers the shiny/ folder
  and, on a missing shiny file, falls back to ROM -- never to the selected
  generation's normal art and never to player.png. Animated gens (front 2-5,
  back 3/5) are forced through the single-image shinyPrefix path so their
  atlases are suppressed and do not play over a shiny mod's sprite.

- gen1 compatibility sets: back-static/gen1 (Yellow GBC backs) and
  front-animated/gen1 (Yellow GBC fronts), 151 each, with provenance READMEs.

- Empty shiny/ folders (front/back x static/animated) ship with READMEs so
  shiny mods have a documented drop target.

- Ported upstream PRs (lib hunks only, tests/VR stripped): DramaticShape#125 flat-top
  meshing fix, DramaticShape#75 LÖVE 12 ShadowMap z-clip, DramaticShape#79 1ST label rename.

Co-Authored-By: Hermes Agent <noreply@nousresearch.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant