Original Post
Hi all! Yep, this is another classic rambling drawn out post from me. Hopefully it'll be relatively interesting food for thought, and I'd like to know if anyone has heard of similar systems in operation? Comments and critique of the concepts here are also welcomed. This relies a little on the distributed server architecture and relevance graph topics I've previously gibbered about, so if you haven't skimmed through it: [LINK] One of the caveats of my library design is to allow rapid prototyping of game worlds, and development-in-situ - basically allow superclients to tweak the game's assets whilst they're live, modifying landscapes, adding dungeons, that kind of thing. One of the problems with developing large-world environments (not just for online games but in general) is asset production, as I'm sure everyone would agree. To counter this the library and toolset design encourages a principle of reuse - for example the same terrain heightmap can be used in many different landscape chunks by setting different base elevations and (90 degree) rotations. This causes a problem when a landscape chunk is editted - if that base asset (the heightmap in this example) is used elsewhere, we cannot allow all those other chunks to be modified. We therefore track reference counts for each asset, and if that usage count isn't 1, we clone the asset and save it as a new one before editing it. Simple enough you think - but this presents a problem when propogating the change - the relevance graph explicitly links assets together (if you're in one POR (see link), the neighbouring PORs have to be loaded). Keeping 'real' references to filenames or DB entries for each linked POR asset IN each POR asset causes a cascade of cloning that runs all the way to the root. Not good. It seems to me, the way to solve this potential cascade is to store the assets in an entry for each POR zone, and store links to each POR there also. When a change is made to a POR, a change notification event is triggered that effects all neighbouring PORs and causes a reload of the (now altered) assets from the linked POR. Ok, so we have control of the change cascade. The next interesting problem is caching of asset data across the microcluster. Since chunks of the relevance graph can be arbitrarily reassigned to different machines, the most space-efficient method of storage is in a central repository (blobs in a DB possibly). Not necessarily the most time-efficient though. I'm considering the use of checksum or MD5 hash comparison to check asset cache validity when loaded, or reloaded, with failed comparisons causing a fetch from the central repository for the cluster. Does this seem sensible enough? Should I use blob storage in my central database or code up a simple ftp using UDP? (This would allow fetching to be done relatively slowly, throttled in with all the usual cluster traffic). [Edited by - _winterdyne_ on November 11, 2005 8:10:20 AM]