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.
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
alwaysUpdatechildren 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.