Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » FleetIntel question
Re: FleetIntel question Wed, 06 July 2011 18:52 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
Aeglos wrote on Wed, 06 July 2011 12:00


So I was strongly considering "reverting" some implementations on the Intel objects to no longer inherit Fleet/Star, to hold specific subset of data from them and to use them only for enemy/neutral things, while passing regular Star/Fleet objects in another collection to their owners. For example, StarIntel would not care about the Star's production queue as it is irrelevant unless you own the star, so don't even have it as a member. FleetIntel would have a specific member not found on Fleet to report composition without revealing designs, etc.
In this scenario, it makes more sense to hold Fleet and Star reports inside OtherEmpires<EnemyData> grouped by owner, and another EmpireStars<Star> and EmpireFleets<Fleet> collections inside EmpireData for that player's own things... but there would be a need to use IFleet and IStar interfaces for the client to use both star/fleet reports and star/fleets interchangeably for drawing and summaries, else we would need lots of if/else clauses, and we would need to loop through all of OtherEmpires' FleetReports and StarReports plus looping through the EmpireData's EmpireFleets and EmpireStars to actually get them all together.
Also implementing IFleet/IStar would mean adding lots of properties to Fleet/Star and making currently public variables private, which is in a way something desirable.



I like this idea. It sounds cleaner to me to have a seperate report class for fleet and star reports and to use an interface for common members.



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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bugs/Other Trackers
Next Topic: Anyone still around?
Goto Forum:
  


Current Time: Sat May 04 15:43:03 EDT 2024