Compressed output format

In the terrain generator I created myself for my game I compressed my heightmap data as follows:

  1. I’d generate and store the heightmap data as raw 16bit height values (So, for a 1024*1024 title that’d be 2097152 (2Mb)).
  2. I’d then calculate the average height of tile and make all the other values as deltas from this average.
  3. If you look at the frequency of the deltas you will see that some numbers occur much more often than others. This makes it the perfect candidate for huffman encoding.

The net result is a big saving in disk space.

Also, for a game like mine where the terrain is so large that it has to be loaded in real time as needed, the smaller files sizes mean quiker load times (Even with the time it takes to decompress this in memory, its still much quicker than loading the original file).

Do you support anything like this now, or is this a prime candidate for a user add-on?

Thanks
Ben

World Machine supports hf2/hfz terrain. You can read more details about that on the L3DT website. The terrain spec was created between a number of developers. It’s supported by L3DT, World Machine, Global Mapper and Wilbur I think

You can read in detail here:
http://www.bundysoft.com/docs/doku.php?id=l3dt:formats:specs:hf2

monks