aorecomp

Anarchy Online classic in the browser

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


AGENTS.md (4287B)


Test process cleanup

Close native game clients, browser tabs and temporary servers started for tests between runs and before resource-intensive builds. Leaving them running wastes CPU and memory and can cause out-of-memory failures.

Ensure cleanup also runs after failed tests, for example with finally blocks. Clean up only instances started for your tests. Keep user-owned instances and sessions explicitly requested for manual testing available until asked to stop.

Game testing

Use the browser harness in tools/client/game_test.mjs for repeatable client testing; see DEVELOPERS.md under "Browser game testing". Prefer observed state transitions over fixed sleeps and ad hoc WASM memory probes. Keep real browser input coverage and check significant outcomes against server state.

Focused debugging and verification

Database migrations

Preserve existing world databases when changing the schema. Add the next numbered SQL migration in server/migrations/ and verify startup upgrades an existing database. The local test database is disposable and can be recreated without asking. Other compatibility with earlier development versions of this server is not required. The target client protocol and game behavior remain those of the original 14.9.1 game.

Persistence cadence

Keep frequently changing, low-significance simulation state, such as player and NPC positions, in memory between periodic database checkpoints. Do not persist it on every simulation tick or movement packet; avoid unnecessary database churn.

Persist significant changes, such as equipping items, inventory transfers, ammunition consumption and rewards, immediately. Commit related changes atomically before reporting success to clients.