Skip to content

Improve physics tick performance #955

Open
@AlmasB

Description

@AlmasB

Some improvements include:

  • using a type-based split of entities to reduce collision checks -- based on handlers we know which types can collide -- keep Map<Type, Array> and update on entity add / remove
  • using a quadtree or similar spatial partition
  • SAT code inline to avoid calls to newVec and free + use sin/cos LUT
  • BoundingBoxComponent::isColliding should be split into full check and partial check (with pre-applied transform) to maximise performance

Metadata

Metadata

Assignees

Labels

type:performanceOptimizations to code / algorithms

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions