Skip to content

Optimize me.Container.update with QuadTree #581

@parasyte

Description

@parasyte

Right now the world container iterates all of its children, then performs a rectangle overlap check to determine whether its in the viewport (thus determining if it should be updated) We can optimize this selection logic by collecting a list of entities potentially within the viewport using the QuadTree. Thereby allowing the container to iterate only a subset of its children (especially on large maps).

Second, the alwaysUpdate children might have to be placed in a separate child-list that is always iterated and updated. This is pretty similar to #191, actually. Which will be a matter of managing child placement within different lists.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions