From: <ia...@co...> - 2005-03-01 21:05:32
|
> > >I know from experience that as XML files become large, it can become very > >difficult to edit them or write them accurately - lots of simple mistakes > >creep in and unless a lot of effort is put into the parsing software, the > >error messages can bear no relation to the root cause. > > Yep. I've experienced this pain too. That's what brought me to suggest= > breaking out each > major class into it's own XML settings file. > The are arguments in favour of both approaches: one of the issues with XML is the general assumption that just because you CAN edit it with a text editor, you SHOULD use a text editor. That said, I'm happy to go along with multiple files. > >Rulesets have to be human readable and modifiable, so XML is a good > >choice. > >However, for saving the state of the game, I think that Java Serialization= > > >would be a better choice. The volume of data involved is relatively small > >and the coding for straightforward serialization is simple, certainly > >several times less effort than mapping all objects in and out of XML. > > Sounds good. I agree that the mapping a save file to XML will probably be a= > lot of work. So, > if there's a simpler way, I'd favor using it. Binary saves are a very, very bad idea: do I really need to explain why? Creating and reading XML for the saves is not difficult. Iain. |