questor/fused 
Cool Newbie
 

Registration Date: 09-04-2005
Posts: 41
Location: Karlsruhe, Germany
 |
|
|
07-08-2006 09:31 |
|
rezination 
Administrator
     

Registration Date: 05-03-2005
Posts: 1346
Location: San Francisco Bay Area
 |
|
| RE: Component System Example Code (from GPG6) |
 |
Ratrace/Barbie has what we call a property system, which is based on the same concept. Everything in the world that's useful is an Entity, which is essentially a blank template. You attach Properties to these Entities to do useful things. Some examples of Properties we have are ShadowCaster, SeClump (a "physical" representation in the world with position, model, textures, etc), Converser, Relator, AiUnit, etc.
We can also attach sub-entities to Entities. In Barbie, everyone has a locker at school. Locker is a sub-entity that has it's own properties.
Furthermore, most Properties and all Entities are implemented entirely in XML, with some Lua event code for certain properties (like Clickable). It's only when we need some major and generalized functionality (like ShadowCaster) that we create "hard properties" that are implemented in C++.
Thus far, we've been very pleased with our Property system.
-Rez
|
|
07-11-2006 13:24 |
|
rezination 
Administrator
     

Registration Date: 05-03-2005
Posts: 1346
Location: San Francisco Bay Area
 |
|
|
07-28-2006 13:09 |
|
|