sanderman01 / unity-gridgame

A chunked grid system for use in the Unity3D game engine. This system intends to facilitate games containing grids with large numbers of tiles or blocks.
GNU General Public License v3.0
6 stars 0 forks source link

Choosing a serialization format and library #4

Open sanderman01 opened 7 years ago

sanderman01 commented 7 years ago

Having a standard format for both networking messages and dynamic pieces of data will eventually be required.

The Game Minecraft uses the NBT format for both local storage and network transfer of data. This is used for a lot of things that need the ability to store some small amount of data somewhere:

This mechanism is very powerful because it allows for passing around very dynamic pieces of data, and it is also forward compatible. I feel that I want to take a similar approach for my own game. I intend to use a more common and well-supported serialization format though.

The format and API should be:

Right now I'm leaning towards MsgPack. If anyone has a suggestion and rationale for picking a different option, please discuss.

References: NBT Format MsgPack BSON vs MsgPack discussion

sanderman01 commented 7 years ago

Looks like CBOR is also a good candidate. It seems inspired by both JSON and MsgPack, and it looks more 'officially' standardized based on an RFC and all that stuff.

CBOR