General Note

Master Data Formats for Games

A comparison of embedded master-data approaches—custom binary, JSON, FlatBuffers, MasterMemory, and SQLite—from tamilabo's production experience.

Game DataMaster DataUnity

How should balance tables and other game data be stored when it ships inside the app? This article summarizes formats tamilabo evaluated and used on projects such as Animal Panic Puzzle.

Here, master data means embedded data bundled with the app and updated at release time—not live server-side tables that social games refresh on a schedule. CDN or asset-bundle delivery can extend these ideas, but this article focuses on the embedded case.

Illustration of embedded master data

Custom binary

Define a struct or record layout, export rows from Excel or CSV, and build a converter that writes binary files. In C/C++, that often means reading and writing structs directly. Encryption or obfuscation can be applied before writing.

  • Pros: Full control over the format. Easy to tune for a project.
  • Cons: Not a standard interchange format. You maintain the toolchain.
  • Typical uses: Master data, save data

JSON

JSON is easy to implement—Unity's JsonUtility is enough for many cases—and works well with web APIs. Text parsing cost and memory use can be high, so console ports or tight memory budgets need care. Master data should usually be encrypted because tampering is easy.

  • Pros: Human-readable and easy to inspect. Straightforward on client and server.
  • Cons: Slower parsing, higher memory use, larger files.
  • Typical uses: Master data (encrypt when needed), config files, data where tampering is acceptable

FlatBuffers

Google's cross-platform serialization library targets games and performance-sensitive apps. It offers strong memory efficiency and fast (de)serialization. Animal Panic Puzzle used a FlatBuffers-based pipeline for master data.

You must define a schema up front, and the generation pipeline is more work than JSON. On Animal Panic Puzzle, JSON was converted to binary with flatc, then encrypted.

  • Pros: Designed for games; good performance. Usable as a network payload format.
  • Cons: Requires schema and tooling. Less common than JSON.
  • Typical uses: Master data, network payloads

MasterMemory

An open-source master-data library by Takaaki Kawai, author of UniRx. It uses MsgPack internally and offers a reasonable balance of load speed and memory use. It was listed as a candidate at the time this article was written.

Appendix: SQLite

A file-based database can serve as master or save data. SQL is familiar, but Unity projects rarely standardize on one SQLite stack, and performance depends heavily on usage. Animal Panic Puzzle did not adopt SQLite for master data when this article was written.