Storing components in an ECS based game
I’m working on a game in C++, and I’m trying to implement an archetype based ECS system as described by Sander Mertens in these articles:
text
text
I have some problems defining the “Columns” described ind the second link, which are basically nested vectors that forms a matrix where columns are components and rows are entities.
He says that some kind of type erasure is needed to store vectors of objects of different types in the same “outer” vector, but so far I have made several attempts with only mixed results.