Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(engine): search for nearby players using different algorithms #1237

Merged
merged 2 commits into from
Feb 9, 2025

Conversation

ultraviolet-jordan
Copy link
Collaborator

Searching for nearby players is done in a spiraling pattern around the player today. This search is particularly only useful when your view distance of players gets smaller and smaller, as player density increases to 250+.

I add an additional way to search for players by zone lookup, when your view distance is currently unchanged. I've found this to be less work then doing a full spiral loop every tick, when the area is not dense.

image

And this is what I get for an extremely packed area.

image

I also made it so when you teleport into a dense area of players, this will automatically decrease your view distance and switch to search by nearby.

@Pazaz Pazaz merged commit ec6b404 into 2004Scape:main Feb 9, 2025
3 checks 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