Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » ClientState and .intel files
ClientState and .intel files Thu, 23 June 2011 16:54 Go 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
I'll pioneer the first dev discussion thread to get this forum going.

This is a continuation of the discussion on the SF forums. The summary is that the client state shouldn't keep the input turn variable as it has access to a lot of things it shouldn't know. In fact, the server shouldn't even send all that information to the client in the first place, but only what the client should have access to each turn

At some point the client will also need a new mechanism of generating order files with order commands, instead of simply sending it's updated state to the server. This will probably be done later on though.

For now I will focus on reorganizing the ClientState and what the server sends to it as the longer this is unresolved, the harder it will be to correct later on. This is my last quote/proposal on the matter:

Quote:

I just renamed the RaceData class to EmpireData, as it seems more apropiate considering it doesn't hold any race data at all, but rather empire wide information such as relations and tech.

Now the more that I think about it, the more I'm convinced that we should add to the EmpireData all the relevant datastructures that the client should know about: Star Reports, Known Fleets/Fleet Reports, Met enemies&icons, designs, available components, etc. and replace all of the redundant collections in ClientState with a single EmpireData object.

This would acomplish a bunch of things which we desire; since both client & server would share this structure (Server already uses it), the server simply assembles it on turn generation with what the client has to know and nothing else and sends it through the intel file, instead of sending a rather full game state and the client cherry picking what it needs; the client would simply read it's new EmpireData and update it, no calculations at all. This also allows the Server to actually keep track of what the client knows. Currently it keeps a full global state and assembles intel files when they need to be written on a per-case basis, but it is clueless about the valid state of each client unless it does a lot of silly lookups because the data is all scaterred in 10 collections. This allows the server to know everything, and also to know what the clients should know at the beggining of each turn generation, so it can check for potential cheats and mistakes.


I think I'll just go ahead and implement this, unless someone has any remarks, ideas or objections... which if you have, please do share it so we can make the best choice and get the ClientState sorted out and move on to the server turn generation generalization.

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
Previous Topic: rev630 - failing on WinXP using MonoDevelop
Next Topic: Amount of Info on scanning enemy fleets
Goto Forum:
  


Current Time: Thu Mar 28 05:30:04 EDT 2024