clockworklabs / clockworklabs/SpacetimeDB
Blackholio - O(N^2) collision checks
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
I'm checking move_all_players and it really bugs me that it is O(N^2). This wont work for real MMO.
Should really have a kd-tree index that allows to get closest entities in efficient way
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the move_all_players code path and trace how collision checks find nearby entities. Investigate whether a kd-tree or another spatial index fits the project, then verify that collision behavior is preserved while avoiding the current O(N^2) checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100