| OLD | NEW |
| 1 # Level description file. This file describes a single level. It | 1 # Level description file. This file describes a single level. It |
| 2 # is designed to be referenced from the game.def file. | 2 # is designed to be referenced from the game.def file. |
| 3 # It should not pollute the global namespace and should return a | 3 # It should not pollute the global namespace and should return a |
| 4 # single value which is the table describing the level. | 4 # single value which is the table describing the level. |
| 5 # vi: filetype=yaml | 5 # vi: filetype=yaml |
| 6 | 6 |
| 7 num_stars: 3 | 7 num_stars: 3 |
| 8 | 8 |
| 9 sprites: | 9 sprites: |
| 10 - { pos: [ 100, 500 ], image: ball_image, script: ball.lua, tag: BALL } | 10 - { pos: [ 100, 500 ], image: ball_image, script: ball.lua, tag: BALL } |
| 11 - { pos: [ 700, 40 ], image: goal_image, tag: GOAL, sensor: true } | 11 - { pos: [ 700, 40 ], image: goal_image, tag: GOAL, sensor: true } |
| 12 - { pos: [ 200, 480 ], image: star_image, tag: STAR1, sensor: true } | 12 - { pos: [ 200, 480 ], image: star_image, tag: STAR1, sensor: true } |
| 13 - { pos: [ 200, 240 ], image: star_image, tag: STAR2, sensor: true } | 13 - { pos: [ 200, 240 ], image: star_image, tag: STAR2, sensor: true } |
| 14 - { pos: [ 420, 90 ], image: star_image, tag: STAR3, sensor: true } | 14 - { pos: [ 420, 90 ], image: star_image, tag: STAR3, sensor: true } |
| 15 - { pos: [ 550, 250 ], image: star_image, sensor: true } |
| 15 | 16 |
| 16 shapes: | 17 shapes: |
| 17 # create three ramps for the ball to roll down | 18 # create three ramps for the ball to roll down |
| 18 - { type: line, color: [ 50, 230, 0 ], start: [ 20, 450 ], finish: [ 550, 400
] } | 19 - { type: line, color: [ 50, 230, 0 ], start: [ 20, 450 ], finish: [ 550, 400
] } |
| 19 | 20 |
| 20 - { type: line, color: [ 230, 50, 0 ], start: [ 200, 200], finish: [ 780, 380
] } | 21 - { type: line, color: [ 230, 50, 0 ], start: [ 200, 200], finish: [ 780, 380
] } |
| 21 | 22 |
| 22 - { type: line, color: [ 0, 50, 230 ], start: [ 20, 240 ], finish: [ 200, 50
] } | 23 - { type: line, color: [ 0, 50, 230 ], start: [ 20, 240 ], finish: [ 200, 50
] } |
| 23 | 24 |
| 24 # create a box | 25 # Create a box made of 4 lines. |
| 25 - { type: line, start: [ 500, 200 ], finish: [ 500, 300 ] } | 26 - { type: compound, pos: [ 500, 200 ], |
| 26 - { type: line, start: [ 500, 300 ], finish: [ 600, 300 ] } | 27 children: [ |
| 27 - { type: line, start: [ 600, 300 ], finish: [ 600, 200 ] } | 28 { type: line, start: [ 0, 0 ], finish: [ 0, 100 ] }, |
| 28 - { type: line, start: [ 600, 200 ], finish: [ 500, 200 ] } | 29 { type: line, start: [ 0, 100 ], finish: [ 100, 100 ] }, |
| 30 { type: line, start: [ 100, 100 ], finish: [ 100, 0 ] }, |
| 31 { type: line, start: [ 100, 0 ], finish: [ 0, 0 ] }, |
| 32 ] |
| 33 } |
| 29 | 34 |
| 30 # create a dynamic line anchored to the world at a fixed point. | 35 # create a dynamic line anchored to the world at a fixed point. |
| 31 - { type: line, start: [ 220, 50 ], finish: [ 620, 50 ], dynamic: true, anchor
: [ 420, 50 ] } | 36 - { type: line, start: [ 220, 50 ], finish: [ 620, 50 ], dynamic: true, anchor
: [ 420, 50 ] } |
| 32 | 37 |
| 33 # create a 'floor' object using the 'edge' type | 38 # create a 'floor' object using the 'edge' type |
| 34 - { type: edge, start: [ 0, 0 ], finish: [ 800, 0 ], tag: FLOOR } | 39 - { type: edge, start: [ 0, 0 ], finish: [ 800, 0 ], tag: FLOOR } |
| OLD | NEW |