Doraku / DefaultEcs

Entity Component System framework aiming for syntax and usage simplicity with maximum performance for game development.
MIT No Attribution
658 stars 62 forks source link

Are all component-entity updates destructive? #55

Closed dzmitry-lahoda closed 4 years ago

dzmitry-lahoda commented 5 years ago

Or I can have access to old world for a frame?

Doraku commented 5 years ago

Yes, no previous state is kept. I haven't thought much on this but wouldn't keeping an history completely defeat the purpose of a cache friendly ecs? As writing the history would make you jump much more.

dzmitry-lahoda commented 5 years ago

i guess if to write generic ecs engine (not tuned for single player) with cool debugging features(going back and forth), could accept some kind of overhead. for games which need history (https://github.com/MFatihMAR/Awesome-Game-Networking, reconciliation) each tick (networked frame) whole world could be block copied. all updates done are done to new copy. so history is not intermingled, but just previous block. what is size of world? other options is partial copy-compact-reindex.

for games which do no need history the block copy could be noop. so still some overhead will be there.

above these data structures 2 sets of interfaces could grow (or not).

people needed max out performance will write own ecs or drop part of this. but generic ecs for all may be fine with overhead.

Doraku commented 4 years ago

Closing old issue, as for now I will probably not add historization capabilities but I will keep it in my head.