Structured data idea

Started by
5 comments, last by vallentin 18 years, 1 month ago
I was playing Civ… no matter what Civ exactly, and a thought came to me…What if we could enrich the diplomatic treaties. What would it take to make a in-game describable treaty. What I mean is having the option to define the treaty in terms of target objects(or object lists) and stances(and/or stance lists). And some time has passed since I couldn't think of a real way to do such a thing. But last days while I was thinking about making a economical-political real world simulator ('dunno if I will have the time and the will to accomplish this, but the idea is quite interesting) and the possible implementation struck me. To allow the in-game expanding of notions would need a way to specify the target objects (e.g. "all mobile units within a radius of r near the border"). So what I needed is a structured way of keeping maintenance of objects coupled with a permanent addressing system (a hierarchical addressing system). The specialists may have already read is XML (it is best suited for this, coupled with XPath, XLink and XSLT) but it has some drawbacks. The engine needs to be fast-so I/we need a C implementation. And it needs to be very small - so no data overhead and no extra unused functions. +it must be XSLT, XPath, XLink enabled. Hopefully someone would point me at the right xml engine (pls) P.S. XML would allow the existence of meta-rules. rules that describe the correctness of another rules. Something like: "Transport taxes may be taken only from companies that earn money from transportation" P.S.-2 sorry for my English [Edited by - vallentin on March 12, 2006 10:39:18 AM]
Advertisement
Not an engine, but might help you make one
-----------------------------------------Everyboddy need someboddy!
Nice thread..
I was referring to the possibility of using in-memory XML to store Game data.So that permanent address (not pointers) could be used along with a closeness nomenclator while creating these addresses(to allow a *-like selection mechanism to occure while using this in-memory XML-base approach).

I liked those (to someboddy)
Not treaties exactly, but functional languages have been used recently to describe financial contracts. You can find the paper on that here

I imagine with a suitable set of primitives, you can make it possible to compose some interesting treaties as well.
---New infokeeps brain running;must gas up!
the nicest part is that the treaties can be defined within games(with an adequated interface of course)this way a no tresspassing treaty or a mutual beneficial exchange+an army rendez-vous treaty may be reached while playing

[Edited by - vallentin on March 13, 2006 2:04:52 AM]
I dont really think that xml will do for run time storage of such data.

If you say the performace and memory is an issue you will waste both having xml dom vs custom data structure.

If you need xml only for saving gamestate, then why performance is crucial anyway?

Just $0.02
Using xml to storage would be difficult due to memory and speed constraints I admit.
But this is only the current time problem(it may be implemented in some years). The idea behind xml was to provide extensibility via scripted rules and permanent addresses.I don't intend to fight for my idea blindly, it obviously may be a little flawed but it solves those previously stated problems.
Using xml I would have both scriptable permanent addresses via XPath, and extensibility -via some mechanism closely related to "ant" and fully using those permanent addresses.
The xml is a good candidate.
A scripting language would be theoretically better, but providing a fluent interface and keeping it up to date while allowing complex queries upon data (rules may apply to categories of objects), is a big pain in the back.
You got to admit keeping whole data structured in a xml kind of way (while not using all plethora of xml-aware functions like DOM's or alike) would allow to query a whole range of objects.
I sincerly hope there is a way to use xml while keeping it at least within speed acceptable limits..maybe a xml driven db?(permanent indexes would be a super solution).
P.S.Plus the queries would get to be written within the same data structure , and modified accordingly.

This topic is closed to new replies.

Advertisement