This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Levels
Niket Shah edited this page Nov 9, 2017
·
23 revisions
We store our levels in JSON
for the backend and *.unity
scene files for the frontend. The below is a proposed format that we think will cover all the situations we need for the level 1 milestone.
{
"id": 1,
// we can figure out minX, minY, maxX, maxY and origin from these two corners.
"south_west_corner": {
"x": -2,
"y": -2
},
"north_east_corner": {
"x": 2,
"y": 2
},
// the spawn location of the player
"spawn_location": {
"x": 0,
"y": 1
},
"obstacles": [
{
// the location here is the bottom left cell of the obstacle
"location": {
"x": 0,
"y": 1
},
"width": 2,
"height": 1,
"type": "van",
"orientation": "east"
}
],
"pickups": [
{
"type": "damage",
"value": 5,
"location": {
"x": 0,
"y": 1
}
}
]
}