Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Let's see history of success. Which popular games (and game engines) were built using component-based game object system? Each answer should contain:

  1. Game Title (one per answer)
  2. Author / Company
  3. Year
  4. Development time (optional)
  5. Link to postmortem (optional)
  6. Links to docs/source code (optional)
share|improve this question
7  
-1, pretty much every game written in the past decade is going to use a component system somewhere, and not use a component system somewhere else it could've. –  user744 Oct 20 '10 at 12:31
3  
You are wrong. Many engines still use static hierarchies. And it is interesting to collect and read docs/postmortems/code snippets of games and engines that really use component systems. –  topright Oct 20 '10 at 12:44
4  
I didn't say engines don't use static hierarchies. I said you'd be hard-pressed to find an engine that only uses static hierarchies, just like you'd be pressed to find one only using components. –  user744 Oct 20 '10 at 13:45
2  
You are wrong. Game entities (heart of game logic), visual effects, game engine and editor infrastructure either are component-based or not. –  topright Oct 20 '10 at 14:07
3  
Erm.... Bounty for this type of question??? –  pek Sep 5 '11 at 10:18

6 Answers 6

Unity3D uses a component-based system by default. It is superb for creating game entities from a text file and dependency injection.

function createEnemy() {

   // extract AI type for enemy
   // definition is a custom structure holding parameters to create the enemy
   var aitypename = definition.ai;

   // AIType can be an interface or abstract class
   // you can create a component from a string or from a type
   var ai : AIType = this.gameObject.AddComponent(aitypename);
   ai.setup(definition.ai_settings);

   // set rule for enemy when it is destroyed
   this.gameObject.AddComponent(definition.when_destoryed); 


}

Those components could look like this

class AI_Scout extends AIType
{
  // called per update-frame on the game-object with this script
  public function Update() {
    // run Scout AI here
   }
}


class Spawn_Ammo_On_Destroyed extends When_Destroyed
{
   // automatically called by the engine when the game object this script is attached to is
   // destroyed
   public function OnDestroyed() {
    // spawn ammo
    }
}
share|improve this answer

Tony Hawk Pro Skater 3
Developer: Neversoft
Year: 2001
Time: About two years
Post Mortem: Evolve Your Hierarchy (probably the most linked component-based article)

share|improve this answer

To my knowledge the best project i have seen is Burger Engine. jst download the code and check how well they have implemented.The whole thing is data-driven from xml and they used very well entity based architecture.worth looking at it.

http://code.google.com/p/burger-engine/source/browse/

share|improve this answer
2  
-1, that code looks really amateurish, from the misspelling of "Abstract" to the static component type enumeration, huge numbers of virtual functions, the inclusion of 28 bytes of position data on each component... If this is the best you have seen, look elsewhere. –  user744 Sep 5 '11 at 23:56
    
sad that you didn't like it.The whole code is data driven and i didn't find any open source implementation which will accomplish this task with this much ease.If you have any links to good code please post the links.And coming to misspelling,virtual func - Its a good resource for the people who are new into 'component based architecture'. It serves the purpose of giving valuable intro on how data-driven design works in practice. –  Ayyappa Sep 6 '11 at 5:40
2  
Dunno about code, but pointing out spelling mistakes is an invalid argument, considering there are many programmers from non-english speaking countries as well. –  Quakeboy Apr 13 '12 at 11:36
  1. Thief: The Dark Project
  2. Looking Glass
  3. 1996 - 1998
  4. 2-ish years
  5. Postmortem
share|improve this answer

Resistance 1-2 (possibly 3) (2006-2008) by Insomniac Games

Terrance Cohen lists these games in his A Dynamic Component Architecture for High Performance Gameplay talk from GDC Canada 2010.

Not sure if this was applied to the recent Ratchet & Clank games.

share|improve this answer
    
Do you know if the audio for that presentation is behind the GDC Vault paywall? The slides alone are pretty cool but there are a few questions I have that I suspect are answered in the presentation. –  user744 Oct 20 '10 at 16:30
    
I didn't know about this presentation, thank you very much! –  topright Oct 21 '10 at 0:10

Dungeon Siege by Gas Powered Games

Scott Bilas released a lot of information about Dungeon Siege which featured component-based systems, amongst other things.

Dungeon Siege was released in 2002.

share|improve this answer
    
Wow, excellent link. His talk on component systems really helped me to better understand the implementation of component-based systems. Neat talk about how the continuous world was done in DS as well. I wonder if similar techniques are still in use in other large world games. I think most tend to use something more akin to regions or chunks (Minecraft, anything by Bethesda). –  CodexArcanum Oct 20 '10 at 15:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.