I was asked about settings/configs/defs - data driven systems for allowing a game to be changed in settings and with data at runtime instead of being all code driven. This can be useful for example if you want a game to be able to change dynamically based on A/B testing groups, or to be able to update something or disable a feature/section of the game while you fix an issue without having to wait for the app store review.
I'm posting to see if anyone else has experience with these and wants to chime in on their best practices with them, and also in case it helps anyone as they build one or if anyone knows of an e.g. unity asset that does this.
Such a system has three major parts:
1. Design time packaging
At design time, you need some way to gather all the settings data.
At one company, we called them "defs" and we had a custom tool with a GUI that was basically a properties file editor but with a way to visualize images and animations as you set the properties. Then it would "export" to a proprietary binary or string format and upload that to the server.
At another company, we called them "configs" and people wanted to enter the values in excel sheets. The name of the sheet would determine what kind of data structure it would be packed into, and the column headers would be the field names, and then each row would be an entry/instance of that structure/type. This was packed into a proprietary format using python to scan the sheets, but you could use any wire data format like
json/bson,
thrift, or protobuf to pack the data.
The upload might also need to be packed a certain way if you want to use unity bundles to download them.
2. Server storage
The places I've seen these stored were self-hosted servers, CDNs, and AWS S3 w/ a CDN front to access them.
3. App/client programming
The hardest part, of course, is writing/reworking your client code to be data driven and show images and UI based on the settings data and even turn on and off features based on the settings data. You can have versions or timestamps you check with the server on client startup to see if your current settings are outdated, and then if so you can fetch the latest data and process it. Both of the places I worked at even had logic in data form to parse and make decisions- in the tool there were logic drop downs for comparison operators and references to other properties, and in the excel sheets they could put in basic expressions we had to parse.
Thanks to Yotingo I got this rundown of unity assets that could probably be useful in building this kind of system:
Thanks all!
-vazor