Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Item.Mass - should this be an abstract property?
Re: Item.Mass - should this be an abstract property? Fri, 10 February 2012 22:58 Go to previous messageGo to previous message
Daniel is currently offline Daniel

 
Chief Warrant Officer 3
Stars! Nova developer
Stars! Nova developer

Messages: 179
Registered: April 2006
Location: Nowra, Australia
Most game objects currently inherit from item. Item has settable mass and position. However it makes no sense to set the mass of fleet, star and minefield and only fleet, star and minefield have a position.

Perhaps the root of the object tree should be a 'gameObject' which has a name, key and type? It could have a 'mappableObject' descendent which adds the position property (which descends to fleet, star and minefield). And a design descendent which adds the cost property (which descends to component and Hull)?

This needs a good bit more thought about what properties are added at each point in the object hierarchy. It would be better to sort this out properly, rather than throw exceptions when setting inappropriate properties, so any issues can be found by static type checking.

Not sure if doing this now would confuse Aeglos' effort to re-write the order system?



Have fun.

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Production classes - IProductionUnit and derivates
Next Topic: Spam posts
Goto Forum:
  


Current Time: Mon Apr 29 02:14:57 EDT 2024