File Format: JSON
To configure your level, fighter or enemy you need to write the configs in a JSON file.
There are many JSON tutorials out there
What Is JSON | JSON Explained In 1 Minute https://www.youtube.com/watch?v=7mj-p1Os6QA
Learn JSON in 5 minutes https://www.youtube.com/watch?v=jNcaS2MfXGQ
Learn JSON in 10 Minutes https://www.youtube.com/watch?v=iiADhChRriM
JSON in Plain English - The Power of JSON for Non-Programmers https://mbvissers.medium.com/json-in-plain-english-a59fe38c9bea
but here is a short overview how they work:
Common mistakes
ALWAYS use
"
for text and keys, NEVER'
.Decimals use
.
, e.g:1.23
Never have
,
after the last list/dictionary element
Formatting
The line-formatting is for you, the computer doesn't care.
["frame_1.png","frame_2.png","frame_3.png",{"key":"value","another":"value"}]
Rundown
Numbers
{
"unlockCost": 300
}
Decimals
{
"timePerFrame": 0.15
}
Booleans | true/false | yes/no
{
"flipX": true,
"flipY": false
}
List (Array) with text-elements (Strings)
[
"frame_1.png",
"frame_2.png",
"frame_3.png"
]
Key-Value dictionaries
{
"key": "value",
"another": "value"
}
Combined
{
"background1": {
"timePerFrame": 0.25,
"frameNames": [
"hg1.png",
"hg2.png"
]
}
}
Combined complex:
{
"fighterName": "Nata",
"description": "Nita's sister.",
"unlockCost": 100,
"attackType": "punch",
"hp": 2,
"attackPoints": 1,
"timeToLive": 4.0,
"timeRecovery": 0.35,
"previewImageName": "nataidle_00001.png",
"idle": [
{
"timePerFrame": 0.03,
"frameNames": [
"nataidle_00001.png",
"nataidle_00002.png"
]
}
],
"attacksOneSide": [
{
"timePerFrame": 0.25,
"frameNames": [
"nat_atk1_f1.png"
]
},
{
"timePerFrame": 0.25,
"frameNames": [
"nat_atk2_f1.png"
]
}
]
}
Last modified: 11 August 2024