Skip to content

Instantly share code, notes, and snippets.

@ElementW
Last active October 1, 2017 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ElementW/720794b1342206648a6c46bc99d675e2 to your computer and use it in GitHub Desktop.
Save ElementW/720794b1342206648a6c46bc99d675e2 to your computer and use it in GitHub Desktop.
XML vs JSON for Radix maps
{ "type": "RadixMapFile",
"materials": [
"dev/wall00",
"boxes/dev00",
"dev/wall_1x1_00",
"dev/floor00",
"dev/colors/white",
"dev/water00"
],
"entities": [
{ "type": "trigger",
"static": true,
"properties": {
"file": "music/track2.ogg",
"loop": false,
"type": "audio",
},
"position": [14, 2, 4],
"shape": {
"type": "cuboid",
"scale": [4, 2, 4]
}
},
{ "type": "solid",
"static": true,
"position": [14, 0.05, 4],
"shape": {
"type": "cuboid",
"scale": [4.4, 0.2, 4.4],
"material": 5
}
}
]
}
<?xml version="1.0" ?>
<map>
<materials>
<material id="1" name="dev/wall00"/>
<material id="2" name="boxes/dev00"/>
<material id="3" name="dev/wall_1x1_00"/>
<material id="4" name="dev/floor00"/>
<material id="5" name="dev/colors/white"/>
<material id="6" name="dev/water00"/>
</materials>
<trigger file="music/track2.ogg" loop="false" type="audio">
<position x="14.0" y="2.0" z="4.0"/>
<scale x="4.0" y="2.0" z="4.0"/>
</trigger>
<solid>
<position x="14.0" y="0.05" z="4.0"/>
<shape type="cuboid" material="5">
<scale x="4.4" y="0.2" z="4.4"/>
</shape>
</solid>
</map>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment