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

Aoi performance test #745

Closed
wants to merge 17 commits into from
Closed

Aoi performance test #745

wants to merge 17 commits into from

Conversation

James-Frowen
Copy link
Member

No description provided.

paulpach and others added 17 commits March 27, 2021 16:01
The AOI system we inherited from Mirror is poorly designed.
It's API requires O(n^2) algorithms,  it is highly complex, and it is not flexible enough.

This PR implements AOI in a completely different way.
The NetworkIdentity objects no longer track visibility, and neither do NetworkPlayer.

When the server spawns an object, all it does it raise the Spawned event,
the AOI system will subscribe to this event,  and then show that object to all the relevant players.
Likewise,  when a player joins,  the AOI will listen for the event and show the relevant objects to the
newly created player.

In this fashion, we decouple AOI policy from NetworkIdentity and NetworkPlayers. The AOI system can keep the
relationship between them in any way that is suitable.

In this PR, I implement the simplest InterestManager called GlobalInterestManager.
This Interest Manager will just show all objects to all players.

Implement the class InterestManager to create any policy desired.  I expect to create a Spatial Hashing interest Manager

BREAKING CHANGE: Removed NetworkVisibility, extend InterestManager and attach to the ServerObjectManager instead.
- increased ground to be 100x100 (-50 to +50)
- moved camera out
- increased scale of prefabs
@github-actions github-actions bot added the has conflicts Pull Request has merge conflicts label Apr 4, 2021
@James-Frowen
Copy link
Member Author

Closing old PR

New AOI branch here #948

@paulpach paulpach deleted the aoi-performance-test branch October 18, 2022 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has conflicts Pull Request has merge conflicts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants