Timeline for How do components access one another in a component based entity system
Current License: CC BY-SA 4.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S Aug 16, 2023 at 14:47 | history | suggested | Community Bot | CC BY-SA 4.0 |
Domain is now a porn website. Replaced link to an Archived version.
|
Aug 8, 2023 at 11:24 | review | Suggested edits | |||
S Aug 16, 2023 at 14:47 | |||||
May 22, 2021 at 0:00 | history | tweeted | twitter.com/StackGameDev/status/1395892192049344512 | ||
May 21, 2021 at 21:43 | history | edited | DMGregory ♦ | CC BY-SA 4.0 |
Un-accidentally the verb
|
Dec 17, 2017 at 15:34 | vote | accept | MoustacheSpy | ||
Dec 17, 2017 at 15:33 | vote | accept | MoustacheSpy | ||
Dec 17, 2017 at 15:33 | |||||
Dec 12, 2017 at 19:27 | comment | added | user77245 |
To me the problem here is logicComponent . You don't necessarily want a component to reach around and look at its entity and then figure out what components it has attached and grab data. That's a system's responsibility to have functionality, and systems don't process things in this scalar one-entity-at-a-time mindset. It is at least better to err on the side of components just being raw data, not logic. Your logicComponent probably wants to be a system of some sort.
|
|
Dec 12, 2017 at 17:29 | answer | added | Stephan | timeline score: 8 | |
Dec 12, 2017 at 16:04 | comment | added | Bálint | @snb First of all, if you want to get the most out of the computer, then you don't use an ECS to begin with, since it adds an overhead; secondly, it doesn't really matter in a real world scenario, since you usually don't have thousands of components | |
Dec 12, 2017 at 15:43 | comment | added | Vaillancourt♦ | @snb Before judging that, one should profile. In an actual situation. Yes, runtime complexity is a thing, but that code could be a drop in the ocean when taking a look at the big picture. | |
Dec 12, 2017 at 15:40 | answer | added | Krupip | timeline score: 4 | |
Dec 12, 2017 at 15:27 | history | edited | MoustacheSpy | CC BY-SA 3.0 |
added 116 characters in body
|
Dec 12, 2017 at 15:24 | comment | added | MoustacheSpy | @snb am I even doing component based entities right? I am having a feeling that I am missing something, since this performance problem is not a thing anywhere else. What I could do would be to use shared pointers instead of normal ones and simply have the logic functions look for all components of interest and simply set its own shared pointers to those components. But then I gotta account for changes in the component structure and that is gonna be an even worse mess. There is obviously something I am doing wrong here | |
Dec 12, 2017 at 14:55 | comment | added | Bálint | You're probably overestimating how much one of those look thoughs costs in terms of clock cycles. | |
Dec 12, 2017 at 14:24 | history | asked | MoustacheSpy | CC BY-SA 3.0 |