All Questions
Tagged with entity-component-system c++11
6 questions
1
vote
2
answers
203
views
How do I create a class with reference member and vector of pointers?
I am fairly new to C++ and am working on a personal project. I want to create a vector<Entity*> entitities in C++ where each Entity object is unique. I have a class inside header Entity.h that I ...
1
vote
0
answers
402
views
How well this ECS implementation follows these principals
I'm currently learning about Entity-Component-System architecture Data-Driven design as a way to counter bad OOP design and optimize data fetching as a CPU friendly operation.
I'm trying to write a ...
0
votes
0
answers
63
views
Variadic class method with a virtual base class
I am trying to change my component pool generator to use variadic templates in an attempt to avoid all the Init() functions and use each component constructor instead. However I can't get it to ...
2
votes
1
answer
2k
views
c++ entity component system and accessing components using a template
I've been working on creating my own entity component system, and I'm set on being able to get a component by doing the following:
const auto& component = entity->GetComponent<ComponentType&...
7
votes
2
answers
6k
views
Designs of an entity component system
I wonder how to implement the fastest version of an entity component system (ECS from now on) in C++.
First off, regarding terminology:
a Scene is a container for Entities (and Systems in some ...
6
votes
5
answers
3k
views
Custom heap pre-allocation for entity-component system
I have an OOP entity-component system that currently works like this:
// In the component system
struct Component { virtual void update() = 0; }
struct Entity
{
bool alive{true};
vector<...