For every branch you repeatedly add to your component inner loop consider adding a new component. Example: if (hasInput && input.action) doThings; Each component with no input has to process this branch and it clutters/complexifies your inner loop, trashing cache lines & BTBs.
Lol. Don’t know if I’m embarrassed or not that Boids is an example in my ECS engine after reading this. Agree on Loop recommendation tho!
-
-
Tämä twiitti ei ole saatavilla.
-
Yes! My engine's design is inspired from elements of that talk. My engine goes a bit farther, and makes certain multi-threading guarantees about component access, so I often find it better to lean into components when I can. Doesn't apply to all ECS implementations tho.
Keskustelun loppu
-
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.