260
« on: January 25, 2011, 07:02:34 am »
Hey, I'd like to suggest looking at some form of interprocess communication for DF, so that the various visualizers and tools we have could get data in a proper manner instead of having to read specific memory locations that change every version.
There are three big advantages and a minor one:
1: Tools will usually be up-to-date the moment a new version of DF arrives.
2: Toady could offer more data, and possibly even more complex data than any tool could provide.
3: Visualizers could read the clothes a dwarf is wearing, and with some luck, Dwarf Therapist could even query for a path between two points and give the user insight into his fortress.
Minor: Toady could somewhat regulate which data is available. By offering data this way, it's clear that it's okay to use it for anything. By not offering specific data, it's clear that that isn't supposed to be known. The tool coders could still mess around and read those things from raw memory, but there'd be less incentive since there's an "official" way to get the data you actually need.
Sockets seem to be used a lot for this kind of thing. UDP, preferably with a rather careful interpretation (just drop faulty requests, don't handle them) so that it doesn't affect DF's own stability.