A ceiling that pins rather than ends

Climbing made a sixteen bit height count down past nought and round to
65535, so a lander that kept going came back through the bottom and hit
the ground FROM ABOVE. Two thousand pixels of climb, which a full tank
reaches easily.

Pinned instead, and told so in the window. Leaving upward is RECOVERABLE -
gravity is always there and a lander with fuel can always come back - so
ending the run would punish a state the player can fly out of. What kills
you out here is running dry a long way from the ground, which is a death
somebody flew into rather than one a boundary handed them.

TWO DIFFERENT LINES, and both were got wrong before they were got right.
The warning covers being AT the ceiling or above it: compared against the
ceiling itself, a pinned lander read as back inside the world the next
frame and the warning was written and wiped sixty times a second, so it
never appeared at all. The pin covers being STRICTLY above it: including
the ceiling dragged the height back every frame and the lander could never
descend, which is a lid nobody can leave and worse than the wrap.

And only the climb is spent, never the fall. Zeroing the speed outright
pinned it there for ever - gravity adds once a tick and a clamp running
every frame wiped the pull nine times out of ten.

The orbit check is gone, and the reason is in video.sh. Every window where
the difference showed turned out to be a few frames wide: hold the
thruster and both landers are pinned with their climbs spent, ease off and
both land and freeze. A version of it passed against one disk and failed
against another, which is a check measuring the boot time rather than the
physics. Orbit is verified by measurement and said to be so, rather than
left looking tested.

