MovingBlocks/Terasology — pull request #409 by mbrotz (2013-01-12 14:19:26+00:00)
Title: Protobuf support for TeraArrays and Chunks

Hi

I've implemented protobuf support for TeraArrays and Chunks.

Enocoding and decoding of TeraArrays:
* TeraArrays.getInstance().encode(TeraArray)
* TeraArrays.getInstance().decode(ChunksProtobuf.TeraArray)

Encoding and decoding of Chunks:
* Chunks.getInstance().encode(Chunk)
* Chunks.getInstance().decode(ChunksProtobuf.Chunk)

Further i've added a new chunk store which internally uses protobuf to store chunks. I haven't made any benchmarks yet, but i get the feeling that the new chunk store is faster than the old one. And it definitly yields slightly better compression for chunks and entire worlds.

I think, existing worlds which were created using the old chunk store should still work! They just keep using the old chunk store when you load them. At least, it works on my machine. I hope, it works on yours too, i don't have very old worlds to test it against...

I can add a conversion mechanism so your old worlds can switch to the new chunk store.

Maybe someone can test, wether old worlds still work? Don't forget to backup your old worlds!