Skip to content

ft: pathfinding and movement optimizations#12

Open
Xytronix wants to merge 1 commit intoIroriPowered:masterfrom
Xytronix:ft-pathfinding
Open

ft: pathfinding and movement optimizations#12
Xytronix wants to merge 1 commit intoIroriPowered:masterfrom
Xytronix:ft-pathfinding

Conversation

@Xytronix
Copy link
Contributor

Summary

The PR applies pathfinding optimizations for entities by using binary search and eliminating an allocation per entity per tick.
In addition values for pathfinding are user configurable.

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change (requires documentation/migration)
  • Chore / refactor
  • Documentation only

Implementation details

  • MixinAStarBase: binary search insertion in A* open node list (O(log n) vs O(n))
  • MixinRepulsionTicker: ThreadLocal pooling for per-entity ObjectArrayList (reduces GC)

Checklist

  • Code compiles successfully
  • Pull request does not contain unrelated changes
  • Changes follow this project's code style (Use spotlessApply when necessary)
  • Changes are tested or will be tested after submission

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.

1 participant