Skip to content

AIVState methods that are less than 100% - #264

Draft
gynt wants to merge 14 commits into
reimpl/AIVState-100from
reimpl/AIVState-leftover
Draft

gynt wants to merge 14 commits into
reimpl/AIVState-100from
reimpl/AIVState-leftover

Conversation

@gynt

@gynt gynt commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@gynt
gynt changed the base branch from main to reimpl/AIVState-100 October 14, 2026 12:05
gynt and others added 13 commits October 15, 2026 00:56
Assign x before y in the keepOrientation == 2 arm, like the other three arms,
which is the order the original emits.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179pNuXVNcvqm3mQfQaRDMs
Store the rotated unit location straight into the player's slot and test the
slot for the count, instead of going through a tile local: the original reads
the slot back. Measured 67.2% -> 78.3%.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179pNuXVNcvqm3mQfQaRDMs
…f first

Give the L_ROCKY arm of the update loop its own gridY local like the other
three arms. Measured 88.9% -> 94.0%.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179pNuXVNcvqm3mQfQaRDMs
Index the heat map with the grid position cast to uint. The original compares
the position against -1 from memory and then reloads it for the index, so the
two reads are different expressions; the cast stops them being merged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179pNuXVNcvqm3mQfQaRDMs
…ivID test

Initialise isPausing before the aivID test like the original; hoisting
stepIncrement as well inverts the ebx/edi allocation and loses 17 points.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179pNuXVNcvqm3mQfQaRDMs
Drop the hand-written `if (startY >= 100) break;` (it left a path where y was
read unassigned, merging the per-loop y webs), compute the tile before the step
stores in loops 1 and 2, and write loop 2's reject branch as a continue.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179pNuXVNcvqm3mQfQaRDMs
Loop 2 indexes the translation matrix by keepYOffset + y written out (the
original consumes realY in the multiply and reloads nothing), y is initialised
at its declaration, and loop 1 passes keepYOffset + y to xyAreValid with a
realX local beside realY.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179pNuXVNcvqm3mQfQaRDMs
…ed pairs

Loop 2 rejects a tile with three separate ifs, the range checks written as
realX < 0 || realX > 399 (int locals, realY declared first). MSVC folds each
pair into the original's single unsigned compare, keeps the map test's reject
block inline and merges the realY reject into it, which also restores the
original's loop 3 prologue store order.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179pNuXVNcvqm3mQfQaRDMs

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant