I've been using JSON for my project, which has been working totally fine for what I'm doing. I'm only really familiar with JSON, but I know other formats exist like YAML. It's always nice to keep my options open, and as I'm now starting to work on a new feature of the project, I wonder if an alternative could be convenient to use instead of JSON.
The JSON it would look something like this. I give this to my terrain generation system which uses it to create a heightmap which is used to create the mesh for the ground.
{
"name": "Volcano Island Example",
"default": true,
"terrain": {
"layers": [
{
"name": "Ocean",
"order": 0,
"effects": [
{
"name": "Flat Land",
"operation": "Set Initial",
"parameters": [
{
"name": "Height",
"value": 0
}
]
},
{
"name": "Basic Noise",
"operation": "Add",
"parameters": [
{
"name": "Size",
"value": 0.67
},
{
"name": "Roughness",
"value": 0.25
},
{
"name": "Animation Speed",
"value": 2.3
}
]
}
]
},
{
"name": "Beach",
"order": 1,
"effects": [...]
},
{
"name": "Grass",
"order": 1,
"effects": [...]
},
{
"name": "Volcano",
"order": 2,
"effects": [...]
},
{
"name": "Rivers",
"order": 3,
"effects": [...]
}
]
}
}```