454 reputation
34
bio website
location
age
visits member for 3 years, 8 months
seen Sep 18 at 8:00

Jun
3
awarded  Enlightened
Jun
3
awarded  Nice Answer
Dec
17
awarded  Yearling
Jul
15
awarded  Editor
Jul
15
revised Entity System creating Components
deleted 2 characters in body
Jul
15
answered Entity System creating Components
Mar
29
comment When/where to update components
Move a component from one entity to another? Just add a function swapComponentOwner(int oldEntity, int newEntity) to each ComponentManager. The data is all there in ComponentManager, all you need is a function to change which owner it belongs to. Each ComponentManager will have something like an index or map to store which data belongs to which entity ID. Just change the entity ID from the old to the new ID. I'm not sure if sharing components is easy in the system I thought up, but how hard can it be? Instead of one Entity ID<->Component Data link in the index table there are multiple.
Mar
29
comment When/where to update components
EntityManager can be used to give out new IDs. It could also be used to create complete entities based on pre-defined templates (eg create "EnemyNinja" which generates a new ID and creates all components that make up an enemy ninja such as renderable, collission, AI, maybe some component for melee combat, etc). It can also have a removeEntity function which automatically calls all ComponentManager remove functions. The ComponentManager can check if it has component data for the given Entity and if so, delete that data.
Mar
22
comment When/where to update components
What do you mean by eliminate it? Do you mean an entity system without an Entity class? The reason Artemis has an Entity is because in Artemis, the Entity class manages its own components. In the system I proposed, the ComponentManager classes manage the components. So instead of needing a Entity class, you can just have a unique integer ID. So let's say you have entity 254, which has a position component. When you want to change the position, you can call PositionCompMgr.setPosition(int id, Vector3 newPos), with 254 as the id parameter.
Mar
16
awarded  Yearling
Feb
21
answered When/where to update components
Oct
18
comment Getting Started with Component Architecture: DI?
ashes999> I'll try to find some time tomorrow to go into some more detail :)
Oct
18
comment Getting Started with Component Architecture: DI?
Second, entity systems are about as far removed from academics as you can get. The two ideas behind entity systems are flexible game objects and high performance code. Entity systems allow for high performance, cache friendly and easily parallelizable code through small and well-contained components that can be executed in succession, aiding cache utilization. This is a far cry from the academic world which still seems to believe computers are some magic entity capable of executing any type of code without any regards to actual CPU architecture.
Oct
18
comment Getting Started with Component Architecture: DI?
I'm going to have to disagree here on two things. -- First, game object "exist" both the entity system and the game object system. The same data is there, the same logic, the same behavior. The only difference is how the data is layed out in memory. Just because your high-level programming languages lets you describe data in terms of objects and their properties does not mean there is a fundamental difference. An object is just a bunch of data in memory that happens to be grouped together. "Methods" are just functions with some syntax sugar. Game objects are just as real in an entity system.
Oct
16
comment Getting Started with Component Architecture: DI?
I'm sorry, but what is the difference between what you describe and "entity system nonsense"? Especially since you yourself write: "It allows you to entirely remove the concept of hard-coded classes like NPC or Ship or Bullet and instead use a data file to define what components those classes are made up." How is this not an entity system?
Oct
15
answered Getting Started with Component Architecture: DI?
Sep
28
answered How can be data oriented programming applied for GUI system?
Aug
11
answered Central renderer for a given scene
Feb
13
awarded  Supporter
Feb
7
awarded  Teacher