Timeline for Logic in Entity Components Systems
Current License: CC BY-SA 3.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 24, 2012 at 15:16 | history | edited | Martin Sojka | CC BY-SA 3.0 | Typo |
| Oct 24, 2012 at 13:00 | answer | added | snake5 | timeline score: 0 | |
| Oct 23, 2012 at 13:05 | answer | added | sebas | timeline score: 1 | |
| Oct 23, 2012 at 12:32 | answer | added | dreta | timeline score: 1 | |
| Oct 23, 2012 at 11:18 | answer | added | Asakeron | timeline score: 0 | |
| Oct 23, 2012 at 9:34 | comment | added | Kikaimaru | as long as you want just one component per class hierarchy (only one PlayerControllerComponent) its easy to rewrite artemis to do this. You just need to change Mapper to give you bits like this PlayerController = 000001, FspPlayerController = 0000011 (that way FpsPlayerController "contains" flag for PlayerControlle). And rewrite check for component to (Flags & desiredFlags != 0). But as Sidar say, artemis does not wantyou to do that, but artemis solution to have "data" components with no data and only as markers that some system should work with them is not good either... | |
| Oct 23, 2012 at 6:06 | history | tweeted | twitter.com/#!/StackGameDev/status/260623195965644800 | ||
| Oct 23, 2012 at 4:58 | answer | added | House | timeline score: 8 | |
| Oct 23, 2012 at 4:06 | answer | added | Sidar | timeline score: 1 | |
| Oct 23, 2012 at 4:05 | comment | added | aaron | Ya having the component with an update was to avoid the massive hard-coded switch statements.But thanks for helping. | |
| Oct 23, 2012 at 4:04 | review | First posts | |||
| Oct 23, 2012 at 5:25 | |||||
| Oct 23, 2012 at 3:55 | comment | added | Sidar | I faced the same problem and didn't really got to it. The problem why it doesn't work is because each component is added with a new bit id. Your component could simply have an enumerator : FPS, TPS, TD. And a variable of that enumerator. In your system you simply check which enumerator value is set and perform logic. Systems are your bulk of updates. Try to separate logic from your component as much as possible. | |
| Oct 23, 2012 at 3:52 | comment | added | aaron | So do you think I should create a new System for each type of player be it first-person third-person or top-down | |
| Oct 23, 2012 at 3:50 | comment | added | Sidar | Artemis Entity Framework does not encourage making functions in your components. Components are pure data collections. The Systems perform updates and what not. I've ported Artemis myself to C++ and in my tests I did all my logic is Systems. Your update shouldn't be there. | |
| Oct 23, 2012 at 3:47 | history | asked | aaron | CC BY-SA 3.0 |