View Single Post
  #6  
Old April 11th, 2008, 06:38 PM
Ed Kolis's Avatar

Ed Kolis Ed Kolis is offline
General
 
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
Ed Kolis is on a distinguished road
Default Re: EGGS - yet another programming project

I already have inheritance, in a fashion...

Any entity can have either zero or one archetype entity, which is akin to a class having a base class, if you want the first entity to represent a class. (If the first entity represents an instance of a class, then you could say that the archetype is the class of the object - the analogy is not perfect )

Now as for interfaces, all an interface is, is just a set of requirements, a "contract" if you will, that some object must follow in order to be considered an "instance" of the interface. I'm not quite sure how that would map over though... would it be as simple as saying that all Space Ships must have a Mass ability, regardless of value? Or would you want data validation ("all Space Ships must have a mass greater than 0 tons")? Or something different? Do you think that would be useful? I suppose that might be akin to the "requirements" in SE5, so it could be useful in that regard...

Or are you saying I should allow an entity to have multiple archetypes, e.g. an Organic Frigate could inherit abilities from both Space Ship and Living Creature? That might be useful, I suppose... doesn't seem like a particularly high priority though, given that I'm not sure at the moment how useful it would be in comparison to the ease or difficulty of implementing it properly... I'll have to think on it
__________________
The Ed draws near! What dost thou deaux?
Reply With Quote