|
|
|
Re: Turn files documentation |
Thu, 07 July 2011 10:08 |
|
m.a@stars | | Commander | Messages: 2765
Registered: October 2004 Location: Third star to the left | |
|
Musmuris wrote on Thu, 07 July 2011 15:56 | So why are you against XML again then?
|
I find flat tables simpler.
Quote: | Anyway that comment is out of context - my point was that the APIs would always abstract the changes anyway, and in fact this would be more important for a database
|
Actually, it seems I guessed right. APIs are all nice and convenient, but as any user of propietary file formats knows, the real power comes with free access to the data. And that is also pretty important for databases, where one of the most serious concerns is the possibility to migrate to different DB engines.
Quote: | the XML spec is well defined whereas CSV doesn't even have a spec really.
|
Again, there's ways to cope with that, starting with a good documentation on which flavors/formats are being used.
So many Stars, so few Missiles!
In space no one can hear you scheme! Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Turn files documentation |
Thu, 07 July 2011 14:47 |
|
Aeglos | | | Messages: 142
Registered: May 2011 Location: Chile | |
|
My last post was stupid; indeed you don't need to implement a whole server... I was thinking of the current AI that runs server side wise and I was sleepy A third party client will do.
[email | m.a@stars[/email] wrote on Thu, 07 July 2011 13:20]
Well, someone has to do it if Nova is to ever be able to "Dump Reports" as Stars! does.
But I'd rather do the dumps directly from memory.
|
Dumping the current state right from memory for the turn files would make their relationships very spread out in a flat table style dump. For example,
Flet inherits from Item, and contains a list of Ships, which also inherit from Item, which store all of their components, which also inherit from Item, and link to a design that also inherits from Item.
It means dumping a single Fleet needs to link to at least 4 items, if the fleet contains one ship with just engines. And this is besides linking to the respective Ship, Design and Component objects.
Doing this in XML is fairly straightforward as the items are just subnodes on fleet, ship and components, and those are subnodes of each other, so no need to hunt for a ton of them in other blocks/tables when deserializing a fleet; they are all grouped together.
EDIT: unless we dumped them together, in which case each dump would be long and ugly and it would be nasty to check when each item started and ended, as the number of serialized variables on them can change, same for components.
"Report Dumps" like in Stars! can probably be handled differently with some flat table like dump (as they are shown as a table in the GUI already) or some stripped down XML.
[Updated on: Thu, 07 July 2011 15:09] Report message to a moderator
|
|
|
|