Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » "Intel" class becoming obsolete.
"Intel" class becoming obsolete. Wed, 29 June 2011 04:06 Go to next message
Aeglos is currently offline Aeglos

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

Messages: 142
Registered: May 2011
Location: Chile
I was tracking this: https://sourceforge.net/tracker/?func=detail&aid=3343421 &group_id=188744&atid=926545 bug which I discovered just now, and realized that the Intel class is fast becoming obsolete.

It models the .intel files, but since it's being restructured so that things will eventually go inside EmpireData instead of whole server collections, eventually it will just contain that: a single EmpireData object and nothing else.

Do we drop it entierly and make it so .intel files are just EmpireData serialized? I can't think about anything right now that the server would want to comunicate to the client which is not empire-specific. Any meta-data we would want to send besides EmpireData?

Report message to a moderator

Re: "Intel" class becoming obsolete. Thu, 30 June 2011 05:46 Go to previous messageGo to next message
Daniel is currently offline Daniel

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

Messages: 179
Registered: April 2006
Location: Nowra, Australia
Messages might be considered intel that is not necessarily empire data (eg a message from another empire). But that is not an important distinction and can be included in empire data.

I am not entirely clear on whether the concept is for empire data to replace intel, or client data or orders? Or was it intended to be some subset of the data from each of these? It seems to replace RaceData which was previously a component of orders but be much more that that. Is it intended to contain history information? Is the client or the server generating this structure or do each maintain a version of it?





Have fun.

Report message to a moderator

Re: "Intel" class becoming obsolete. Thu, 30 June 2011 09:24 Go to previous messageGo to next message
Aeglos is currently offline Aeglos

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

Messages: 142
Registered: May 2011
Location: Chile
Originally it contained Tech info (budget, levels, resources) and relations iirc.

It is now being slowly used to describe the concept of "empire" which was not there before, and include all empire specific data. Perhaps renaming it simply to "Empire" instead of EmpireData would make things clearer. I've given thoughts to that.

The EmpireData is supposed to be "The state of the empire" at any given turn.

The server keeps a master copy of all empires so it can know it's clients valid states every turn, and updates their data after turn generation. The intel file it writes contains the respective updated EmpireData that pertains it's owner, and some other collections that are slowly being moved into EmpireData. The Client reads the intel file, extracts it's whole state from there and does no processing at all (Or so is intended).

The ClientState currently consists of one EmpireData object and some collections that are being moved inside there. ClientState does and can contain other things though, like visual preferences, game folders and other non empire specific data.

But the intel file which contained the collections that the clients read and from where it picked what was theirs before is being emptied of them, until it will only contain a single EmpireData serialized. The server might as well serialize those as .intel files intead of proxying it through an intel class.

I might have made a mistake giving so much responsabilities to EmpireData, yet it's still essentially a P.O.D. object and it feels natural for the server to have it, so it can keep a record of the valid state of it's clients each turn independant of the master copy of everything. It also feels natural for the client to just read it's new server generated state and be done with it, no cherry picking, no looking in a dozen collections, no determining anything.

We can still change it of course, dissasemble it into separate collections again, if the consensus is so.

Orders is something else entierly. Right now it sends EmpireData back to the server, but it has to be restructured so it actually sends Orders and not state. That's a bit more complicated and sending state works for now I think.


[Updated on: Thu, 30 June 2011 09:26]

Report message to a moderator

Re: "Intel" class becoming obsolete. Thu, 30 June 2011 09:49 Go to previous messageGo to next message
Musmuris

 
Master Chief Petty Officer
Stars! Nova developer
Stars! Nova developer

Messages: 96
Registered: June 2011
One worry in my mind right now is what happens with missed-turns and I wonder how Stars! handles that now. Does each turn from the server overwrite local stuff?

e.g. Turn 2001, 2002 all happens OK.
Player A plays turn 2003 but never sends it in, and let's say he split a fleet in two here
Server generates 2004
Player A gets turn 2004 where that fleet he split is now elsewhere or was actually destroyed - what happens?

More particularly what happens in Stars! as is now. I will have to try and investigate if no-one knows.

Report message to a moderator

Re: "Intel" class becoming obsolete. Thu, 30 June 2011 10:09 Go to previous messageGo to next message
Aeglos is currently offline Aeglos

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

Messages: 142
Registered: May 2011
Location: Chile
I would assume that in Stars! the server would never process the split.

Same happens with Nova now; the server never gets the Orders, so the server updates that player's EmpireData with what it knows only: it's last valid state and the rest of the player orders, and then sends out the intel with updated EmpireData.

Report message to a moderator

Re: "Intel" class becoming obsolete. Thu, 30 June 2011 12:25 Go to previous messageGo to next message
Musmuris

 
Master Chief Petty Officer
Stars! Nova developer
Stars! Nova developer

Messages: 96
Registered: June 2011
That's what I was thinking and I think it's correct behaviour.

Does this mean that (for example) if I get my latest turn in an email that I can open that turn on any machine and see everything I need? or do I need the Client state from all previous turns still? This ability would be cool to have, but not required.

Report message to a moderator

Re: "Intel" class becoming obsolete. Thu, 30 June 2011 13:00 Go to previous messageGo to next message
Aeglos is currently offline Aeglos

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

Messages: 142
Registered: May 2011
Location: Chile
Well that's the idea. And actually it kinda does right now. If you create a game and delete everything in the folder except one .intel file and the .settings file, you can open/continue that game and generate orders. Some things are missing though, and the .cstate file wont be properly generated.

But yes, the idea I had was passing the complete empire state for a particular turn on the intel files -a single EmpireData object- so the Client know everything it needs just by reading it. That's why EmpireData is kinda superceeding the Intel class.

Now that I think of, the Intel object/file could also hold a copy of the game settings. That way each client only needs to recieve one file from the host to play and there is some use for it.

Report message to a moderator

Re: "Intel" class becoming obsolete. Thu, 30 June 2011 18:46 Go 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
It sounds like the server is being made responsible for more than it needs to be, such as keeping the latest historical report each player had on each star. However if that is an easier way to implement the no-trust approach then I have no problem with that.

I take it that when orders are submitted the server will have to check those (possibly to be implemented latter).



Have fun.

Report message to a moderator

Previous Topic: I've branched the Codebase [Merged back into trunk]
Next Topic: TestHarness
Goto Forum:
  


Current Time: Wed Jul 28 07:31:57 EDT 2021