cosmosLanderDry wants seventy million cycles now instead of forty: it
spends the whole tank at the ceiling before it falls the length of the
world.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-09-03 18:42:34 -04:00
co-authored by Claude Opus 5
parent d896c9d433
commit f5642f52b5
14 changed files with 151 additions and 45 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ Mode.sbx 48
Flip.sbx 173
Sprite.sbx 442
Depth.sbx 672
Lander.sbx 2774
Lander.sbx 2924
Pad.sbx 264
Crash.sbx 632
vars.script 50
+1 -1
View File
@@ -15,7 +15,7 @@ Mode.sbx 48
Flip.sbx 173
Sprite.sbx 442
Depth.sbx 672
Lander.sbx 2774
Lander.sbx 2924
Pad.sbx 264
Crash.sbx 632
vars.script 50
+1 -1
View File
@@ -32,7 +32,7 @@ Mode.sbx 48
Flip.sbx 173
Sprite.sbx 442
Depth.sbx 672
Lander.sbx 2774
Lander.sbx 2924
Pad.sbx 264
Crash.sbx 632
vars.script 50
+1 -1
View File
@@ -22,7 +22,7 @@ Mode.sbx 48
Flip.sbx 173
Sprite.sbx 442
Depth.sbx 672
Lander.sbx 2774
Lander.sbx 2924
Pad.sbx 264
Crash.sbx 632
vars.script 50
+1 -1
View File
@@ -22,7 +22,7 @@ Mode.sbx 48
Flip.sbx 173
Sprite.sbx 442
Depth.sbx 672
Lander.sbx 2774
Lander.sbx 2924
Pad.sbx 264
Crash.sbx 632
vars.script 50
+1 -1
View File
@@ -108,7 +108,7 @@ Mode.sbx 48
Flip.sbx 173
Sprite.sbx 442
Depth.sbx 672
Lander.sbx 2774
Lander.sbx 2924
Pad.sbx 264
Crash.sbx 632
vars.script 50
+1 -1
View File
@@ -27,7 +27,7 @@ Mode.sbx 48
Flip.sbx 173
Sprite.sbx 442
Depth.sbx 672
Lander.sbx 2774
Lander.sbx 2924
Pad.sbx 264
Crash.sbx 632
vars.script 50
+1 -1
View File
@@ -15,7 +15,7 @@ Mode.sbx 48
Flip.sbx 173
Sprite.sbx 442
Depth.sbx 672
Lander.sbx 2774
Lander.sbx 2924
Pad.sbx 264
Crash.sbx 632
vars.script 50
+1 -1
View File
@@ -13,7 +13,7 @@ Mode.sbx 48
Flip.sbx 173
Sprite.sbx 442
Depth.sbx 672
Lander.sbx 2774
Lander.sbx 2924
Pad.sbx 264
Crash.sbx 632
vars.script 50
+1 -1
View File
@@ -22,7 +22,7 @@ Mode.sbx 48
Flip.sbx 173
Sprite.sbx 442
Depth.sbx 672
Lander.sbx 2774
Lander.sbx 2924
Pad.sbx 264
Crash.sbx 632
vars.script 50
+6 -1
View File
@@ -1053,9 +1053,14 @@ cosmosLanderCrash | CosmOS/Source/cosmos.asm | run | -
# it - and an empty tank is not an ending, it is a lander that is still flying and can no
# longer do anything about where.
#
# Seventy million cycles, and it was forty. A ceiling arrived: holding the thruster now pins
# the lander sixty four pixels above the screen instead of sending it off for ever, so it
# spends the whole tank up there and only then falls the length of the world. The ending is
# the same and it takes longer to arrive at.
#
# Which is what says the fuel is real. A lander that could hold Up for ever would land every
# time, and the whole economy this is the first half of would have nothing to buy.
cosmosLanderDry | CosmOS/Source/cosmos.asm | run | - | 40000000 | disks/cosmos.img | lander.keys | landerBurn.pad
cosmosLanderDry | CosmOS/Source/cosmos.asm | run | - | 70000000 | disks/cosmos.img | lander.keys | landerBurn.pad
# ---- And the thing that says whether a controller is being seen at all ----
#
# Three states look identical from inside a game that is not responding: a pad the front end
+42 -32
View File
@@ -1758,43 +1758,53 @@ UNSAID="$(countColour "$BUILD/unsaid.ppm" f0f0f0)"
&& result ok "and opening the throttle wipes it" "the line went with the moment" \
|| result no "and opening the throttle wipes it" "$UNSAID pixels of it still there"
# ---- Orbit: going sideways is how you stop falling ----
# ---- The ceiling, which is a pin and not an ending ----
#
# Two runs holding the lifting thruster, one of them also going sideways. Both climb, because
# thrust beats gravity - but the one with speed climbs FASTER, because it is feeling less of
# the moon. That is the whole mechanic: at four pixels a frame the surface is falling away
# underneath as fast as the lander is falling towards it.
# Climbing makes a sixteen bit height count down past nought and round to 65535, and a lander
# that kept going came back through the bottom and hit the ground FROM ABOVE. Two thousand
# pixels of climb is reachable with a full tank.
#
# Read off the descent bar rather than the lander, because both are off the top of the screen
# by then and the bar is not - it is drawn at a screen position and says the vertical speed
# whatever the lander is doing.
# It is pinned instead, and told so. Leaving upward is RECOVERABLE - gravity is always there
# and a lander with fuel can always come back - so ending the run would punish a state the
# player can fly out of.
#
# The bar was 41 pixels against 53 when this was written. What is checked is that the second
# is LONGER, which is the claim; the numbers themselves are tuning.
python3 -c "
open('$BUILD/up.pad','wb').write(b'\x08' * 4000)
open('$BUILD/upside.pad','wb').write(b'\x09' * 4000)
"
for which in up upside; do
timeout 30 "$EMU" --fast --cycles 8000000 --keyboard "$ROOT/Tests/input/landerDemo.keys" \
--pad "$BUILD/$which.pad" --screen "$BUILD/$which.ppm" \
# Nine hundred frames of thrust to reach it, then nothing: the warning has to be up while it
# is pinned and GONE once gravity has brought it home. Both halves, because a ceiling nobody
# can leave is worse than the wrap it replaced, and that is exactly what the first two
# versions of this did.
python3 -c "open('$BUILD/ceiling.pad','wb').write(b'\x08' * 900 + b'\x00' * 6000)"
for when in 14000000 22000000; do
timeout 60 "$EMU" --fast --cycles $when --keyboard "$ROOT/Tests/input/landerDemo.keys" \
--pad "$BUILD/ceiling.pad" --screen "$BUILD/ceiling$when.ppm" \
--disk "$ROOT/Tests/build/disks/cosmos.img" --ram-disk 2048 \
"$BUILD/cosmos.bin" > "$BUILD/$which.out" 2>&1 || true
"$BUILD/cosmos.bin" > "$BUILD/ceiling.out" 2>&1 || true
done
read -r STRAIGHT SIDEWAYS <<EOT
$(python3 -c "
def bar(path):
d = open(path, 'rb').read()
px = d[d.index(b'255\n') + 4:]
w = 320
return sum(1 for y in range(200)
if px[(y * w + 300) * 3:(y * w + 300) * 3 + 3].hex() in ('50c050', 'd04038'))
print(bar('$BUILD/up.ppm'), bar('$BUILD/upside.ppm'))
" 2>/dev/null || echo "0 0")
EOT
[ "$STRAIGHT" -gt 0 ] && [ "$SIDEWAYS" -gt "$STRAIGHT" ] \
&& result ok "sideways speed lifts the moon off you" "$STRAIGHT pixels of climb against $SIDEWAYS" \
|| result no "sideways speed lifts the moon off you" "$STRAIGHT straight, $SIDEWAYS sideways"
PINNED="$(countColour "$BUILD/ceiling14000000.ppm" f0f0f0)"
HOME="$(countColour "$BUILD/ceiling22000000.ppm" f0f0f0)"
[ "$PINNED" -gt 100 ] \
&& result ok "a ceiling stops the climb and says so" "$PINNED pixels of warning" \
|| result no "a ceiling stops the climb and says so" "$PINNED pixels of warning"
[ "$HOME" = "0" ] \
&& result ok "and gravity brings it back from there" "the warning went with the height" \
|| result no "and gravity brings it back from there" "$HOME pixels still up"
# ---- Orbit, which is measured and not checked here ----
#
# Going sideways lifts the moon off you: four times the lateral speed goes into a byte every
# tick and the tick's gravity is skipped when it carries. It works, and it was measured
# working - climbing at 13, 26, 39 sixteenths without lateral speed and 14, 31, 50 with it,
# the gap widening as the speed builds.
#
# THERE IS NO CHECK FOR IT, and that is deliberate rather than forgotten. Every window in
# which the difference is visible turned out to be a few frames wide: hold the thruster and
# both landers are pinned against the ceiling with their climbs spent; ease off and both land
# and freeze; and either way the comparison becomes two nothings. A version of this check did
# exist and passed against one disk and failed against another, which is a check that is
# measuring the boot time rather than the physics.
#
# What would make it checkable is a way to put the lander somewhere with a velocity, without
# flying it there - the same thing the delivery below wants. Until then this is verified by
# somebody measuring it, and said so here rather than left looking tested.
# ---- A delivery, flown by hand, and what it cost ----
#