Complex binary data storage

I’m working on a game that have a storage system inspired on Minecraft. It works by taking chunks of cubic volumes, compressing and adding to a “region” binary file. Basically, it takes a lot of chunks, serialize and compress every single chunk and put them into a file. The file sizes can vary, but in average they will be 2-32mb. This will happen very frequently in matches.

The maps have multiple region files, and I can’t figure out how to store them using Nakama. Does Nakama support storage of binary files? If not, do I need to use other backend service to handle those files and use the Nakama collections to store some sort of “pointers” to the files on other backend?

Hi, @PauloVBettio! And welcome to Heroic Labs forum!

Hope you become one of the many frequent contributors we have here. And, please, make sure to read our guideline :wink:

Regarding Nakama’s storage features, the short answer is that it is not meant to store and manage binary files. It could be done through some type of serialization (e.g., base64) but this is NOT recommended.

Also note that using Nakama does not exclude using other APIs along side. Server to server communication could be an option for you.

Hope this helps.


1 Like