What is the most efficient way to store data in a file?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jujumumu

I’m trying to save my game right now, I first started with a json file then I realized it wasn’t efficient and took up a lot of space. Is there a binary api to store my data in binary ways?

:bust_in_silhouette: Reply From: jgodfrey

In addition to JSON, you can store your own resources in .res/.tres files. AFAIK, these will be converted to binary form when you build your project, so they should be much more space efficient.

Here’s a related answer with some additional details.