Actor bucketing #8

Open
opened 2022-02-17 16:18:19 +00:00 by keith · 0 comments
Owner

Actors' tags and components usually remain constant throughout the game, but currently, wh-engine still checks the tags of every actor, every frame.

I could speed up the performance of the rendering system (and future systems) by sorting actors into groups by their tags. Then, wh-engine would only have to process the actors inside the buckets it's interested in, skipping the (some (lambda (x) [actor (has-tag x)]) tag-list) nonsense entirely.

This would make changing actors' tags somewhat slower, but that's an acceptable tradeoff.

  • Bucketing by tag
  • Component bucketing (components of a certain type attached to actors with the desired tags)
    • Maybe maintain a second bucket without the tag requirements, so wh-engine only has to search that list if the tag mask changes
Actors' tags and components usually remain constant throughout the game, but currently, `wh-engine` still checks the tags of every actor, every frame. I could speed up the performance of the rendering system (and future systems) by sorting actors into groups by their tags. Then, `wh-engine` would only have to process the actors inside the buckets it's interested in, skipping the `(some (lambda (x) [actor (has-tag x)]) tag-list)` nonsense entirely. This would make changing actors' tags somewhat slower, but that's an acceptable tradeoff. - [ ] Bucketing by tag - [ ] Component bucketing (components of a certain type attached to actors with the desired tags) - [ ] Maybe maintain a second bucket *without* the tag requirements, so `wh-engine` only has to search that list if the tag mask changes
keith added the
enhancement
label 2022-02-17 16:18:30 +00:00
keith self-assigned this 2022-02-17 16:18:35 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: keith/wh-engine#8
No description provided.