Serialisation Compared to serialisation in almost any modern language, serialising state in C (or C++) is excruciating. There are no reflection capabilities in C, and minimal capabilities in C++, so you need to manually specify each and every field when serialising or deserialising the game state
Serialization in C has a very long history. Back in the '80s we were defining the struct's and then used rpcgen to automatically generate code that reads/writes them, for RPC calls.
I think the most widely deployed mechanism nowadays is protobuf.
Comments
I got tired of that years agao, and have used this approach with success in a few projects: https://www.lelanthran.com/chap2/content.html
Serialization in C has a very long history. Back in the '80s we were defining the struct's and then used rpcgen to automatically generate code that reads/writes them, for RPC calls.
I think the most widely deployed mechanism nowadays is protobuf.
That looks really interesting, I'll experiment with swapping to it!