The server reveals a strike's disc to every player from its launch until its blast ends #139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3773-the-server-reveals-a-strike-s-disc-to-ev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracker: #3773
Step 1 of plan #3560: the shared reveal rule and the server's side of it. The client's fog does not lift yet; steps 2 and 3 do that, and step 3 writes the changelog and the help for the whole change.
What changes
BLAST_SECONDS(15 s, main's client-onlyNUKE_AFTER),BLAST_TICKS(450), the outer shock ring's factorOUTER_RING_REACH(1.35) andREVEAL_RADIUS(1.35 × BLAST_RADIUS ≈ 13.36 tiles).revealing(due, tick)is the window's rule,tick < due + BLAST_TICKS, andaddReveals(strikes, tick, out)gives the sight sources the listed strikes lend every player at a tick.revealingand bumpsnukeRevisionwhen it leaves.nukes()lists the landed strikes beside the strikes in flight, andreveals()gives the rule's sight sources at the Game's tick. The landed strikes are saved, so MAP_VERSION goes to 20.landed: each landed strike's owner, tile and ticks since it landed (protoLandedMsg, src/shared/wire_pb.ts regenerated bynpm run proto, codec and protocol). Every Nukes literal in the tests carrieslanded.drop()clears them besidesights. Whatknows, shots, hits, deaths, yields and the explored margins send then follows as for any sight.engage's team vision gives every player the discs, so units may target what a disc shows.BLAST_SECONDSfor the effect's disposal and the cloud's fade, andOUTER_RING_REACHfor the outer ring. The values are main's, so nothing draws differently.Tests
due + BLAST_TICKS − 1, and in a Snapshot synced 10 ticks after the landing. Both sessions get UnitHidden for it ondue + BLAST_TICKS. A tank 14.6 tiles out is in neither replica at any tick. Each session's Nukes go in flight, landed with 0 ticks since, then empty.due + BLAST_TICKS − 1and fires on it. The tank is alive atdue + BLAST_TICKS. From then on, for 300 ticks, the Artillery has no target and fires no shot. Without the launch it never targets or fires.due + BLAST_TICKS − 1, none atdue + BLAST_TICKS.nukes()on the same tick.Mutation checks, each in a scratch copy of the tree:
revealinguses<=ServerHost.revealdrops the discsThe unmutated copy passes all 77 tests of those files.
Play checks
Base and head are esbuild bundles of src/ai/sim.ts and src/bench/net.ts, built from
git archivetrees of maind4a6158and of the head.Math.randomis seeded per match. All 42 runs went in parallel on m5 in 5 min 20 s.The 14 seeded AI matches (small seeds 1–6 with 2 seats, medium 1–4 with 3, large 1–4 with 4) all ran to their end. 8 traces are identical to main's. These are the 8 matches in which no seat launches. The other 6 differ, and each first differs after its first launch. Each still ends for the same reason, with the same seats standing.
npm run bench(seed 11, wan): battle-128 (the default case), and economy, cities and churn at 128 and 256. None of them launches a nuke. Every case is identical to main inhash,gameHashandcommandHash, and in every client's raw, deflated and city bytes a second.The Nuke yard's match is
strikeSetup(11)with the yard's silo armed, its target tile 36,22 and its squad of eight round the impact. It leaves out the camera-placed edge Factories and the trees. Both players have echo sessions. From the launch through the window's end (750 ticks), the frames are:So the window adds 11,698 B raw (4,800 B deflated) to the launcher's frames over its 25 s, and 38 B raw to the struck side's, which are the landed strike in Nukes and the Nukes at the window's end.
Gates
Both on
811810bwith a clean tree, on m5:fast(run 498's #1, gate run 272): passed,npm test975/975 in 28.6 s.full(run 498's #2, gate run 274): passed,npm test975/975 in 30.7 s, andtest:phone180/180 in 205 s.