For this page:
http://entity-systems.wikidot.com/start
…I want a list of published / self-published games that were built on top of an Entity System.
I know a few off the top of my head (I think – I’m going to mail some of the authors and double-check), but mostly I have no idea.
So … if you know of any, please add them to the wiki on that page.
BONUS POINTS
…if you can provide *any* of the following info:
- Link to a public interview / post-mortem about the game that mentions the team’s experiences with ES
- Names of any programmers and designers that definitely worked on the ES part of the game
- *SUPER BONUS*: link to a description of how they designed/implemetned the ES part
11 replies on “Help! Which computer games use Component/Entity Systems?”
You should have a look at the postmortem of Thief: The Dark Project.
Quote :
“[…] the Object System was a general database for managing the individual objects in a simulation. It provided a generic notion of properties that an object might possess, and relations that might exist between two objects. It allowed game-specific systems to create new kinds of properties and relations easily, and provided automatic support for saving, loading, versioning, and editing properties and relations. It also supported a game-specific hierarchy of object types, which could be loaded, saved, and edited by designers. Programmers specified the available properties and relations, and the interface used for editing, using a set of straightforward classes and structures. Using GUI tools, the designers specified the hierarchy and composition of game objects independent of the programming staff.
In Thief there was no code-based game object hierarchy of any kind.”
I think the open-source nebula 3 has also an entity system; if I remember rightly it wasn’t really your approach (rich entities with callbacks and stuff).
some description is provided here: http://flohofwoe.blogspot.com/2007/11/nebula3s-application-layer-provides.html
@questor
Thats perfect, thanks.
Yep, its a shitty ES implementation – based on message passing, so its slow, its clunky, and its harder to work with.
But … It sounds like a classic example of that approach, which is just what im looking for. In my opinion, its a dead end direction, but … I want evryine to make up their own minds about it.
Thanks to tom, too – id forgotten Thief (!), even though thwt was the game that first inspired me to start in this direction, many years ago!
I’ve written a small testapp to test the entity system in combination with multicore processing. You can find the sourcecode here: http://unseen-academy.de/snippet_component_system.html
I have used my test source code (published in the article about your android-implementation) and thought a little bit about the design. I have removed the entity-id because I have never needed one (I’ve used the address of the entity as index). And after a little bit more analysis I’ve found this:
in my update-code I access the components mostly like this:
CompPosition3DTemporary *myBodyPosTemp = mEntities[i]->getAs();
CompVelocity *myBodyVelocity = mEntities[i]->getAs();
but everytime I get a component a lookup is done with the entity-address as key. In your description about your entity-system you’ve written that an entity contains ALWAYS no data, but I think in my case it would be much better to insert the components directly into the entities and the es keeps a list of family-ids and which entities has components of them. It will spread the homekeeping work over entities and the entity system, but the access will be much faster because on every getComponent I have removed a level of indirection.
My system would look like that:
struct Entity {
std::map components;
};
class EntitySystem {
std::map Entities;
};
is it clear what I want to say and any thoughts? :)
hmpf, sorry. the template-parameter are removed, so here is it with correct template parameter:
struct Entity {
std::map_FamilyId, Component*_ components;
}
class EntitySystem {
std::map_FamilyId, Entity*_ entities;
}
@questor
Nice idea, I’ve never used the address like that before. So far as I can see, there’s nothing wrong with it – but note that over time it might cause problems, e.g. in networked games, or when reproducing a player’s bugs on your development machine. c.f. the issues if you do an SQL table and do NOT add an “(integer) id” column and use it as primary key – everything still works, but many things are a little bit harder / a lot less efficient.
@questor
Also … can you do a simple writeup of what’s “different” about your version, and make a page for it on the wiki? Link to it from here: http://entity-systems.wikidot.com/es-approaches
EDIT: all the bits below: please include them in the wiki, rather than here, where they’ll get lost among the other comments / threads :)
It would be great if you could list the pros/cons of your “embedding the components”. I’m not sure I fully appreciate what you’re doing there.
Also, would be nice to see a simple/short writeup how you approached the parallel-processing part. I think a lot of people are interested in that *ESPECIALLY* since you’ve got the source-code to go with it :).
(don’t worry too much about where this fits into the wiki – we can always refactor it later once that’s clearer)
I’ll try to measure the different versions and will write something about my system with ideas I had to improve it.
I want to rewrite it a bit to be able to share the complete sourcecode without big dependencies to use (that was one reason I’ve used the nulstein-library and not the better itbb) so that I have an easy to understand program to share.
[…] T=Machine ยป Help! Which computer games use Component/Entity Systems? […]
I’ve just recently published my team’s ES-based game, and I’ll be adding it to the wiki later today.
As I continue my own explorations into ES architectures, I move towards networked games, and I run into some interesting problems. I’d be interested to hear how you design multiplayer client-server games using an ES approach. Specifically, I am pondering where my different components and entities should live, and the best way to synchronize the different machines’ own entity systems. For example, the server could hold the game state but needs to be separated from UI concerns, but parts of the game state must be replicated on the client to determine what UI actions are legal.
Something you might share with us in a future blog post perhaps?