Skip to content

Mythic Masters: open-world frame budget (95th under 16.7 ms, no hitch, a party of six), hill climb to 8/10, rounds 5+ (from #3705) #3709

Closed

Description

@QuinnsCode

Score: 3.3/10 (target 8, on the owner's scale: agent judges halve their number, per the 2026-11-05 reset)

The owner's brief (2026-11-05): Mythic Masters' open world must be performant, especially once friends walk it together (#3663). The world is a heightfield continent with three ground patches rebuilt as you walk, instanced plants, a sky dome and weather, flocks and wild food (src/world/, docs/WORLD-EXPANSION.md).

From #3664, #3686, #3701 and #3705 (rounds 1 to 4, PR #3685): the recipe is cd apps/mythic-masters && bun scripts/walk-budget.ts (walkBudget() for a script), and test/budget.test.ts holds it with MM_BUDGET=1. The walk holds fights off (world.peace; round 1's first tables measured a fight arena, see #3686), and reads the heap after a forced collection. Patch rebuilds, the far forest and the grass are laid over frames, and a wild one's beast compiles its shaders before it shows. Last table, party of one: p95 16.7 ms at both sizes, no frame over 50 ms (worst 33 ms; main has 15 and 14 frames over 50 ms); draw calls 99-134 desktop, 66-100 phone; 4.31 M triangles; heap after a collection 13.7 -> 18 MB (the same on main); load 1.1 to 1.3 s, 6.4 MB.

Next: the party-of-six walk as a row in the recipe and in budget.test.ts (frame time, and draw calls and heap against the +12 / +60 MB limits). It caps points 1 and 2. Gizmo (office/gizmo-2fa8) plans party and quality options on walkBudget() once #3685 merges; the low quality tier and plant culling are in #3682 and #3689. Multiplayer itself is #3663.

Goalpost: 8/10 from the owner

Scored on numbers, not taste, so each round prints the same table from the same recipe (bun run probe mythic-masters --js with the mythicMasters handle; a fixed walk of 90 seconds across a region border at a fixed hour, with a party of one and of six shown):

  1. Frame time. 95th percentile under 16.7 ms on this Mac's headless Chrome through the whole walk, and no single frame over 50 ms (the patch hitch gone: builds split over frames or moved to a worker).
  2. Draw calls and memory. Draw calls per frame and JS heap printed and flat across the walk; a party of six adds at most 12 draw calls and 60 MB.
  3. Load. Time to first walkable frame under 3 s on a cold cache locally, and the bytes it took, printed.
  4. Phones. The same walk at a phone viewport with the quality knob (@rustybuns/util/quality) on low stays under 16.7 ms at the 95th; no feature only works at high.
  5. A budget that holds. The numbers live in one test (test/budget.test.ts) that fails when a round regresses them, so the next climb can't spend them.

The loop

Each round is one PR against main that says "Part of #N" with the before/after table in the body. A fresh judge scores the five points, halves it, and the comment starts Score: x/10 (target 8) and ends Next: ...; then open "rounds N+ (from #N)", close this one with "Moved up to #new". Keep effect out of the per-frame code. At the target, a MANUAL RUN: for the owner's own walk on their phone.

Activity

  1. QuinnsCode commented on Nov 6, 2026

    @QuinnsCode
    OwnerAuthor

    look at our druids curse game for some optimizations in it's renderer.ts grep for that!

  2. self-assigned this
    on Nov 6, 2026
  3. QuinnsCode commented on Nov 6, 2026

    @QuinnsCode
    OwnerAuthor

    Score: 3.4/10 (target 8)

    Round 5, PR #3794 (judged by a fresh agent on the PR's numbers, then halved):

    1. Frame time 1.3/2: the solo rows and phone with six hold p95 16.8 ms. Desktop with six is at p95 33 ms (it was p50 33, 95 frames over 50 ms). The budget test's one run caught a 66.6 ms frame on a loaded Mac.
    2. Draw calls and memory 0.8/2: the heap holds (+12 to 15 MB of 60). Draw calls don't: the party adds about 110 to 130 against +12, about 7 a beast.
    3. Load 1.8/2: 1.2 to 1.4 s, 6.5 MB, printed.
    4. Phones 1.5/2: p95 16.8 ms; nothing yet checks that every feature works at low.
    5. Budget test 1.0/2: it holds the party rows, at this round's numbers rather than the goals.

    New this round: walk-budget.ts --party 1,6 and --profile <dir> (CPU and heap flame graphs of the walk, scripts/profile.ts). The flame graph put the IK solver at about 60% of a party frame.

    Next: cut each beast's ~7 draw calls (merge skinned parts and materials, pupils into the eye mesh, instanced contact pools), then re-run the budget on a quiet machine.

    Moved up to #3796.

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions