42
\$\begingroup\$

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)
\$\endgroup\$
10
  • 7
    \$\begingroup\$ -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. \$\endgroup\$
    – user744
    Oct 20, 2010 at 12:31
  • 5
    \$\begingroup\$ 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. \$\endgroup\$
    – topright
    Oct 20, 2010 at 12:44
  • 4
    \$\begingroup\$ 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. \$\endgroup\$
    – user744
    Oct 20, 2010 at 13:45
  • 2
    \$\begingroup\$ You are wrong. Game entities (heart of game logic), visual effects, game engine and editor infrastructure either are component-based or not. \$\endgroup\$
    – topright
    Oct 20, 2010 at 14:07
  • 2
    \$\begingroup\$ @topright: Regardless whether Joe is right or wrong, beginning your comments two times in a row with a plain and personal 'You are wrong' isn't very tactful, don't you think so too? I bet your comments wouldn't miss any relevant information without those three little words, but omitting them would contribute so much more to a nice and polite conversation. Please consider this :) \$\endgroup\$ Sep 5, 2011 at 11:00

6 Answers 6

19
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ 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. \$\endgroup\$
    – user744
    Oct 20, 2010 at 16:30
  • \$\begingroup\$ I didn't know about this presentation, thank you very much! \$\endgroup\$
    – topright
    Oct 21, 2010 at 0:10
18
+50
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ 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). \$\endgroup\$ Oct 20, 2010 at 15:46
13
\$\begingroup\$

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
    }
}
\$\endgroup\$
8
\$\begingroup\$
  1. Thief: The Dark Project
  2. Looking Glass
  3. 1996 - 1998
  4. 2-ish years
  5. Postmortem
\$\endgroup\$
8
\$\begingroup\$

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)

\$\endgroup\$
2
\$\begingroup\$

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/

\$\endgroup\$
3
  • 2
    \$\begingroup\$ -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. \$\endgroup\$
    – user744
    Sep 5, 2011 at 23:56
  • \$\begingroup\$ 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. \$\endgroup\$
    – Ayyappa
    Sep 6, 2011 at 5:40
  • 2
    \$\begingroup\$ Dunno about code, but pointing out spelling mistakes is an invalid argument, considering there are many programmers from non-english speaking countries as well. \$\endgroup\$ Apr 13, 2012 at 11:36

Not the answer you're looking for? Browse other questions tagged .