diff --git a/examples/assets/maps/mario1.json b/examples/assets/maps/mario1.json new file mode 100644 index 000000000..ffff33bb3 --- /dev/null +++ b/examples/assets/maps/mario1.json @@ -0,0 +1,39 @@ +{ "height":13, + "layers":[ + { + "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 4, 1, 1,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 19, 1, 1, 19, 19, 1, 1, 1, 1, 37, 1, 1, 1, 19, 19, 19, 1, 1, 19, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 19, 19, 19, 19, 19, 19, 1, 1, 1, 1, 37, 1, 1, 1, 20, 1, 1, 1, 31, 42, 42, 42, 31, 1, 1, 1, 1, 1, 43, 44, 45, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 37, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 32, 33, 1, 1, 1, 1, 1, 1, 1, 1, 38, 39, 1, 1, 1, 1, 1, 1, 38, 39, 1, 43, 44, 45, 1, 1, 1, 1, 1, 46, 47, 1, 1, 1, 1, 1, 1, 37, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 43, 44, 45, 1, 1, 1, 1, 1, 48, 49, 1, 1, 1, 1, 1, 1, 37, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 19, 19, 1, 1, 19, 19, 19, 1, 1, 43, 44, 45, 1, 19, 19, 19, 19, 1, 1, 19, 19, 19, 1, 1, 1, 37, 1, 32, 33, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 32, 33, 1, 19, 19, 19, 19, 19, 19, 19, 19, 1, 1, 1, 43, 44, 45, 1, 1, 20, 1, 1, 1, 35, 35, 50, 35, 35, 1, 1, 37, 1, 43, 44, 51, 52, 45, 1, 1, 1, 1, 1, 1, 53, 54, 54, 54, 55, 43, 44, 45, 1, 56, 57, 1, 53, 54, 55, 1, 1, 38, 39, 1, 1, 1, 1, 1, 1, 1, 1, 38, 39, 58, 59, 54, 54, 55, 1, 38, 39, 43, 44, 60, 61, 62, 57, 63, 64, 1, 38, 39, 53, 54, 54, 54, 55, 43, 44, 45, 1, 1, 1, 1, 53, 54, 55, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 53, 54, 54, 55, 1, 65, 66, 67, 68, 60, 61, 45, 1, 1, 1, 1, 69, 70, 53, 54, 54, 54, 55, 43, 44, 45, 1, 1, 1, 1, 53, 54, 55, 1, 71, 72, 66, 65, 66, 58, 73, 1, 1, 1, 1, 19, 19, 19, 19, 54, 54, 19, 19, 19, 19, 43, 44, 60, 61, 19, 19, 19, 19, 19, 1, 1, 19, 19, 19, 19, 55, 43, 44, 45, 74, 75, 1, 1, 53, 54, 55, 1, 1, 1, 76, 77, 78, 1, 1, 1, 38, 39, 19, 19, 19, 19, 19, 19, 19, 19, 19, 1, 1, 43, 44, 60, 61, 45, 1, 19, 1, 1, 1, 35, 35, 79, 35, 35, 55, 43, 44, 45, 80, 80, 81, 82, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 83, 84, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 85, 86, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 83, 84, 87, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 1, 1, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 1, 1, 1, 80, 80, 80, 80, 80, 80, 88, 89, 90, 80, 80, 80, 80, 80, 80, 80, 91, 92, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 93, 94, 88, 80, 88, 85, 86, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 1, 1, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 95, 96, 97, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80], + "height":13, + "name":"ShoeBox Tile Grab", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":211, + "x":0, + "y":0 + }], + "orientation":"orthogonal", + "properties": + { + + }, + "tileheight":16, + "tilesets":[ + { + "firstgid":1, + "image":"..\/..\/..\/..\/..\/..\/Art\/Artwork for game inspirations\/Super Mario Level Maps\/NES\/mario-1-1_bank.png", + "imageheight":144, + "imagewidth":176, + "margin":0, + "name":"mario-1-1_bank.png", + "properties": + { + + }, + "spacing":0, + "tileheight":16, + "tilewidth":16 + }], + "tilewidth":16, + "version":1, + "width":211 +} \ No newline at end of file diff --git a/examples/assets/maps/mario1.png b/examples/assets/maps/mario1.png new file mode 100644 index 000000000..9cc96c175 Binary files /dev/null and b/examples/assets/maps/mario1.png differ diff --git a/examples/mario.php b/examples/mario.php new file mode 100644 index 000000000..6205bd1c2 --- /dev/null +++ b/examples/mario.php @@ -0,0 +1,78 @@ + + +
+