mirror of
https://github.com/donlucasx/xscapes.git
synced 2026-10-20 08:43:32 +02:00
The measuring done alongside the near crab. Every one of these is a main package under notes/ rather than a test, because `go test` CACHES and the same command with a different environment variable hands back the previous run. ⭐ THE LITTER DOES NOT STAND IN THE WATER. RESUME.md's claim is refuted for every scape height 12..28: the sitters' feet are over dry sand in 100% of 960 frames per point, both animals, every level, and the TIDE MADE IT BETTER at every level rather than causing it. What is true is that the water covers the sitters' TOP rows, and the PARENT is deeper in it than they are. The one real edge is heights 8..11, where there is no writing band so the swell clamp is gated off entirely. (notes/s28-litter) ⭐ THE SIDEWAYS DRIFT HAS NO DIRECTION LEFT. Signed motion +0.05 cells under the tide against -4.4 cells/s leftward at XSCAPES_TIDE=0. notes/drift's "-3" is its own artifact: a +-4 search on a flat profile piles arg-maxes at the boundaries. But the motion he SEES is real and is not a residue -- it is the larger motion on screen, and the cause is geometry, not a term: the crests lie 4.78 cells of x per row of y, so a mark's edge travels sideways at the wave's inward speed times that slope. sea() and swells() each produce it independently, which is why s27's single ablations found nothing. ⚠ The verifier corrected the rate up and caught a real error of ours: "three times inward" divided cells by rows, and a cell is 1.93x taller than wide, so in screen distance it is 1.77:1. (notes/s28-drift, notes/s28-drift-verify) ⭐ THE TIDE'S CHURN CEILING IS BROKEN WHILE THE TIDE MOVES -- 139 of 216 cells, settling to 0.00% against the 8% bar. The cause is that s.tideRow is an INTEGER, so every row boundary the easing tide crosses re-ramps the whole open sea in one frame. And hyFloor cannot do its job at 12-row heights: it is a function of sy alone and never references the horizon, so at 40x12 it permits the water four rows ABOVE it. (notes/s28-guarantees) ⭐ THE SAND-ACROSS-THE-LITTER RATE IS WIDTH-DEPENDENT and nobody said so: 1.84% at 107 columns but 0.74% at 124 and 18.75% at 60. The sand always wins the cell, 509 of 509. SetEyeFill is confirmed product-dead. (notes/s28-smalls) ⭐ THE SEA'S PLATEAU IS HALF FIXED. The waterline's POSITION is a live channel above 0.70 now (28% of a 5.14-row range) where the old fixed waterline moved 0.02 rows in total. (notes/s28-seamap, notes/searange) Also: notes/s28-starflicker settles his "stars appearing and disappearing" -- the CONSTELLATION is steady (0 go out across a whole simulated session at five geometries, both animals) and what blinks is the AMBIENT field, which cuts a speck instead of dimming it below StarVis 0.2. notes/s28-turn measures the cube-exact shading tones for his 3D-turn idea. notes/s28-emitcheck records that `emit ask` is not a kind and is silently dropped. notes/s28-askroom folds his real log for the activity level at the ask: p50 0.59, and the ask stays open a median 130 seconds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FpWuRRqmoTMo6ayCkx9yYZ
90 lines
2.7 KiB
Go
90 lines
2.7 KiB
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/donlucasx/xscapes/internal/canvas"
|
|
"github.com/donlucasx/xscapes/internal/companion"
|
|
"github.com/donlucasx/xscapes/internal/reduce"
|
|
"github.com/donlucasx/xscapes/internal/scape"
|
|
"github.com/donlucasx/xscapes/internal/term"
|
|
)
|
|
|
|
// TestAStarNeverGoesOut is HIS report of 2026-09-10, made live in the installed
|
|
// build: "I can see some of the constellation stars appearing and dissapearing-
|
|
// once they appear, they should not dissapear IMO."
|
|
//
|
|
// It renders the COMPOSED frame -- drawScene, not just Shore.Update -- because
|
|
// the scape is not the only thing that writes into the sky: drawReadout puts
|
|
// the context number under the disc from 40% used, and the disc sinks as the
|
|
// window fills, so the number sweeps down through the constellation's band.
|
|
// An instrument that stops at Shore.Update cannot see that and reports clean.
|
|
func TestAStarNeverGoesOut(t *testing.T) {
|
|
for _, name := range []string{"cat", "crab"} {
|
|
for _, g := range []struct{ w, h int }{{80, 24}, {111, 25}, {124, 22}, {143, 27}, {153, 51}} {
|
|
f := newFrames(g.w, g.h, 7, false, true, 0, 11.0/24)
|
|
f.cat = companion.New(name)
|
|
f.cat.FaceLeft(true)
|
|
f.ccw, f.chh = f.cat.Size()
|
|
f.lay = compose(g.w, f.ccw, true)
|
|
f.sh.MoonX = f.lay.MoonX
|
|
f.profile = term.Profile256
|
|
|
|
lit := map[[2]int]bool{}
|
|
blink := map[[2]int]int{}
|
|
at := map[[2]int]float64{}
|
|
const steps = 200
|
|
tm := 0.0
|
|
for s := 0; s < steps; s++ {
|
|
ctx := float64(s) / float64(steps-1)
|
|
done := 1 + s*24/steps
|
|
st := reduce.State{
|
|
Act: scape.Activity{
|
|
Level: 0.5, Working: true, ContextUsed: ctx,
|
|
TimeOfDay: 11.0 / 24, TodoDone: done, TodoTotal: 32,
|
|
},
|
|
Pose: companion.Working,
|
|
Tail: nil,
|
|
}
|
|
tm += 0.08
|
|
f.c = canvas.New(g.w, g.h, canvas.AlphaFar, canvas.AlphaMid, canvas.AlphaNear)
|
|
f.sh.Update(f.c, tm, st.Act)
|
|
top := f.c.H - 2 - f.chh
|
|
drawScene(f.c, f.sh, f.cat, f.lay, st, tm, f.seed, top)
|
|
|
|
on := map[[2]int]bool{}
|
|
for y := 0; y < g.h; y++ {
|
|
for x := 0; x < g.w; x++ {
|
|
if r, _, _ := f.c.ResolveAt(x, y, term.Profile256); r == '*' {
|
|
on[[2]int{x, y}] = true
|
|
}
|
|
}
|
|
}
|
|
for cell := range lit {
|
|
if !on[cell] {
|
|
blink[cell]++
|
|
if _, ok := at[cell]; !ok {
|
|
at[cell] = ctx
|
|
}
|
|
delete(lit, cell)
|
|
}
|
|
}
|
|
for cell := range on {
|
|
lit[cell] = true
|
|
}
|
|
}
|
|
if len(blink) > 0 {
|
|
for cell, n := range blink {
|
|
t.Logf("%s %dx%d: star col %d row %d went out %dx, first at context %.2f",
|
|
name, g.w, g.h, cell[0], cell[1], n, at[cell])
|
|
}
|
|
t.Errorf("%s %dx%d: %d star slots go out after lighting", name, g.w, g.h, len(blink))
|
|
} else {
|
|
t.Logf("%s %dx%d: steady", name, g.w, g.h)
|
|
}
|
|
}
|
|
}
|
|
_ = time.Now
|
|
}
|