scroll.server/crates
WiseDev 9f3ac3f0b9 use the client's square root, wrong answers and all
LogicMath::sqrt is a 256-entry table of floor(16*sqrt(i)) with a seed
picked by magnitude and one or two newton steps on top, and it is not
exact: above 2147441940 the seed overshoots and the single correction
cannot pull it back, so it answers 46341 where the true root is 46340,
and 65535 for INT_MAX.

that matters because the checksum is computed over whatever it returns.
an honest square root would be a permanent, invisible disagreement, so
this one is transcribed branch for branch - including the early -1 for
negatives and the INT_MAX special case - and our own converging root is
gone. checked against the exact root across the low range and the
boundaries, where the two agree, and at the top, where they must not.

distances now go through the saturating helper before the root, the way
the client does it, rather than being squared in i64 on the way in.
2026-08-23 14:21:57 +03:00
..
auth-service stop minting a new account on every login 2026-08-23 08:54:43 +03:00
game-service never reuse a global id 2026-08-23 14:17:50 +03:00
gateway send the battle state five times a second 2026-08-23 14:10:55 +03:00
logic use the client's square root, wrong answers and all 2026-08-23 14:21:57 +03:00
logic-derive move all crates into crates/, glob members 2026-08-23 08:15:45 +03:00
scroll-server supervised mode: run the services as child processes 2026-08-23 09:46:59 +03:00
service-rpc switch the battle to type 0 and drive it from the server 2026-08-23 13:51:01 +03:00
storage fix chest shop prices and gate the free chest 2026-08-23 09:02:49 +03:00
titan compare the server checksum against the client's 2026-08-23 13:44:51 +03:00
titan-derive build and send the battle sector state 2026-08-23 10:24:20 +03:00