Repository navigation
Own backend: the game read as a value, locations, players, centre prints (step 5, parts 3–5) - #45
Merged
Merged
Conversation
What a condition can be asked, read as a number, and the players' race, slot and supply. - One player's deaths, kills, ore or gas, and memory() at a known address, read where the game keeps them: a masked condition a bit, entered at the highest group of eight bits the number has (ore below 65 536 in 16 bits; eudplib's f_dwread_epd reads 32). - Anything else asked of the condition a bit at a time from the top, its amount a place of what is found so far: one trigger a bit. - Race and slot as a byte of the player table; supply from its race's table, halved as the top bar shows it. Ledger: step 5 179/195. probes/own-reads.ts: every line the same both ways; 200 ore reads 0.129 ms vs 0.219, 200 unit counts 0.102 vs 0.418. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwPs2Ya2X9rB9TYHijfoom
`minerals(P1) >= cost` is Accumulate at least `cost`, the condition's amount a place of `cost`: no read. `>` / `<` and their turned-around forms shift the amount by one where the value's range allows. probes/own-reads.ts: 200 of `minerals(P1) >= j * 10` 0.012 ms vs eudplib's 0.248. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwPs2Ya2X9rB9TYHijfoom
- centerLocation: four Set Deaths into MRGN, each amount a place of the side, the counts thrown away after; without a size the sides read first. Actions with fields from values share a trigger. - A print to P1–P8 or All Players: Display Text with each the current player in turn (no map settings needed); forces wait for step 7. - rose() / once(): a latch per place in the script. - hasLeft and force prints moved to step 7; Wait refused on purpose, its reason says why. Ledger: step 5 195/198 (centre prints left). probes/own-locations.ts: every line ok both ways; 200 moves 0.036 ms vs eudplib's 0.061. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwPs2Ya2X9rB9TYHijfoom
As eudplib's f_eprintln: with each target the current player, "Cannot create more units" raised (Create Unit with the first free unit read, taken away, put back), and on that player's computer alone the text written into the game's line of errors — the template is the line. Ledger: step 5 197/198; Wait refused on purpose. probes/own-step5.ts for Remastered (centre print, Transmissions in a loop, a print to every player, counts after Create Unit, a moved location). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwPs2Ya2X9rB9TYHijfoom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rest of step 5 of the way off eudplib (
docs/v4-plan.md: "The game read as a value on our own backend", "Locations, players and latches on our own backend"). Follows #44. Step 5 is done but Wait, refused on purpose (in a program it holds only its own trigger and takes the player's wait from Transmissions; a program waits withsleep()).Part 3: the game read as a value. One player's deaths, kills, ore and gas, and
memory()at a known address, are read where the game keeps them: a masked condition a bit, starting at the highest group of 8 bits the value has. Anything else (group sums, Command/Bring counts, score, clocks, opponents) asks the condition a bit at a time, its amount a place of what has been found so far. Race, slot and supply come from the player tables. A read compared with a value is the condition itself (minerals(P1) >= costis Accumulate at leastcost, its amount a place ofcost), so there is no read at all.Part 4.
centerLocationis four Set Deaths into MRGN, each amount a place of the side; without a size the sides are read first. A print to P1–P8 or All Players is Display Text with each one the current player in turn, which needs none of the map's settings.rose()/once()use a latch per place in the script.Part 5: prints at the centre, as eudplib's
f_eprintln. "Cannot create more units" is raised with the free-unit pointer read, zeroed and put back; on the target's computer only, the text is written into the error line, which is the template itself.Ledger
hasLeftand a force print moved here: they need the map's slots)Four rows of steps 6/9 build now and were relabelled step 5: screen library (it was waiting on
centerLocation), and two instance scripts that were refused only for TrigScript's warning print to All Players; both agree with the simulator.Lifted game, ms (ours / eudplib)
minerals(P1) >= j * 10Every line of
probes/own-reads.tsandprobes/own-locations.tsis the same in both builds. The centre print is on line 12 in both, and so are prints to P1/P2/All Players.For Remastered:
probes/own-step5.ts(copied to Maps/TrigScript with an answer sheet): the centre print, Transmissions in a loop, a print to every player, counts after Create Unit, a moved location. Not played yet.Found (in the plan's Open list): a condition kept in a
constis asked where it is used, not where it is written (both builds).Suite 1258 pass.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BwPs2Ya2X9rB9TYHijfoom