Skip to content

2.0.11: entity overlays see the nearest entities on crowded servers - #25

Merged
MrHakan merged 2 commits into
mainfrom
nearest-first-walk
Oct 10, 2026
Merged

MrHakan merged 2 commits into
mainfrom
nearest-first-walk

Conversation

@MrHakan

@MrHakan MrHakan commented Oct 10, 2026

Copy link
Copy Markdown
Owner

E5 of the 2.1.00 plan (docs/MAJOR_GELISTIRME_PLANI.md), the follow-up to 2.0.10's crowd measurement.

Problem (measured in 2.0.10). The shared entity walk inspects at most 4,096 entities a tick and read the render list in arrival order. With 5,000 entities and the nearest 500 arriving last, ESP kept 256 targets and none of them was among the true nearest 256.

Change. Past the cap the walk reads NearestFirstOrder's list: one pass bands every entity by squared distance (256 equal bands of the squared range, so no square root and a counting sort, linear in the crowd), entities beyond the furthest subscriber's range are left out, and the walk takes the first 4,096 in band order. At or below the cap nothing changes, since every entity is seen anyway. Each inspected entity still costs one unit.

Measured (crowdBudgets game test, same scene):

before after
ESP targets among the true nearest 256 (5,000 entities, nearest arriving last) 0 256 (now asserted)
scanner tick, 5,000 entities 1.28 ms avg 1.37-1.55 ms avg
scanner tick, 1,500 entities (below the cap) 0.63 ms 0.63-0.73 ms (noise)
entity units per tick past the cap 4,096 4,096

NearestFirstOrderTest covers the arrival-order case, the kept prefix holding the true nearest for any subscriber cap (512 is the largest), range exclusion and band order.

Local validation on ebafa94 (Windows, JDK 25): ./gradlew build (949 tests), runClientGameTest (all client game tests; dedicated-server scenarios skipped without the EULA), the real-Baritone acceptance run and productionAddonInstallationTest passed.

🤖 Generated with Claude Code

MrHakan and others added 2 commits October 10, 2026 15:06
… observe

The shared entity walk inspects at most 4,096 entities a tick and read the render list in its own
order, which is arrival order. 2.0.10's crowd scenario showed what that costs: with 5,000 stands and
the nearest 500 arriving last, ESP kept 256 targets and none of them was among the true nearest 256.

Past the cap the walk now reads NearestFirstOrder's list instead: one pass bands every entity by its
squared distance (256 equal bands of the squared range, so no square root and a counting sort,
linear in the crowd), entities beyond the furthest subscriber's range are left out, and the walk
takes the first 4,096 in band order. Up to the cap nothing changes, since every entity is seen
anyway. Each inspected entity still costs one unit, so a tick still spends at most the cap.

Measured in the same scenario: ESP keeps 256 of the true nearest 256 (was 0), now asserted. The
ordering pass adds about 0.3 ms to the scanner's tick with 5,000 entities (1.28 -> 1.55 ms avg);
with 1,500, below the cap, the figures are unchanged (0.63 -> 0.73 ms, within run-to-run noise).
NearestFirstOrderTest covers the arrival-order case, the prefix holding the true nearest for any
subscriber cap, range exclusion and band order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ervers

Raises mod_version to 2.0.11 and records E5 in the changelog, the plan and the handover notes: past
the 4,096-entity observation cap the shared walk reads the nearest entities first, so ESP keeps the
true nearest 256 (was none of them in the worst arrival order), for about 0.3 ms a tick with 5,000
entities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 10, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@MrHakan
MrHakan merged commit 4e7b9ba into main Oct 10, 2026
1 check passed
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.

2 participants