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 Wed, 29 June 2011 05:13 Go to previous messageGo to previous message
FurFuznel is currently offline FurFuznel

 
Lt. Junior Grade
Stars! Nova developer
Stars! Nova developer

Messages: 437
Registered: November 2002
Location: New Brunswick, Canada
Aeglos wrote on Wed, 29 June 2011 03:06

I have a concern though: int counters have a problem. When a fleet or design is deleted, we cant simply reduce the counter by one; we would also need to re-index all designs and fleets. We need a way to tag available numbers on the counters. Perhaps use a dictionary<int, bool> with with <item.id, isUsed> instead of plain ints?

If possible, I would recommend avoiding the re-use of IDs during the same turn. I realize this will make the server's processing (and some of the client's processing) of turns more difficult, but I always found it annoying in Stars! that the messages would refer to a fleet but clicking on the GoTo button did not show me that fleet but some other fleet that was now assigned the referenced fleet id.

There might not be an easy way to store IDs that will be freed up at the end of the turn and then free them up as the last step in the processing. If it would be too difficult to implement this I understand.



Shadallark <==> FurFuznel
Mental anguish is for those who choose to think - FurFuznel
running Mac OS X 10.6.7

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 11:50:16 EDT 2024