Files
project_sanic/map_test.json

205 lines
4.0 KiB
JSON

{
"name": "Level 1",
"width": 2400,
"height": 800,
"background": "assets/map/background/forest_bg.jpg",
"gravity": 1.0,
"ground": [
{
"id": "main_ground",
"x": -1000,
"y": 780,
"width": 1800,
"height": 200,
"texture": "assets/map/platform/grass_texture.jpg"
},
{
"id": "pit",
"x": 800,
"y": 780,
"width": 200,
"height": 20,
"is_hole": true
},
{
"id": "main_ground_2",
"x": 1000,
"y": 900,
"width": 1800,
"height": 200,
"texture": "assets/map/platform/grass_texture.jpg"
}
],
"platforms": [
{
"id": "platform1",
"x": 300,
"y": 600,
"width": 200,
"height": 20,
"texture": "assets/map/platform/grass_texture.jpg",
"is_moving": false
},
{
"id": "platform2",
"x": 700,
"y": 500,
"width": 150,
"height": 20,
"texture": "assets/map/platform/grass_texture.jpg",
"is_moving": true,
"movement": {
"type": "linear",
"points": [
{"x": 700, "y": 300},
{"x": 700, "y": 600}
],
"speed": 2.0,
"wait_time": 1.0
}
},
{
"id": "platform21",
"x": 1200,
"y": 750,
"width": 150,
"height": 20,
"texture": "assets/map/platform/grass_texture.jpg",
"is_moving": true,
"movement": {
"type": "linear",
"points": [
{"x": 1200, "y": 550},
{"x": 1500, "y": 550}
],
"speed": 2.0,
"wait_time": 1.0
}
},
{
"id": "platform3",
"x": 1200,
"y": 400,
"width": 100,
"height": 20,
"texture": "assets/map/platform/grass_texture.jpg",
"is_moving": true,
"movement": {
"type": "circular",
"center": {"x": 1200, "y": 400},
"radius": 3,
"speed": 0.02,
"clockwise": true
}
}
],
"enemies": [
{
"id": "enemy1",
"type": "walker",
"x": 500,
"y": 620,
"health": 1,
"damage": 1,
"behavior": "patrol",
"patrol_points": [
{"x": 400, "y": 620},
{"x": 600, "y": 620}
],
"speed": 1.5,
"sprite_sheet": "assets/map/enemy/walker_enemy.png"
},
{
"id": "enemy2",
"type": "flyer",
"x": 1000,
"y": 400,
"health": 1,
"damage": 1,
"behavior": "chase",
"detection_radius": 200,
"speed": 2.0,
"sprite_sheet": "assets/map/enemy/flying_enemy.png"
},
{
"id": "enemy3",
"type": "turret",
"x": 1500,
"y": 700,
"health": 1,
"damage": 1,
"behavior": "stationary",
"attack_interval": 2.0,
"attack_range": 300,
"sprite_sheet": "assets/map/enemy/turret_enemy.png"
},
{
"id": "boss",
"type": "boss",
"x": 2000,
"y": 0,
"health": 3,
"damage": 1,
"behavior": "boss",
"attack_interval": 1.0,
"attack_range": 1000,
"sprite_sheet": "assets/map/enemy/boss.gif",
"size": [200,200]
}
],
"collectibles": [
{
"id": "coin1",
"type": "coin",
"x": 1220,
"y": 320,
"sprite": "assets/map/collectibles/Sanic_Coin.png"
},
{
"id": "coin2",
"type": "coin",
"x": 400,
"y": 540,
"sprite": "assets/map/collectibles/Sanic_Coin.png"
},
{
"id": "power_up1",
"type": "speed_boost",
"x": 900,
"y": 450,
"duration": 5.0,
"sprite": "assets/map/collectibles/speed_boost.png"
}
],
"checkpoints": [
{
"id": "checkpoint1",
"x": 1200,
"y": 760,
"width": 50,
"height": 50,
"sprite": "assets/map/checkpoints/checkpoint.png"
}
],
"spawn_point": {
"x": 50,
"y": 700
},
"exits": [
{
"x": 2300,
"y": 700,
"width": 50,
"height": 80,
"next_level": "Level 2",
"sprite": "assets/map/exit/door.png"
}
]
}