Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Need to move away from using names as IDs
Re: Need to move away from using names as IDs Mon, 27 June 2011 06:04 Go to previous messageGo to previous message
Aeglos is currently offline Aeglos

 
Chief Warrant Officer 1
Stars! Nova developer
Stars! Nova developer

Messages: 142
Registered: May 2011
Location: Chile
Edited my last post, it should have read "properties", not "keys".

Let's consolidate the specs until now:

* Empire shall have a unique Id
* 'Owner' variable on all objects that require it shall match it's owning Empire's Id.
* Empire shall have three counters with configurable upper bounds; FleetCount, DesignCount, StarbaseDesignCount.
* Fleets shall have a unique FleetId composed of EmpireId+FleetCount.
* Designs shall have a unique DesignId composed of EmpireId+DesignCount.
* Starbase Designs shall have a unique DesignId composed of EmpireId+StarbaseDesignCount.
* All Ids shall be Ints.
* All Id calculations shall be abstracted in Properties

We might require to add prefixes as you said, for design separation between ships and starbases. Or we could begin the SB Ids at the normal designs upper bound.

And for clarity, let's drop the "Key" nomenclature and call them all Ids from now. It's getting confusing. In fact, I would vote that the properties are also all named Id; ie. Fleet.Id, Design.Id, Empire.Id. Looks more consistent and clear.


[Updated on: Mon, 27 June 2011 06:06]

Report message to a moderator

 
Read Message icon4.gif
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 icon14.gif
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
Read Message
Read Message
Read Message
Previous Topic: Turn year
Next Topic: Orders overwriting Star Data
Goto Forum:
  


Current Time: Thu May 02 20:05:43 EDT 2024