| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| RFC Changes to the "unofficial" TWX v2 xml protocol https://mail.black-squirrel.com/viewtopic.php?f=15&t=25317 |
Page 1 of 1 |
| Author: | Maniac [ Tue Dec 22, 2009 3:28 pm ] | ||
| Post subject: | RFC Changes to the "unofficial" TWX v2 xml protocol | ||
Attached find a fragment that I extracted from the "unofficial"* TWX V2 XML spec that I have been working on. I am requesting comments for additions and exclusions to this format Some of the changes I have made are Changed the Sector.nr, Sector.Warps, Sector.Updated Fields and replaced it with the Index,Warps,Updated attributes Changed the Port Class and Port Updated to also be attributes. Here is a snippet of an XML file dump of a sector using the bits and pieces I grabbed from the XML spec. <SectorData version="1.0"> <Sector Index="6415" Warps="1" Updated="12/18/2009 10:15:17 AM"> <Space>uncharted space.</Space> <Beacon>A Gang of Hermits</Beacon> <NavHaz>0</NavHaz> <Anomaly>false</Anomaly> <Explored>Holographic</Explored> <Density>16801214</Density> <Warps> <Warp>13181</Warp> </Warps> <Port Updated="12/17/2009 9:57:52 AM" Class="2"> <Name>Jundland Annex</Name> <UnderConstruction Finished="0"/> <FuelOre> <Buyer>true</Buyer> <Amount>25010</Amount> <Percentage>100</Percentage> </FuelOre> <Organics> <Buyer>false</Buyer> <Amount>4860</Amount> <Percentage>100</Percentage> </Organics> <Equipment> <Buyer>true</Buyer> <Amount>4750</Amount> <Percentage>7</Percentage> </Equipment> </Port> <ArmidMines> <Amount>150</Amount> <Owner Corp="True"/> </ArmidMines> <LimpetMines> <Amount>150</Amount> <Owner Corp="True"/> </LimpetMines> <Fighters> <Amount>3360000</Amount> <Owner Corp="True"/> <Type>Defensive</Type> </Fighters> <Planets> <Planet1><<<< (E) Ascian Wanderer Homeworld >>>> </Planet1> <Planet2><<<< (E) Ferrengal >>>> (Shielded)</Planet2> <Planet3><<<< (E) . >>>> (Shielded)</Planet3> </Planets> <Traders> <Trader1> <Name>Private Maniac</Name> <ShipName>.</ShipName> <ShipType>Animoso Standard Issue</ShipType> <Figs>8000</Figs> </Trader1> </Traders> <Ships> <Ship1> <ShipName>.</ShipName> <ShipType>Unknown Ascian Boat of Humility</ShipType> <Owner>Scott</Owner> <Figs>279999</Figs> </Ship1> <Ship2> <ShipName>Iheex Chajocith</ShipName> <ShipType>Unknown Subterfuge Mantis</ShipType> <Owner>Scott</Owner> <Figs>210000</Figs> </Ship2> <Ship3> <ShipName>Uziel Xathiqum</ShipName> <ShipType>Unknown Subterfuge Enterra</ShipType> <Owner>Scott</Owner> <Figs>139985</Figs> </Ship3> </Ships> </Sector> </SectorData> * I say unofficial because the co-authors Earth,Stein & Macahan are AWOL. I would be glad to discuss this with them if they ever decide to resume development. After 2 days posted and no response I am going to commit my code in the Maniac branch At this point I really don't give a rats Butt whether this is compatable with anything else. Heh the source is open UNLIKE anything else on the market right now that might need access to the twx proxy database. As far as using this for saving and restoring databases it is gonna need some improvements as it takes forever to save 20K sectors. Part of this is because XML is more verbose than we need... who needs opening and closing braces/ <Start of Data> ....</Start of Data>. Couple ideas to add to this lame thread. Setting a bunch of attributes attached to the Sector could save a whole bunch of chars. We have some duplicated information that we could consolidate into attributes 12/28/09 Update 20K sector save takes roughly 7 minutes and make a file about 8-9MB in size Swath's version 2 twx save takes about 3 minutes and is about same amount in size. Memory footprint from olderversion was about 1G in size this version around 700MB IMHO still too large.
|
|||
| Author: | earth [ Fri Jan 08, 2010 12:41 am ] |
| Post subject: | Re: RFC Changes to the "unofficial" TWX v2 xml protocol |
never change a existing format without buy in from all authors. just make version 3 that you plan on supporting. earth. |
|
| Author: | Parrothead [ Fri Jan 08, 2010 7:15 pm ] |
| Post subject: | Re: RFC Changes to the "unofficial" TWX v2 xml protocol |
Thanks E. I am sure Maniac (an actual contributing member of the community) will say "how high" when you say jump. |
|
| Author: | Maniac [ Fri Jan 08, 2010 9:11 pm ] |
| Post subject: | Re: RFC Changes to the "unofficial" TWX v2 xml protocol |
Thanks for the feedback folks. I see that there is exactly 1 person that has a problem with me trying to implement an XML representation of the TWX Database. Earth I do appreciate you and the Swath team's effort in trying to establish a "standard" TWX protocol. The original purpose of this post was a request for comments (I.E. the meaning of RFC) that some changes be made. You are on record that I should keep the original version which I will. But unless I get some feedback on which way the community (not just earth) wants to go then I will do as you say. I will implement a Version 3 of the TWX protocol instead of trying to expand the V2 protocol (Which I might add is NOT a protocol that TWXProxy currently or has ever supported) As TWXProxy is Open source and free as in beer and SWATH and Attac are not I will use what ever protocol I want to and I will document what changes I am considering and I will publicly open up my code to review for any comments, flames, bugs that maybe some one else that hasn't gotten "tunnel" vision can see that the programmer can't. I would like to make the implementation compatable with swath and attac but with them being closed source I don't see any way that I could make it work. Part of the problems are going to be Version 2 of the protocol saves information from the CLV screen which is not saved in the TWXProxy Database Also saves information from the planet (shields, collies,product,figs and more) which TWXProxy currently does not implement. It is hard not being the original author of TWXProxy and understanding why Xide/Elder/Whoever went that direction and why they chose to use that particular function or why they implemented this thing or that thing. I was only trying to XML'ize the data in the database not all data in the game. For a "scripting host and a database" (which IMHO is all TWXProxy is and without some major overhauling of the code it is not going to progress much farther) I am not a professional programmer nor would I like to be one in real life but I can read and understand what the code is doing, Understanding why the programmer chose that particular algorithm or that data structure is what I struggle with. I am doing what I can and if by chance I make someone's experience a little easier and or enjoyable then I guess what I am doing is a success. I still have one more day of slaving ^H^H^H^H^H working this week so I will try and get some more documentation committed and start working on a new idea for multi-threading my XML generation functions early next week. Thanks for listening to the rants of a senile old fart. |
|
| Author: | Singularity [ Fri Jan 08, 2010 9:20 pm ] |
| Post subject: | Re: RFC Changes to the "unofficial" TWX v2 xml protocol |
Maniac wrote: I will implement a Version 3 of the TWX protocol instead of trying to expand the V2 protocol (Which I might add is NOT a protocol that TWXProxy currently or has ever supported) Not considering the community-think approach, thinking about this tho I can see where it'd be confusing. I mean ppl might see "oh, it's version 2 here, and version 2 there... so uhm... they should work right? Oh there's an expanded version of version 2... and uhm..." Might make it confusing for ppl. So maybe just calling to version 3 is a better approach. Maniac wrote: Also saves information from the planet (shields, collies,product,figs and more) which TWXProxy currently does not implement. You could just return 0 or null for information not contained. Easy to check for that in a routine. Maniac wrote: I was only trying to XML'ize the data in the database not all data in the game. Then just fork the concept and implement that instead. Screw "version 2" or "version 3" ... Just call it "TWXProxy XML format v1.0" |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|