2
votes
1answer
192 views

How should I traverse entities and components for their per-frame updates?

I am implementing a simple entity/component-based engine in C++ and am unsure about the best way to store references to entities/components and what the best way to traverse them each game step would ...
0
votes
1answer
47 views

Adding Components (classes) to unordered_map in Entity? (Possible typeid as key issue)

I've got a little test put together that has a couple simple Components that are supposed to be added to an Entity, but the addComponent function isn't working; I think it's got something to do with ...
8
votes
1answer
804 views

How to benefit from cpu cache in a entity component system game engine?

I often read in the ECS game engine documentations that is a good architecture for using cpu cache wisely. But I can't figure how we can benefit from cpu cache. If components are saved in an array ...
7
votes
3answers
1k views

Advices on Linking Between Entity Component System in C++

After reading a few documentation about entity-component system, i decided to implement mine. So far, I have a World class which contains the entities and the system manager(systems), Entity class ...
8
votes
2answers
5k views

Entity Component Systems with C++ - Accessing components

(What I'm describing is based on this design: What is an entity system framework?, scroll down and you'll find it) I'm having some problems creating an entity-component system in C++. I have my ...