From b3950330e3351437f153c6c1debb3821d6e28864 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 8 Dec 2018 12:39:18 +0100 Subject: Create Electron app --- static/resources/entity/green_circle.json | 3 + static/resources/entity/red_circle.json | 10 +++ static/resources/entity/red_ellipse.json | 3 + static/resources/entity/square.json | 23 ++++++ static/resources/entity/water.json | 12 +++ static/resources/map/test.json | 84 +++++++++++++++++++++ static/resources/sprite/entity/green_circle.png | Bin 0 -> 1776 bytes static/resources/sprite/entity/red_circle.png | Bin 0 -> 1844 bytes static/resources/sprite/entity/red_ellipse.png | Bin 0 -> 1700 bytes static/resources/sprite/entity/simple_square.png | Bin 0 -> 155 bytes static/resources/sprite/entity/square.png | Bin 0 -> 528 bytes static/resources/sprite/entity/water.png | Bin 0 -> 1718 bytes static/resources/sprite/tile/dirt.png | Bin 0 -> 1035 bytes static/resources/sprite/tile/grass.png | Bin 0 -> 1296 bytes static/resources/sprite/tile/road_left.png | Bin 0 -> 1391 bytes static/resources/sprite/tile/road_right.png | Bin 0 -> 1387 bytes .../sprite/tile/stone/border/bottom_left.png | Bin 0 -> 930 bytes .../sprite/tile/stone/border/bottom_right.png | Bin 0 -> 927 bytes static/resources/sprite/tile/stone/floor.png | Bin 0 -> 765 bytes static/resources/sprite/tile/stone/plate.png | Bin 0 -> 1443 bytes static/resources/sprite/tile/stone/wall/bottom.png | Bin 0 -> 1399 bytes .../sprite/tile/stone/wall/bottom_left.png | Bin 0 -> 1643 bytes .../sprite/tile/stone/wall/bottom_left_inner.png | Bin 0 -> 1458 bytes .../sprite/tile/stone/wall/bottom_right.png | Bin 0 -> 1676 bytes .../sprite/tile/stone/wall/bottom_right_inner.png | Bin 0 -> 1478 bytes static/resources/sprite/tile/stone/wall/left.png | Bin 0 -> 1505 bytes static/resources/sprite/tile/stone/wall/right.png | Bin 0 -> 1498 bytes static/resources/sprite/tile/stone/wall/top.png | Bin 0 -> 1374 bytes .../resources/sprite/tile/stone/wall/top_left.png | Bin 0 -> 1680 bytes .../sprite/tile/stone/wall/top_left_inner.png | Bin 0 -> 1459 bytes .../resources/sprite/tile/stone/wall/top_right.png | Bin 0 -> 1640 bytes .../sprite/tile/stone/wall/top_right_inner.png | Bin 0 -> 1459 bytes 32 files changed, 135 insertions(+) create mode 100644 static/resources/entity/green_circle.json create mode 100644 static/resources/entity/red_circle.json create mode 100644 static/resources/entity/red_ellipse.json create mode 100644 static/resources/entity/square.json create mode 100644 static/resources/entity/water.json create mode 100644 static/resources/map/test.json create mode 100644 static/resources/sprite/entity/green_circle.png create mode 100644 static/resources/sprite/entity/red_circle.png create mode 100644 static/resources/sprite/entity/red_ellipse.png create mode 100644 static/resources/sprite/entity/simple_square.png create mode 100644 static/resources/sprite/entity/square.png create mode 100644 static/resources/sprite/entity/water.png create mode 100644 static/resources/sprite/tile/dirt.png create mode 100644 static/resources/sprite/tile/grass.png create mode 100644 static/resources/sprite/tile/road_left.png create mode 100644 static/resources/sprite/tile/road_right.png create mode 100644 static/resources/sprite/tile/stone/border/bottom_left.png create mode 100644 static/resources/sprite/tile/stone/border/bottom_right.png create mode 100644 static/resources/sprite/tile/stone/floor.png create mode 100644 static/resources/sprite/tile/stone/plate.png create mode 100644 static/resources/sprite/tile/stone/wall/bottom.png create mode 100644 static/resources/sprite/tile/stone/wall/bottom_left.png create mode 100644 static/resources/sprite/tile/stone/wall/bottom_left_inner.png create mode 100644 static/resources/sprite/tile/stone/wall/bottom_right.png create mode 100644 static/resources/sprite/tile/stone/wall/bottom_right_inner.png create mode 100644 static/resources/sprite/tile/stone/wall/left.png create mode 100644 static/resources/sprite/tile/stone/wall/right.png create mode 100644 static/resources/sprite/tile/stone/wall/top.png create mode 100644 static/resources/sprite/tile/stone/wall/top_left.png create mode 100644 static/resources/sprite/tile/stone/wall/top_left_inner.png create mode 100644 static/resources/sprite/tile/stone/wall/top_right.png create mode 100644 static/resources/sprite/tile/stone/wall/top_right_inner.png (limited to 'static/resources') diff --git a/static/resources/entity/green_circle.json b/static/resources/entity/green_circle.json new file mode 100644 index 0000000..14952b2 --- /dev/null +++ b/static/resources/entity/green_circle.json @@ -0,0 +1,3 @@ +{ + "sprite": "green_circle" +} diff --git a/static/resources/entity/red_circle.json b/static/resources/entity/red_circle.json new file mode 100644 index 0000000..65af16a --- /dev/null +++ b/static/resources/entity/red_circle.json @@ -0,0 +1,10 @@ +{ + "sprite": "red_circle", + "collision": [ + { + "type": "circle", + "center": [0, 0], + "radius": 0.46875 + } + ] +} diff --git a/static/resources/entity/red_ellipse.json b/static/resources/entity/red_ellipse.json new file mode 100644 index 0000000..e8ce5e6 --- /dev/null +++ b/static/resources/entity/red_ellipse.json @@ -0,0 +1,3 @@ +{ + "sprite": "red_ellipse" +} diff --git a/static/resources/entity/square.json b/static/resources/entity/square.json new file mode 100644 index 0000000..643cfb6 --- /dev/null +++ b/static/resources/entity/square.json @@ -0,0 +1,23 @@ +{ + "sprite": "square", + "collision": [ + { + "type": "polygon", + "vertices": [ + [-0.46875, -0.46875], + [-0.46875, 0.46875], + [0.46875, 0.46875], + [0.46875, -0.46875] + ] + } + ], + "frames": 4, + "animation": { + "sequence": [ + [500, 0], + [500, 1], + [500, 2], + [500, 3] + ] + } +} diff --git a/static/resources/entity/water.json b/static/resources/entity/water.json new file mode 100644 index 0000000..79c7780 --- /dev/null +++ b/static/resources/entity/water.json @@ -0,0 +1,12 @@ +{ + "sprite": "water", + "frames": 4, + "animation": { + "sequence": [ + [500, 0], + [500, 1], + [500, 2], + [500, 3] + ] + } +} diff --git a/static/resources/map/test.json b/static/resources/map/test.json new file mode 100644 index 0000000..91efc19 --- /dev/null +++ b/static/resources/map/test.json @@ -0,0 +1,84 @@ +{ + "tiles": [ + "-stone/floor", + "-stone/plate", + "-stone/wall/top", + "-stone/wall/right", + "-stone/wall/bottom", + "-stone/wall/left", + "-stone/wall/top_left", + "-stone/wall/top_right", + "-stone/wall/bottom_right", + "-stone/wall/bottom_left", + "-stone/wall/top_left_inner", + "-stone/wall/top_right_inner", + "-stone/wall/bottom_right_inner", + "-stone/wall/bottom_left_inner", + "@water", + "-stone/border/bottom_right", + "-stone/border/bottom_left" + ], + "layers": [ + { + "tiles": [ + [0, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 0], + [0, 6, 1, 1, 1, 1, 15, 15, 1, 1, 1, 1, 4, 0], + [0, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0], + [0, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0], + [3, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 3], + [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + [5, 14, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 5], + [0, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0], + [0, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0], + [0, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0], + [0, 10, 5, 5, 5, 14, 1, 1, 13, 5, 5, 5, 9, 0], + [0, 0, 0, 0, 0, 6, 1, 1, 4, 0, 0, 0, 0, 0] + ] + }, + { + "tiles": [ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 17, 16, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], + [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], + [0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0] + ] + } + ], + "collision": [ + { + "type": "polygon", + "vertices": [ + [ 2, 1], + [ 6, 1], + [ 6, 2], + [ 8, 2], + [ 8, 1], + [12, 1], + [12, 5], + [14, 5], + [14, 7], + [12, 7], + [12, 11], + [ 8, 11], + [ 8, 13], + [ 6, 13], + [ 6, 11], + [ 2, 11], + [ 2, 7], + [ 0, 7], + [ 0, 5], + [ 2, 5] + ] + } + ] +} diff --git a/static/resources/sprite/entity/green_circle.png b/static/resources/sprite/entity/green_circle.png new file mode 100644 index 0000000..71cdadb Binary files /dev/null and b/static/resources/sprite/entity/green_circle.png differ diff --git a/static/resources/sprite/entity/red_circle.png b/static/resources/sprite/entity/red_circle.png new file mode 100644 index 0000000..1bdf36c Binary files /dev/null and b/static/resources/sprite/entity/red_circle.png differ diff --git a/static/resources/sprite/entity/red_ellipse.png b/static/resources/sprite/entity/red_ellipse.png new file mode 100644 index 0000000..9acf873 Binary files /dev/null and b/static/resources/sprite/entity/red_ellipse.png differ diff --git a/static/resources/sprite/entity/simple_square.png b/static/resources/sprite/entity/simple_square.png new file mode 100644 index 0000000..7c427cc Binary files /dev/null and b/static/resources/sprite/entity/simple_square.png differ diff --git a/static/resources/sprite/entity/square.png b/static/resources/sprite/entity/square.png new file mode 100644 index 0000000..9fcb9f9 Binary files /dev/null and b/static/resources/sprite/entity/square.png differ diff --git a/static/resources/sprite/entity/water.png b/static/resources/sprite/entity/water.png new file mode 100644 index 0000000..61c2d4f Binary files /dev/null and b/static/resources/sprite/entity/water.png differ diff --git a/static/resources/sprite/tile/dirt.png b/static/resources/sprite/tile/dirt.png new file mode 100644 index 0000000..5961666 Binary files /dev/null and b/static/resources/sprite/tile/dirt.png differ diff --git a/static/resources/sprite/tile/grass.png b/static/resources/sprite/tile/grass.png new file mode 100644 index 0000000..7835867 Binary files /dev/null and b/static/resources/sprite/tile/grass.png differ diff --git a/static/resources/sprite/tile/road_left.png b/static/resources/sprite/tile/road_left.png new file mode 100644 index 0000000..3e81507 Binary files /dev/null and b/static/resources/sprite/tile/road_left.png differ diff --git a/static/resources/sprite/tile/road_right.png b/static/resources/sprite/tile/road_right.png new file mode 100644 index 0000000..30bb2a2 Binary files /dev/null and b/static/resources/sprite/tile/road_right.png differ diff --git a/static/resources/sprite/tile/stone/border/bottom_left.png b/static/resources/sprite/tile/stone/border/bottom_left.png new file mode 100644 index 0000000..ed9be55 Binary files /dev/null and b/static/resources/sprite/tile/stone/border/bottom_left.png differ diff --git a/static/resources/sprite/tile/stone/border/bottom_right.png b/static/resources/sprite/tile/stone/border/bottom_right.png new file mode 100644 index 0000000..71782d2 Binary files /dev/null and b/static/resources/sprite/tile/stone/border/bottom_right.png differ diff --git a/static/resources/sprite/tile/stone/floor.png b/static/resources/sprite/tile/stone/floor.png new file mode 100644 index 0000000..f6ebb94 Binary files /dev/null and b/static/resources/sprite/tile/stone/floor.png differ diff --git a/static/resources/sprite/tile/stone/plate.png b/static/resources/sprite/tile/stone/plate.png new file mode 100644 index 0000000..fb8d405 Binary files /dev/null and b/static/resources/sprite/tile/stone/plate.png differ diff --git a/static/resources/sprite/tile/stone/wall/bottom.png b/static/resources/sprite/tile/stone/wall/bottom.png new file mode 100644 index 0000000..13d0928 Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/bottom.png differ diff --git a/static/resources/sprite/tile/stone/wall/bottom_left.png b/static/resources/sprite/tile/stone/wall/bottom_left.png new file mode 100644 index 0000000..861565a Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/bottom_left.png differ diff --git a/static/resources/sprite/tile/stone/wall/bottom_left_inner.png b/static/resources/sprite/tile/stone/wall/bottom_left_inner.png new file mode 100644 index 0000000..348821c Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/bottom_left_inner.png differ diff --git a/static/resources/sprite/tile/stone/wall/bottom_right.png b/static/resources/sprite/tile/stone/wall/bottom_right.png new file mode 100644 index 0000000..4290010 Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/bottom_right.png differ diff --git a/static/resources/sprite/tile/stone/wall/bottom_right_inner.png b/static/resources/sprite/tile/stone/wall/bottom_right_inner.png new file mode 100644 index 0000000..2c235ea Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/bottom_right_inner.png differ diff --git a/static/resources/sprite/tile/stone/wall/left.png b/static/resources/sprite/tile/stone/wall/left.png new file mode 100644 index 0000000..a7791ec Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/left.png differ diff --git a/static/resources/sprite/tile/stone/wall/right.png b/static/resources/sprite/tile/stone/wall/right.png new file mode 100644 index 0000000..5f78ced Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/right.png differ diff --git a/static/resources/sprite/tile/stone/wall/top.png b/static/resources/sprite/tile/stone/wall/top.png new file mode 100644 index 0000000..6ecad42 Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/top.png differ diff --git a/static/resources/sprite/tile/stone/wall/top_left.png b/static/resources/sprite/tile/stone/wall/top_left.png new file mode 100644 index 0000000..3a0c4fa Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/top_left.png differ diff --git a/static/resources/sprite/tile/stone/wall/top_left_inner.png b/static/resources/sprite/tile/stone/wall/top_left_inner.png new file mode 100644 index 0000000..60d4b68 Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/top_left_inner.png differ diff --git a/static/resources/sprite/tile/stone/wall/top_right.png b/static/resources/sprite/tile/stone/wall/top_right.png new file mode 100644 index 0000000..9d06f10 Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/top_right.png differ diff --git a/static/resources/sprite/tile/stone/wall/top_right_inner.png b/static/resources/sprite/tile/stone/wall/top_right_inner.png new file mode 100644 index 0000000..20cb074 Binary files /dev/null and b/static/resources/sprite/tile/stone/wall/top_right_inner.png differ -- cgit v1.2.3