aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


docs/mission-generation.md (4133B)


Seeded two-room starter missions

Accepted starter missions now use their advertised seed to choose a north- or south-facing two-room building. Previously every seed saved the same north-facing layout. Both orientations use original resource331, room0 (tarm_entrance1) and room37 (tarm_hartchamber2), with one reciprocal passage and one exterior portal. Even seeds select north; odd seeds select south. This selection is a reconstruction policy, not the recovered original ACG distribution.

The south-facing layout rotates the complete reviewed building through180 degrees. Its authored encounter positions rotate with it: X becomes40-X and Z becomes60-Z. Profiles, levels, rewards, NPC identities and counts are unchanged. The shared scene computes the entrance, door and objective from the selected portals and actual floor. No separate per-orientation door or book position is introduced. The full generator blob commits with acceptance and remains the authority on reload; loading does not reroll from the seed.

Original evidence

The complete original resource331 reparses to the existing independent room catalog. Selected original room SHA256 values:

The existing native portal/rotation checks cover all four orientations, including the exact south-facing placement used here. See interior evidence and TestMissionWorldRegistersOriginalPortalLinksAtEveryRotation. The retained complete reparse is local/mission-generation/original-rooms.json.

Room36 (tarm_hartchamber1) was also investigated. Its portal can connect and its floor samples admit the old encounter coordinates, but clear-shot checks reject two of those positions. Floor membership alone is insufficient evidence for reusing encounter placements. It remains outside this generator; the candidate audit and native probes are retained locally. Broader room/style selection and the six mission dimensions remain separate open work.

Focused checks

TestMissionSeedSelectsConnectedTwoRoomLayoutAndRetainsItsContents accepts four fixed seeds through public handlers, enters with the allocated key, and reloads the database. It checks the exact selected chamber placement, saved seed/blob, connected passage, reachable entrance/objective and five persisted encounters. TestMissionGeneratedChamberKeepsExistingEncountersReachable checks an ordinary shot at each of the five rotated encounter placements. The concurrent-owner regression now explicitly uses equal seeds while retaining distinct worlds, keys and native doors.

TestBrowserGeneratedMission uses a controlled accepted seed1 contract and trainable Run Speed5. Real input enters through the original backyard door, crosses the raised entrance, reaches the second room, reconstructs it after a page reload, picks up its exact book, visits the far room and returns outside. The native anonymous ordinary proxy is checked separately from its physical server ID. This geometry fixture does not earn progression or establish historical species, reward or room-selection distributions.

The final native run local/mission-generation/20261103-101536 passes in59.98s (Go67.665s). Five traces have no errors or dropped events. Its stopped SQLite snapshot retains seed1, the exact31-byte south-facing generator, world65536, objective3, all three owned item/location rows and the unchanged4-credit wallet. Both native interior full updates carry that same generator. After collection, the anonymous book proxy becomes physicalID3 on exterior replay. The independent audit is local/mission-generation/verification.json; chamber and exterior captures were reviewed.

The affected Go run passes170 roots/1,075 results in126.475s. The generation, five-shot and concurrent-owner checks pass12 race results in99.132s. The normal starter controller maps its route and encounter ordering from the saved room orientation; the extended earned playthrough was not repeated. JavaScript syntax and whitespace checks pass.