If you don’t remember what is GoldMonkey, click here: GoldMonkey is... well, gold!
Some work has been done. Now the values can be loaded also from JSON, and I’ve added a “tagged values” feature, which I will explain with this example:
I have to load a value enemy_life
. However, this value changes with the difficulty settings. On easy is 5, on normal is 10 and on hard is 15. The JSON contains all the values:
{
"id": "enemy_life easy",
"value": 5
},
{
"id": "enemy_life normal",
"value": 10
},
{
"id": "enemy_life hard",
"value": 15
},
Then on the game you retrieve the appropriate value with GM.loadInt("enemy_life", GAMEDIFF)
If later on you decide that the value should not change between levels, you can modify the JSON like this:
{
"id": "enemy_life *",
"value": 15
},
…of course without changing the source code.
Thoughts? Did I reinvent the wheel?
The tag can be any string. The example is for difficulty settings because it is the most likely use case, but you can come up with other tags.