Hi,

> Then maybe XML (yes, they are bloated) using XPath to query the
> information? Implementing a database engine just to load some stats
> looks for me like breaking a butterfly on a wheel.

Modelling such data in XML would be a poor use of it. XML makes sense  
for reports (as you can XSLT it to XML:FO) and semantic data. There  
is very little semantic information carried in a weapon/body statistic.

That is not to say it can not be done, mind you.

XPath also has performance issues. A few months back I was writing an  
SVG font class which handled SVG font files (.xml). These files are  
~100kb with 3000+ elements (glyphs and kerns). Glyph searching was  
done using XPath. Even though the XPath implementation was in C it  
was still extremely slow to work out character widths. The  
performance is very much linear.

An SQLite database also makes a lot of sense as we implement a  
primitive form of inheritance. Lets say all of the games statistics  
are stored in base.db. We then load the mod foo.wz which provides  
foo.db.

What we can do is open up base.db and then attach foo.db to it  
(allowing both databases to be accessed using the same connection)  
then CREATE VIEW on a UNION of foo.stats and base.stats and boom. Our  
view, created at runtime now has all of the base statistics, plus  
those overridden by foo.wz.

Should be change the base stats there is no need to update foo.[db, wz].

Regards, Freddie.

_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to