+31 (0) 20 760 2040 info@spilgames.com

Spil SDK – Game Config

The spil sdk provides 2 methods that will allow you to pull a game config file (JSON) from our server.
Please contact your Spil Account manager to discuss which features in your game should be changeable via a config.

You can retrieve the complete config by using:

Or you can retrieve the first level keys immedeatly by calling:

If there is no network connection, then the SDK will use a default config file.
In exceptional cases people will open the app for the first time and don’t have an internet connection. For those cases we need to add a default configuration in the root of the project:
Add a file named ‘defaultGameConfig.json‘ in the root folder of your project.
Here is an example of a simple config file for the game Pixel Wizard:

So, with this config file, calling GetConfigAll() will return the whole object stringified.
Calling GetConfigValue(“enemycoindrop”) will return the enemycoindrop object stringified.
Please get in touch if you need help designing your config file.