diff --git a/asset_credits.md b/asset_credits.md index 9bffe69c..404d4bb8 100644 --- a/asset_credits.md +++ b/asset_credits.md @@ -26,3 +26,6 @@ https://marceles.itch.io/land-of-pixels-laboratory-tileset-pixel-art https://pipoya.itch.io/charamel | Create awesome Characters https://adriccustoms.itch.io/little-bits-office + +https://opengameart.org/content/lpc-forest-tiles +By users Sharm, Hyptosis, Johann C, Beast, William. Thompsonj, & Reemax | Assets made by Lanea Zimmerman, Tuomo Untinen, Manuel Riecke \ No newline at end of file diff --git a/public/exports/maps/map_forest.png b/public/exports/maps/map_forest.png new file mode 100644 index 00000000..7446f588 Binary files /dev/null and b/public/exports/maps/map_forest.png differ diff --git a/public/forest_sprites.png b/public/forest_sprites.png new file mode 100644 index 00000000..1d3552be Binary files /dev/null and b/public/forest_sprites.png differ diff --git a/public/maps/map_forest.json b/public/maps/map_forest.json new file mode 100644 index 00000000..28088ed9 --- /dev/null +++ b/public/maps/map_forest.json @@ -0,0 +1,870 @@ +{ "compressionlevel":-1, + "height":20, + "infinite":false, + "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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1, 1, 1, 1, 1, 1, 295, 296, 296, 296, 297, 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], + "height":20, + "id":1, + "name":"ground", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":30, + "x":0, + "y":0 + }, + { + "data":[371, 355, 356, 355, 356, 354, 196, 0, 0, 0, 353, 355, 356, 355, 356, 355, 356, 355, 356, 355, 356, 354, 0, 193, 194, 197, 198, 353, 355, 356, + 355, 371, 372, 371, 372, 370, 0, 0, 0, 0, 369, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 370, 0, 209, 210, 213, 214, 369, 371, 372, + 371, 372, 370, 369, 370, 227, 228, 0, 0, 0, 0, 369, 356, 355, 356, 355, 356, 355, 356, 355, 370, 0, 0, 225, 226, 229, 230, 353, 355, 356, + 355, 356, 354, 241, 242, 243, 244, 0, 0, 0, 0, 0, 369, 371, 372, 371, 372, 371, 372, 370, 0, 0, 0, 241, 242, 245, 246, 369, 371, 372, + 371, 372, 370, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, 370, 369, 370, 369, 370, 0, 0, 0, 0, 193, 194, 197, 198, 353, 355, 356, + 355, 356, 354, 0, 373, 374, 375, 385, 386, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 385, 386, 214, 369, 371, 372, + 371, 372, 370, 0, 389, 390, 391, 401, 402, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 401, 402, 230, 353, 355, 356, + 355, 356, 354, 0, 389, 412, 426, 374, 374, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 242, 245, 246, 369, 371, 372, + 371, 372, 370, 0, 389, 393, 390, 393, 412, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 385, 386, 0, 193, 194, 197, 198, 353, 355, 356, + 355, 356, 354, 0, 389, 390, 412, 390, 412, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 401, 402, 0, 209, 210, 213, 214, 369, 371, 372, + 371, 372, 370, 0, 389, 412, 390, 393, 412, 391, 0, 0, 385, 386, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 226, 229, 230, 353, 355, 356, + 355, 356, 354, 0, 389, 393, 393, 412, 412, 391, 0, 0, 401, 402, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 242, 245, 246, 369, 371, 372, + 371, 372, 370, 0, 389, 412, 412, 393, 412, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 193, 194, 197, 198, 353, 355, 356, + 355, 356, 354, 0, 405, 406, 406, 406, 406, 407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 210, 213, 214, 369, 371, 372, + 371, 372, 370, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 385, 386, 0, 0, 0, 0, 0, 0, 225, 226, 229, 230, 353, 355, 356, + 355, 356, 354, 247, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 401, 402, 0, 0, 0, 0, 0, 0, 241, 242, 245, 246, 369, 371, 372, + 371, 372, 370, 199, 200, 195, 196, 0, 0, 0, 0, 193, 194, 195, 0, 0, 194, 195, 0, 0, 194, 195, 0, 0, 194, 197, 198, 353, 355, 356, + 355, 356, 354, 353, 354, 211, 212, 0, 0, 0, 0, 209, 353, 354, 353, 354, 353, 354, 353, 354, 353, 354, 353, 354, 353, 354, 214, 369, 371, 372, + 371, 355, 356, 355, 356, 354, 228, 0, 0, 0, 0, 353, 355, 356, 355, 356, 355, 356, 355, 356, 355, 356, 355, 356, 355, 356, 354, 353, 355, 356, + 355, 371, 372, 371, 372, 370, 244, 0, 0, 0, 0, 369, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372, 371, 372], + "height":20, + "id":9, + "name":"trees", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":30, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 304, 271, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, 319, 320, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0], + "height":20, + "id":10, + "name":"buildings", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":30, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 314, 315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, 0, 308, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 310, 0, 0, 0, 0, 276, 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, 0, 0, 0, 0, 0, 0, 310, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 285, 0, 0, 0, 285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":20, + "id":11, + "name":"objects", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":30, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":2, + "name":"enter_new_map_boundaries", + "objects":[ + { + "height":8, + "id":68, + "name":"enter_map_topleft", + "rotation":0, + "type":"", + "visible":true, + "width":64, + "x":96, + "y":0 + }, + { + "height":8, + "id":69, + "name":"enter_map_topright", + "rotation":0, + "type":"", + "visible":true, + "width":80, + "x":352, + "y":0 + }, + { + "height":8, + "id":70, + "name":"enter_map_bottom", + "rotation":0, + "type":"", + "visible":true, + "width":80, + "x":96, + "y":312 + }], + "opacity":1, + "properties":[ + { + "name":"goToDifferentMap", + "type":"bool", + "value":true + }, + { + "name":"isStatic", + "type":"bool", + "value":false + }], + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":3, + "name":"map_boundaries", + "objects":[ + { + "height":8, + "id":37, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":96.031746031746, + "x":80.1587301587302, + "y":0 + }, + { + "height":8, + "id":38, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":111.904761904762, + "x":336.111111111111, + "y":0 + }, + { + "height":8, + "id":39, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":110, + "x":80.1587301587302, + "y":312 + }, + { + "height":104, + "id":93, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":148, + "y":116 + }, + { + "height":8, + "id":94, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":88, + "x":68, + "y":210 + }, + { + "height":136, + "id":95, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":68, + "y":84 + }, + { + "height":8, + "id":96, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":40, + "x":68, + "y":84 + }, + { + "height":40, + "id":97, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":100, + "y":84 + }, + { + "height":8, + "id":98, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":56, + "x":100, + "y":116 + }, + { + "height":72, + "id":99, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":340, + "y":196 + }, + { + "height":8, + "id":100, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":72, + "x":340, + "y":260 + }, + { + "height":72, + "id":101, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":404, + "y":196 + }, + { + "height":8, + "id":102, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":72, + "x":340, + "y":194 + }, + { + "height":24, + "id":104, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":24, + "x":84, + "y":68 + }], + "opacity":1, + "properties":[ + { + "name":"isStatic", + "type":"bool", + "value":true + }], + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":4, + "name":"building_boundaries", + "objects":[ + { + "height":320, + "id":72, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":40, + "x":0, + "y":0 + }, + { + "height":36, + "id":73, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":48, + "x":40, + "y":0 + }, + { + "height":24, + "id":74, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":176, + "x":168, + "y":0 + }, + { + "height":8, + "id":75, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":160, + "x":176, + "y":24 + }, + { + "height":8, + "id":76, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":128, + "x":192, + "y":36 + }, + { + "height":16, + "id":77, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":92, + "x":210, + "y":48 + }, + { + "height":16, + "id":78, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":120, + "y":88 + }, + { + "height":16, + "id":79, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":200, + "y":168 + }, + { + "height":16, + "id":80, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":248, + "y":232 + }, + { + "height":16, + "id":81, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":328, + "y":136 + }, + { + "height":16, + "id":82, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":392, + "y":88 + }, + { + "height":320, + "id":84, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":40, + "x":440, + "y":0 + }, + { + "height":56, + "id":85, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":416, + "y":264 + }, + { + "height":40, + "id":86, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":232, + "x":184, + "y":280 + }, + { + "height":72, + "id":90, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":56, + "x":0, + "y":248 + }, + { + "height":28, + "id":91, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":40, + "x":48, + "y":292 + }, + { + "height":16, + "id":92, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":56, + "y":280 + }, + { + "height":8, + "id":105, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":24, + "x":168, + "y":308 + }, + { + "height":8, + "id":106, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":32, + "x":72, + "y":308 + }, + { + "height":4, + "id":107, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":4, + "x":422, + "y":246 + }, + { + "height":4, + "id":108, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":4, + "x":70, + "y":246 + }, + { + "height":4, + "id":109, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":4, + "x":230, + "y":86 + }, + { + "height":4, + "id":110, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":4, + "x":54, + "y":166 + }, + { + "height":4, + "id":111, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":4, + "x":422, + "y":466 + }], + "opacity":1, + "properties":[ + { + "name":"isStatic", + "type":"bool", + "value":true + }], + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":5, + "name":"interaction_objects", + "objects":[ + { + "height":72, + "id":32, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":72, + "x":340, + "y":196 + }, + { + "height":24, + "id":33, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":24, + "x":324, + "y":132 + }, + { + "height":8, + "id":34, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":228, + "y":100 + }, + { + "height":24, + "id":35, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":276, + "y":84 + }, + { + "height":24, + "id":36, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":24, + "x":244, + "y":84 + }, + { + "height":8, + "id":112, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":52, + "y":164 + }, + { + "height":8, + "id":113, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":68, + "y":244 + }, + { + "height":8, + "id":114, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":228, + "y":84 + }, + { + "height":8, + "id":115, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":24, + "x":84, + "y":68 + }, + { + "height":8, + "id":116, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":420, + "y":164 + }, + { + "height":8, + "id":117, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":420, + "y":244 + }], + "opacity":1, + "properties":[ + { + "name":"isStatic", + "type":"bool", + "value":true + }], + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":6, + "name":"spawnpoints", + "objects":[ + { + "height":0, + "id":67, + "name":"player", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":112, + "y":288 + }, + { + "height":0, + "id":103, + "name":"butterfly_a_2", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":288, + "y":176 + }, + { + "height":0, + "id":118, + "name":"butterfly_b_2", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":176, + "y":224 + }, + { + "height":0, + "id":119, + "name":"butterfly_a_1", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":400, + "y":160 + }, + { + "height":0, + "id":120, + "name":"butterfly_b_1", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":176, + "y":112 + }], + "opacity":1, + "properties":[ + { + "name":"isStatic", + "type":"bool", + "value":false + }], + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }], + "nextlayerid":12, + "nextobjectid":121, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.11.0", + "tileheight":16, + "tilesets":[ + { + "firstgid":1, + "source":"..\/..\/..\/..\/..\/Tiled\/forest_tiles.tsx" + }, + { + "firstgid":257, + "source":"..\/..\/..\/..\/..\/Tiled\/forest_tiles.tsx" + }], + "tilewidth":16, + "type":"map", + "version":"1.10", + "width":30 +} \ No newline at end of file diff --git a/public/maps/map_start.json b/public/maps/map_start.json index f4191944..5f6060cc 100644 --- a/public/maps/map_start.json +++ b/public/maps/map_start.json @@ -1674,7 +1674,7 @@ "orientation":"orthogonal", "renderorder":"right-down", "tiledversion":"1.11.0", - "tileheight":16, + "tileheight":16, "tilesets":[ { "columns":19, diff --git a/src/gameObjects/map_forest/butterfly.gameObject.js b/src/gameObjects/map_forest/butterfly.gameObject.js new file mode 100644 index 00000000..2fdfd082 --- /dev/null +++ b/src/gameObjects/map_forest/butterfly.gameObject.js @@ -0,0 +1,27 @@ +import { scaleFactor } from '../../constants'; + +export const butterfly = (k, map, spawnpoints) => { + k.loadSprite('butterfly', './forest_sprites.png', { + sliceX: 16, + sliceY: 16, + anims: { + 'walk-side': { from: 89, to: 91, loop: true, speed: 4 }, + 'idle-side': 90, + }, + }); + + return k.make([ + k.sprite('butterfly', { anim: 'idle-side' }), + k.area({ + shape: new k.Rect(k.vec2(0), 16,16), + }), + k.body({ isStatic: true }), + k.anchor('center'), + k.pos( + map.pos.x + spawnpoints.butterfly_a_1.x, + map.pos.y + spawnpoints.butterfly_a_1.y + ), + k.scale(scaleFactor + 0.5), + 'butterfly', + ]); +}; diff --git a/src/gameObjects/map_forest/index.js b/src/gameObjects/map_forest/index.js new file mode 100644 index 00000000..8f4bba73 --- /dev/null +++ b/src/gameObjects/map_forest/index.js @@ -0,0 +1,18 @@ +import { butterfly } from "./butterfly.gameObject"; + +const gameObjects = [butterfly]; + +export const addGameObjects = (k, map, spawnpoints) => { + return gameObjects.reduce((gameObjAcc, cb) => { + const temp = cb(k, map, spawnpoints); + + if (Array.isArray(temp)) { + gameObjAcc.push(...temp); + return gameObjAcc; + } + + gameObjAcc.push(temp); + + return gameObjAcc; + }, []); +}; diff --git a/src/interactions/map_city/enterMapForest.interactions.js b/src/interactions/map_city/enterMapForest.interactions.js new file mode 100644 index 00000000..85be857a --- /dev/null +++ b/src/interactions/map_city/enterMapForest.interactions.js @@ -0,0 +1,7 @@ +export const enterMapForestInteraction = (player, k, map) => { + player.onCollide('enter_map_top', () => { + import('../../scenes/forest').then((_) => { + k.go('forest', 'enter_forest'); + }); + }); +}; diff --git a/src/interactions/map_city/index.js b/src/interactions/map_city/index.js index 50a17181..e362915e 100644 --- a/src/interactions/map_city/index.js +++ b/src/interactions/map_city/index.js @@ -1,6 +1,7 @@ import { boundaryArcadeInteraction } from './boundaryArcade.interaction'; import { boundaryBurgerBarInteraction } from './boundaryBurgerBar.interaction'; import { enterMapArcadeInteraction } from './enterMapArcade.interactions'; +import { enterMapForestInteraction } from './enterMapForest.interactions'; import { enterMapStartInteraction } from './enterMapStart.interaction'; import { snackBarRedInteraction, @@ -12,6 +13,7 @@ import { stall1Interaction, stall2Interaction } from './stalls.interaction'; const interactions = [ enterMapArcadeInteraction, enterMapStartInteraction, + enterMapForestInteraction, boundaryBurgerBarInteraction, boundaryArcadeInteraction, snackBarRedInteraction, diff --git a/src/interactions/map_forest/index.js b/src/interactions/map_forest/index.js new file mode 100644 index 00000000..28920b10 --- /dev/null +++ b/src/interactions/map_forest/index.js @@ -0,0 +1,9 @@ +const interactions = [ + // Add more interactions here +]; + +export const attachInteractions = (gameObj, k) => { + const map = k.get('main_map')[0]; + + interactions.forEach((cb) => cb(gameObj, k, map)); +}; diff --git a/src/scenes/forest.js b/src/scenes/forest.js new file mode 100644 index 00000000..202f2606 --- /dev/null +++ b/src/scenes/forest.js @@ -0,0 +1,40 @@ +import { makePlayer } from '../factories/player.factory'; +import { initMap } from '../init/map.init'; +import { k } from '../kplayCtx'; +import { attachInteractions } from '../interactions/map_forest'; +import { addGameObjects } from '../gameObjects/map_forest'; +import { addPlayerControls } from '../player.controls'; +import { getGameState } from '../utils/gameState'; + +k.scene('forest', async (enter_tag) => { + const objectConfig = { + static: [ + 'map_boundaries', + 'building_boundaries', + 'enter_new_map_boundaries', + ], + spawnpoints: ['spawnpoints'], + interactionObjects: ['interaction_objects'], + }; + const [map, spawnpoint] = await initMap( + k, + objectConfig, + './exports/maps/map_forest.png', + './maps/map_forest.json', + k.vec2(0, 11) + ); + + const gameState = getGameState(); + const player = makePlayer(gameState.player); + + player.pos = (enter_tag && spawnpoint[enter_tag]) || spawnpoint.player; + + k.add(map); + k.add(player); + k.canvas.focus(); + + addGameObjects(k, map, spawnpoint).forEach((obj) => k.add(obj)); + attachInteractions(player, k); + + addPlayerControls(k, player); +});