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

fix: Improve FindNearbyPlayersSystem performance #31

Merged

Conversation

askneller
Copy link
Contributor

Addresses #19. Refactoring of the FindNearbyPlayersSystem

Also adds AttackInProximityComponent that was in some of the hostile critter prefabs. And also adjusts CheckAttackStopAction to consider AttackInProximityComponent.

I noted a good performance improvement on my system.

Here is the before debug output:
before

And the after:
after

How to Test

I did the above tests using the Core Gameplay module with WildAnimals enabled. To make testing easier I changed the reference to the deer prefab in WildAnimalsSpawnSystem (line 80) to WildAnimals:HostileDeer so that it spawns lots of entities that will look for players.

If you want to recreate on your system the seed for the above image is 0pSFAX7zlh7pIlNnLj0DxOfJnzoUsoYc

askneller and others added 2 commits April 24, 2020 17:38
Co-Authored-By: Tobias Nett <skaldarnar@googlemail.com>
@askneller
Copy link
Contributor Author

Thanks for the review @skaldarnar, I've implemented those changes.

@skaldarnar skaldarnar changed the title Improve FindNearbyPlayersSystem performance fix: Improve FindNearbyPlayersSystem performance Apr 24, 2020
@skaldarnar skaldarnar merged commit 128ed16 into Terasology:master Apr 24, 2020
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.

None yet

2 participants