Skip to content

Sort created objects by distance to nearest player.#100

Open
jsza wants to merge 2 commits intomainfrom
97-fix-object-sorting
Open

Sort created objects by distance to nearest player.#100
jsza wants to merge 2 commits intomainfrom
97-fix-object-sorting

Conversation

@jsza
Copy link
Collaborator

@jsza jsza commented Nov 24, 2023

Should improve perceived performance as nearby objects start simulating sooner, though it probably only matters in areas with a lot of objects and only when initially loading in by logging in or going through a portal.

We might have to scrap or rework this if the distance calculations turn out to be too expensive.

@jsza jsza requested a review from ddormer November 24, 2023 09:53
@jsza jsza added the enhancement New feature or request label Nov 24, 2023
@jsza jsza changed the title Implement sorting objects by distance to nearest player. Implement sorting created objects by distance to nearest player. Nov 24, 2023
@jsza
Copy link
Collaborator Author

jsza commented Nov 24, 2023

On servers with many players this might make object creation quite a lot slower as ZDO distance is calculated for every player; one thing to optimise is only considering peers within the nearby active sectors.

@jsza jsza changed the title Implement sorting created objects by distance to nearest player. Sort created objects by distance to nearest player. Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant