Game Development Community

Jeff Faust : Question on Datablock speedup loading

by elvince · in Arcane FX (Public) · 10/20/2009 (3:58 am) · 1 replies

Hi Jeff,

I would like to create a similar function for speedup loading of datablock with a binary file. On T3D forum, people advise me that you implement this in the AFX pack. As for the moment, this pack is not on T3D, can you please give me the head lines to make this.

I think, I understood how keeping datablock when changing of server, but I would like to create a function that dump the loaded datablock on the server, this file will be in my client deliverables and load it on the client if CRC are ok.
I think this is the approach you had?

Thanks for your help,

#1
10/21/2009 (9:37 am)
All versions of AFX, including those currently available for TGEA and TGE, make use of a datablock cache system. It works pretty much as you've outlined...

Before shipping any datablocks to a client, the server streams all the datablocks it would ship to a file. The CRC for the file is calculated. Then for each client, if the client has no datablock cache or the CRC for the cache does not match the server's, the datablocks are shipped over the network and the client saves them in a cache for possible future loads. If the client cache has a matching CRC, it loads datablocks out of the local cache and no datablocks are shipped over the network.

The datablock cache system was quite difficult to implement and it's also somewhat sensitive to certain kinds of bugs. In particular, any kind of datablock that does not properly initialize its data can subvert the cache by placing garbage in the cache that changes from startup to startup.