diff --git a/asset/image/TankManObj_new.png b/asset/image/TankManObj_new.png new file mode 100644 index 0000000..626fcb1 Binary files /dev/null and b/asset/image/TankManObj_new.png differ diff --git a/asset/image/wall_unbreak.png b/asset/image/wall_unbreak.png new file mode 100644 index 0000000..cf9ca43 Binary files /dev/null and b/asset/image/wall_unbreak.png differ diff --git a/asset/maps/map_1_v_1.tmx b/asset/maps/map_1_v_1.tmx index 0d83e0e..74fb28c 100644 --- a/asset/maps/map_1_v_1.tmx +++ b/asset/maps/map_1_v_1.tmx @@ -1,33 +1,33 @@ - - + + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -3,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, -3,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, -3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,4,0,0,5,0,0,0,0,0,0,6,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,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3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 - + - \ No newline at end of file diff --git a/asset/maps/oldMap/map.tmx b/asset/maps/oldMap/map.tmx new file mode 100644 index 0000000..3d377de --- /dev/null +++ b/asset/maps/oldMap/map.tmx @@ -0,0 +1,25 @@ + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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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3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_00.tmx b/asset/maps/oldMap/map_00.tmx new file mode 100644 index 0000000..2a17a81 --- /dev/null +++ b/asset/maps/oldMap/map_00.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3, +3,2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,3, +3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_01.tmx b/asset/maps/oldMap/map_01.tmx new file mode 100644 index 0000000..0a628cc --- /dev/null +++ b/asset/maps/oldMap/map_01.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,5,0,0,0,0,3,3,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,2,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,1,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,3,3,0,0,0,0,5,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_011.tmx b/asset/maps/oldMap/map_011.tmx new file mode 100644 index 0000000..9539afd --- /dev/null +++ b/asset/maps/oldMap/map_011.tmx @@ -0,0 +1,22 @@ + + + + + + + +5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, +0,3,3,3,0,0,3,0,0,3,3,3,0,0,3,0,0,3,3,0, +0,3,0,3,0,3,0,3,0,0,3,0,0,3,0,3,0,3,3,0, +0,3,3,3,0,3,3,3,0,0,3,0,0,3,3,3,0,0,0,0, +0,3,0,0,0,3,0,3,0,3,3,3,0,3,0,3,0,3,3,0, +0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,1,0, +0,2,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0, +0,3,3,0,3,0,3,0,3,3,3,0,3,0,3,0,0,0,3,0, +0,0,0,0,3,3,3,0,0,3,0,0,3,3,3,0,3,3,3,0, +0,3,3,0,3,0,3,0,0,3,0,0,3,0,3,0,3,0,3,0, +0,3,3,0,0,3,0,0,3,3,3,0,0,3,0,0,3,3,3,0, +5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5 + + + diff --git a/asset/maps/oldMap/map_012.tmx b/asset/maps/oldMap/map_012.tmx new file mode 100644 index 0000000..bc25464 --- /dev/null +++ b/asset/maps/oldMap/map_012.tmx @@ -0,0 +1,22 @@ + + + + + + + +4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, +0,3,3,3,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0, +0,3,5,3,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0, +0,3,3,3,0,0,0,0,0,0,3,0,0,0,3,0,0,1,0,0, +0,3,0,0,0,0,0,0,0,0,3,5,3,0,3,0,0,0,0,0, +0,3,0,0,0,0,0,0,0,0,0,3,0,3,0,0,0,0,0,0, +0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,3,0,0, +0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3,5,3,0, +0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3,0,3,0, +0,0,2,0,0,0,3,0,0,0,0,0,0,0,0,0,3,3,3,0, +0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3,0,3,0, +4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4 + + + diff --git a/asset/maps/oldMap/map_013.tmx b/asset/maps/oldMap/map_013.tmx new file mode 100644 index 0000000..3636bae --- /dev/null +++ b/asset/maps/oldMap/map_013.tmx @@ -0,0 +1,22 @@ + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,3,3,0,3,3,0,0,0,0,1,0,0, +0,0,0,3,0,0,0,3,3,3,3,3,3,3,0,0,3,3,3,0, +0,0,3,0,3,0,0,3,3,3,3,3,3,3,0,0,4,3,0,0, +0,3,0,0,0,3,0,0,3,3,3,3,3,0,0,0,0,3,0,0, +0,3,0,0,0,3,0,0,0,3,3,3,0,0,0,0,0,3,0,0, +0,3,3,3,3,3,0,0,0,0,3,0,0,0,0,0,0,3,0,0, +0,3,0,4,0,3,0,0,0,0,4,0,0,0,0,0,0,3,0,0, +0,3,0,0,0,3,0,0,0,0,5,0,0,0,0,0,3,3,3,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/asset/maps/oldMap/map_014.tmx b/asset/maps/oldMap/map_014.tmx new file mode 100644 index 0000000..722245f --- /dev/null +++ b/asset/maps/oldMap/map_014.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,3,3,3,0,0,0,0,0,3,3,3,3,3,0,3,3, +3,0,3,0,3,3,3,0,2,0,0,0,3,3,3,3,0,3,0,3, +3,0,0,0,3,3,3,0,0,0,0,0,3,3,3,3,0,0,0,3, +3,0,3,3,3,3,3,3,3,3,4,0,3,0,3,3,0,3,0,3, +3,3,3,3,3,3,5,0,0,0,0,0,3,0,3,3,3,3,3,3, +3,3,3,3,3,3,0,3,0,0,0,0,0,5,3,3,3,3,3,3, +3,3,0,0,0,3,0,3,0,4,3,3,3,3,3,3,0,3,3,3, +3,3,3,0,3,3,3,3,0,0,0,0,0,3,3,0,3,0,3,3, +3,3,3,0,3,3,3,3,0,0,0,1,0,3,3,0,0,0,3,3, +3,3,0,0,0,3,3,3,0,0,0,0,0,3,3,0,3,0,3,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_015.tmx b/asset/maps/oldMap/map_015.tmx new file mode 100644 index 0000000..78716c0 --- /dev/null +++ b/asset/maps/oldMap/map_015.tmx @@ -0,0 +1,22 @@ + + + + + + + +0,3,0,0,0,0,0,0,0,0,4,3,0,0,0,0,0,0,0,0, +0,3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0, +0,3,0,0,0,0,0,3,0,0,0,3,0,0,0,0,3,0,0,0, +0,3,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,0,0, +0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,3,0,1,3, +5,2,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,5, +0,0,0,0,0,3,0,0,0,3,0,0,0,0,3,0,0,0,0,0, +0,0,0,0,4,3,0,0,0,3,0,0,0,0,3,0,0,3,0,0, +0,0,0,0,0,0,0,0,4,3,0,0,0,0,3,0,0,3,0,0, +0,0,3,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3,0,0, +0,0,3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0 + + + diff --git a/asset/maps/oldMap/map_02.tmx b/asset/maps/oldMap/map_02.tmx new file mode 100644 index 0000000..adf2948 --- /dev/null +++ b/asset/maps/oldMap/map_02.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,5,4,0,0,0,3,3,0,0,0,5,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,1,0,0,3, +3,0,2,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,5,0,0,0,3,3,0,0,0,4,5,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_1_v_1.tmx b/asset/maps/oldMap/map_1_v_1.tmx new file mode 100644 index 0000000..e1683e0 --- /dev/null +++ b/asset/maps/oldMap/map_1_v_1.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,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,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_1_v_3.tmx b/asset/maps/oldMap/map_1_v_3.tmx new file mode 100644 index 0000000..bc119dc --- /dev/null +++ b/asset/maps/oldMap/map_1_v_3.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_1_v_4.tmx b/asset/maps/oldMap/map_1_v_4.tmx new file mode 100644 index 0000000..35fc93d --- /dev/null +++ b/asset/maps/oldMap/map_1_v_4.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_1_v_5.tmx b/asset/maps/oldMap/map_1_v_5.tmx new file mode 100644 index 0000000..fc830ae --- /dev/null +++ b/asset/maps/oldMap/map_1_v_5.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,2,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_2_v_1.tmx b/asset/maps/oldMap/map_2_v_1.tmx new file mode 100644 index 0000000..b7101b0 --- /dev/null +++ b/asset/maps/oldMap/map_2_v_1.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3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,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_2_v_3.tmx b/asset/maps/oldMap/map_2_v_3.tmx new file mode 100644 index 0000000..dba563b --- /dev/null +++ b/asset/maps/oldMap/map_2_v_3.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,2,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,1,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_2_v_4.tmx b/asset/maps/oldMap/map_2_v_4.tmx new file mode 100644 index 0000000..074a512 --- /dev/null +++ b/asset/maps/oldMap/map_2_v_4.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,2,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_3_v_1.tmx b/asset/maps/oldMap/map_3_v_1.tmx new file mode 100644 index 0000000..e172e17 --- /dev/null +++ b/asset/maps/oldMap/map_3_v_1.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_3_v_2.tmx b/asset/maps/oldMap/map_3_v_2.tmx new file mode 100644 index 0000000..3fe8591 --- /dev/null +++ b/asset/maps/oldMap/map_3_v_2.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,2,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,1,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_3_v_3.tmx b/asset/maps/oldMap/map_3_v_3.tmx new file mode 100644 index 0000000..731e859 --- /dev/null +++ b/asset/maps/oldMap/map_3_v_3.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,2,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,1,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_4_v_1.tmx b/asset/maps/oldMap/map_4_v_1.tmx new file mode 100644 index 0000000..77b8fc8 --- /dev/null +++ b/asset/maps/oldMap/map_4_v_1.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_4_v_2.tmx b/asset/maps/oldMap/map_4_v_2.tmx new file mode 100644 index 0000000..8935214 --- /dev/null +++ b/asset/maps/oldMap/map_4_v_2.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,1,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_5_v_1.tmx b/asset/maps/oldMap/map_5_v_1.tmx new file mode 100644 index 0000000..a3c1345 --- /dev/null +++ b/asset/maps/oldMap/map_5_v_1.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,5,0,0,0,3,0,0,0,0,0,4,0,0,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3, +3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,4,0,0,0,0,0,3,0,0,0,5,0,0,1,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,1,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/asset/maps/oldMap/map_test.tmx b/asset/maps/oldMap/map_test.tmx new file mode 100644 index 0000000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0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + + \ No newline at end of file diff --git a/asset/maps/oldMap/test_map_3_v_3.tmx b/asset/maps/oldMap/test_map_3_v_3.tmx new file mode 100644 index 0000000..23fe5f0 --- /dev/null +++ b/asset/maps/oldMap/test_map_3_v_3.tmx @@ -0,0 +1,22 @@ + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,2,3,0,3,3,0,3,2,3,1,3,0,3,0,3,0,3,1,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,0,3,0,3,5,3,3,0,3,3,0,3,0,3,4,3,3,0,3, +3,3,3,3,3,3,3,3,3,3,3,3,0,3,0,3,0,3,3,3, +3,0,3,0,3,0,3,0,3,3,0,3,3,3,3,3,3,3,0,3, +3,3,3,3,3,3,3,3,3,0,3,0,3,0,3,0,3,0,3,3, +3,0,3,0,3,0,3,0,3,3,3,3,3,3,3,3,3,3,3,3, +3,3,3,3,4,3,3,3,3,0,3,3,0,3,5,3,0,3,0,3, +3,3,3,3,3,3,3,0,3,3,3,3,3,3,3,3,3,3,3,3, +3,2,3,0,3,0,3,3,3,0,3,0,3,0,3,3,0,3,1,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 + + + diff --git a/src/Game.py b/src/Game.py index a4bc3d4..5ee0e48 100644 --- a/src/Game.py +++ b/src/Game.py @@ -7,7 +7,7 @@ from .TeamBattleMode import TeamBattleMode from .game_module.fuctions import get_sprites_progress_data -from .GenerateMap import MapGenerator +from .MapGenerator import MapGenerator GAME_DIR = path.dirname(__file__) MAP_DIR = path.join(GAME_DIR, "..", "asset", "maps") @@ -111,7 +111,7 @@ def set_game_mode(self): sound_path = "" if self.is_sound: sound_path = SOUND_DIR - map_width, map_height = MapGenerator(1, 1).getScreeenSize() + map_width, map_height = MapGenerator(1, 1, 40, 24).getScreeenSize() play_rect_area = pygame.Rect(0, 0, map_width, map_height-100) game_mode = TeamBattleMode(self.green_team_num, self.blue_team_num, self.is_manual, self.frame_limit, sound_path, play_rect_area) return game_mode diff --git a/src/GenerateMap.py b/src/MapGenerator.py similarity index 58% rename from src/GenerateMap.py rename to src/MapGenerator.py index 9950dd9..534d922 100644 --- a/src/GenerateMap.py +++ b/src/MapGenerator.py @@ -1,28 +1,39 @@ from os import path import random import math +# from .env import PLAYER_1_IMG_NO, PLAYER_2_IMG_NO, WALL_IMG_NO, BULLET_STATION_IMG_NO, OIL_STATION_IMG_NO, UNBREAK_WALL_IMG_NO + +"""map data numbers""" +PLAYER_1_IMG_NO = 1 +PLAYER_2_IMG_NO = 2 +WALL_IMG_NO = 3 +BULLET_STATION_IMG_NO = 4 +OIL_STATION_IMG_NO = 5 +UNBREAK_WALL_IMG_NO = 6 + PLAYER_NUM = 1 OIL_NUM = 2 BULLET_NUM = 2 +UNBREAK_WALL_NUM = 8 MAP_DIR = path.join(path.dirname(__file__), "..", "asset", 'maps') MAP_VERSION = "1.9" TILED_VERSION = "1.9.2" - +TILE_COUNT = 6 class MapGenerator: - def __init__(self, green_team_num : int, blue_team_num : int) -> None: + def __init__(self, green_team_num : int, blue_team_num : int, width : int, height : int) -> None: self.green_team_num = green_team_num self.blue_team_num = blue_team_num - # height should be a factor of 600 - # default is 20, 12 + #height should be a factor of 600 + #default is 20, 12 - self.width = 40 - self.height = 24 + self.width = width + self.height = height self.height_per_tile = math.floor(600/self.height) self.width_per_tile = self.height_per_tile @@ -30,18 +41,33 @@ def __init__(self, green_team_num : int, blue_team_num : int) -> None: self.screen_width = self.width * self.height_per_tile self.screen_height = 700 + def get_neighbour(self, x : int, y : int) -> list: + neighbour = [] + if x > 0: + neighbour.append((x-1, y)) + if x < self.width-1: + neighbour.append((x+1, y)) + if y > 0: + neighbour.append((x, y-1)) + if y < self.height-1: + neighbour.append((x, y+1)) + return neighbour + + def getTileSize(self) -> int: return self.height_per_tile def getScreeenSize(self) -> tuple: return self.screen_width, self.screen_height + def pos2index(self, x : int, y : int) -> int: return y * (self.width * 2 + 1) + x * 2 def mirrored_pos(self, x : int, y : int) -> tuple: return self.width - x - 1, self.height - y - 1 + def random_pos(self, map_arr) -> tuple: random_x, random_y = random.randint(1, self.width-2), random.randint(1, self.height-2) mir_x, mir_y = self.mirrored_pos(random_x, random_y) @@ -50,69 +76,90 @@ def random_pos(self, map_arr) -> tuple: mir_x, mir_y = self.mirrored_pos(random_x, random_y) return random_x, random_y + + def random_pos_no_neighbour(self, map_arr) -> tuple: + rand_x, rand_y = self.random_pos(map_arr) + while True: + neighbour = self.get_neighbour(rand_x, rand_y) + fail = False + for x, y in neighbour: + if map_arr[y][x] != 0: + fail = True + if fail: + rand_x, rand_y = self.random_pos(map_arr) + else: + break + return rand_x, rand_y def generate_map_str(self) -> str: - # generate default map[y][x] + #generate default map[y][x] map_arr = [[0 for _ in range(self.width)] for _ in range(self.height)] for x in range(self.width): - map_arr[0][x] = 3 - map_arr[self.height-1][x] = 3 + map_arr[0][x] = WALL_IMG_NO + map_arr[self.height-1][x] = WALL_IMG_NO for y in range(self.height): - map_arr[y][0] = 3 - map_arr[y][self.width-1] = 3 + map_arr[y][0] = WALL_IMG_NO + map_arr[y][self.width-1] = WALL_IMG_NO if self.width % 2 == 1: for y in range(1, self.height-1): - map_arr[y][self.width//2] = 3 + map_arr[y][self.width//2] = WALL_IMG_NO else: for y in range(1, self.height): if y < math.ceil(self.height/2): - map_arr[y][self.width//2-1] = 3 + map_arr[y][self.width//2-1] = WALL_IMG_NO else: - map_arr[y][self.width//2] = 3 + map_arr[y][self.width//2] = WALL_IMG_NO + + #add unbreakable wall + for _ in range(UNBREAK_WALL_NUM): + rand_x, rand_y = self.random_pos_no_neighbour(map_arr) + mir_x, mir_y = self.mirrored_pos(rand_x, rand_y) + map_arr[rand_y][rand_x] = UNBREAK_WALL_IMG_NO + map_arr[mir_y][mir_x] = UNBREAK_WALL_IMG_NO - # add player + #add player for _ in range(min(self.green_team_num, self.blue_team_num)): rand_x, rand_y = self.random_pos(map_arr) while rand_x < self.width // 2: rand_x, rand_y = self.random_pos(map_arr) mir_x, mir_y = self.mirrored_pos(rand_x, rand_y) - map_arr[rand_y][rand_x] = 1 - map_arr[mir_y][mir_x] = 2 + map_arr[rand_y][rand_x] = PLAYER_1_IMG_NO + map_arr[mir_y][mir_x] = PLAYER_2_IMG_NO - # add remaining green team + #add remaining green team for _ in range(self.green_team_num - self.blue_team_num): rand_x, rand_y = self.random_pos(map_arr) while rand_x < self.width // 2: rand_x, rand_y = self.random_pos(map_arr) - map_arr[rand_y][rand_x] = 1 + map_arr[rand_y][rand_x] = PLAYER_1_IMG_NO - # add remaining blue team + #add remaining blue team for _ in range(self.blue_team_num - self.green_team_num): rand_x, rand_y = self.random_pos(map_arr) while rand_x >= self.width // 2: rand_x, rand_y = self.random_pos(map_arr) - map_arr[rand_y][rand_x] = 2 + map_arr[rand_y][rand_x] = PLAYER_2_IMG_NO - # add bullet station + #add bullet station for _ in range(BULLET_NUM): rand_x, rand_y = self.random_pos(map_arr) mir_x, mir_y = self.mirrored_pos(rand_x, rand_y) - map_arr[rand_y][rand_x] = 4 - map_arr[mir_y][mir_x] = 4 + map_arr[rand_y][rand_x] = BULLET_STATION_IMG_NO + map_arr[mir_y][mir_x] = BULLET_STATION_IMG_NO - # add oil station + #add oil station for _ in range(OIL_NUM): rand_x, rand_y = self.random_pos(map_arr) mir_x, mir_y = self.mirrored_pos(rand_x, rand_y) - map_arr[rand_y][rand_x] = 5 - map_arr[mir_y][mir_x] = 5 + map_arr[rand_y][rand_x] = OIL_STATION_IMG_NO + map_arr[mir_y][mir_x] = OIL_STATION_IMG_NO map_str = "" @@ -129,13 +176,14 @@ def generate_map(self): map_path = path.join(MAP_DIR, map_name) print(f'generate map at : {map_path}', flush=True) + with open(map_path, "w") as file: - # file.write("test") + #write map file.write(f"""\ - - + + @@ -144,10 +192,9 @@ def generate_map(self): """) - - + if __name__ == "__main__": - map_generator = MapGenerator(1, 1) + map_generator = MapGenerator(1, 1, 20, 12) map_generator.generate_map() diff --git a/src/TeamBattleMode.py b/src/TeamBattleMode.py index 578942c..70297b4 100644 --- a/src/TeamBattleMode.py +++ b/src/TeamBattleMode.py @@ -18,7 +18,8 @@ from .collide_hit_rect import * from .env import * from .game_module.fuctions import set_topleft, add_score, set_shoot -from .GenerateMap import MapGenerator +from .MapGenerator import MapGenerator +from .Unbreakable_Wall import Unbreakable_Wall class TeamBattleMode: @@ -30,14 +31,18 @@ def __init__(self, green_team_num: int, blue_team_num: int, is_manual: bool, fra self.blue_team_num = blue_team_num if (6 - (green_team_num + blue_team_num)) >= 0 else (6 - green_team_num) self.map_name = f"map_{green_team_num}_v_{self.blue_team_num}.tmx" if not IS_DEBUG else f"test_map_{green_team_num}_v_{self.blue_team_num}.tmx" self.map_path = path.join(MAP_DIR, self.map_name) - self.map_generator = MapGenerator(self.green_team_num, self.blue_team_num) + self.map_generator = MapGenerator(self.green_team_num, self.blue_team_num, 40, 24) self.tileSize = self.map_generator.getTileSize() + self.size_multiplier = self.tileSize / 50 self.map_generator.generate_map() self.map = TiledMap(self.map_path) - self.scene_width, self.scene_height = self.map_generator.getScreeenSize() + # self.scene_width = self.map.map_width + self.scene_width, _ = self.map_generator.getScreeenSize() + self.scene_height = self.map.map_height + 100 self.width_center = self.scene_width // 2 self.height_center = self.scene_height // 2 self.play_rect_area = play_rect_area + self.play_rect_area.width = self.scene_width self.used_frame = 0 self.state = GameResultState.FAIL self.status = GameStatus.GAME_ALIVE @@ -59,6 +64,7 @@ def __init__(self, green_team_num: int, blue_team_num: int, is_manual: bool, fra self.all_players = pygame.sprite.Group() self.guns = pygame.sprite.Group() self.walls = pygame.sprite.Group() + self.unbreakable_walls = pygame.sprite.Group() self.bullets = pygame.sprite.Group() self.bullet_stations = pygame.sprite.Group() self.oil_stations = pygame.sprite.Group() @@ -72,6 +78,7 @@ def __init__(self, green_team_num: int, blue_team_num: int, is_manual: bool, fra self.map.add_init_obj_data(WALL_IMG_NO, Wall, margin=8, spacing=8) self.map.add_init_obj_data(BULLET_STATION_IMG_NO, Station, spawn_cd=30, margin=2, spacing=2, capacity=5, quadrant=1) self.map.add_init_obj_data(OIL_STATION_IMG_NO, Station, spawn_cd=30, margin=2, spacing=2, capacity=30, quadrant=1) + self.map.add_init_obj_data(UNBREAK_WALL_IMG_NO, Unbreakable_Wall, margin=8, spacing=8) # create obj all_obj = self.map.create_init_obj_dict() # init players @@ -91,6 +98,9 @@ def __init__(self, green_team_num: int, blue_team_num: int, is_manual: bool, fra # init walls self.walls.add(all_obj[WALL_IMG_NO]) self.all_sprites.add(*self.walls) + # init unbreakable walls + self.unbreakable_walls.add(all_obj[UNBREAK_WALL_IMG_NO]) + self.all_sprites.add(*self.unbreakable_walls) # init bullet stations self.bullet_stations.add(all_obj[BULLET_STATION_IMG_NO]) self.all_sprites.add(*self.bullet_stations) @@ -105,7 +115,7 @@ def __init__(self, green_team_num: int, blue_team_num: int, is_manual: bool, fra no = random.randrange(3) self.background.append( create_image_view_data(f"floor_{no}", pos[0], pos[1], self.tileSize, self.tileSize, 0)) - self.obj_list = [self.oil_stations, self.bullet_stations, self.bullets, self.all_players, self.guns, self.walls] + self.obj_list = [self.oil_stations, self.bullet_stations, self.bullets, self.all_players, self.guns, self.walls, self.unbreakable_walls] self.background.append(create_image_view_data("border", 0, -50, self.scene_width, WINDOW_HEIGHT, 0)) # self.background.append(create_image_view_data("border", 0, -self.tileSize, self.scene_width, self.scene_height, 0)) @@ -116,6 +126,7 @@ def update(self, command: dict): self.used_frame += 1 self.check_collisions() self.walls.update() + self.unbreakable_walls.update() self.create_bullet(self.all_players) self.bullets.update() self.bullet_stations.update() @@ -178,6 +189,8 @@ def get_player_result(self) -> list: def check_collisions(self): if not self.is_through_wall: collide_with_walls(self.all_players, self.walls) + collide_with_walls(self.all_players, self.unbreakable_walls) + if not self.is_invincible: player_score_data = collide_with_bullets(self.all_players, self.bullets, self.green_team_num) for player, score in player_score_data.items(): @@ -197,6 +210,7 @@ def check_collisions(self): # Update stations position self.change_obj_pos(supply_stations) + collide_with_bullets(self.unbreakable_walls, self.bullets) player_score_data = collide_with_bullets(self.walls, self.bullets) for player, score in player_score_data.items(): self.add_player_score(player, score) @@ -235,10 +249,11 @@ def create_bullet(self, sprites: pygame.sprite.Group): for sprite in sprites: if not sprite.is_shoot: continue - bullet_speed = 30 + bullet_speed = 30 * self.size_multiplier self.sound_controller.play_sound("shoot", 0.03, -1) - init_data = create_construction(sprite.id, sprite.no, sprite.rect.center, (BULLET_SIZE[0], BULLET_SIZE[1])) - bullet = Bullet(init_data, rot=sprite.gun.get_rot(), margin=2, spacing=2, bullet_speed=bullet_speed, bullet_travel_distance=600 + bullet_travel_distance = int(600 * self.size_multiplier) + init_data = create_construction(sprite.id, sprite.no, sprite.rect.center, (BULLET_SIZE[0] * self.size_multiplier, BULLET_SIZE[1] * self.size_multiplier)) + bullet = Bullet(init_data, rot=sprite.gun.get_rot(), margin=2, spacing=2, bullet_speed=bullet_speed, bullet_travel_distance=bullet_travel_distance , play_rect_area=self.play_rect_area) self.bullets.add(bullet) self.all_sprites.add(bullet) @@ -264,6 +279,12 @@ def get_init_image_data(self): for data in wall.get_obj_init_data(): init_image_data.append(data) break + for unbreakable_wall in self.unbreakable_walls: + if isinstance(unbreakable_wall, Unbreakable_Wall): + for data in unbreakable_wall.get_obj_init_data(): + init_image_data.append(data) + break + img_id = ["team_a_bullet", "team_b_bullet"] for id in img_id: img_url = f"https://raw.githubusercontent.com/Jesse-Jumbo/TankMan/main/asset/image/{id}.svg" @@ -300,30 +321,34 @@ def get_init_image_data(self): def get_toggle_progress_data(self): toggle_data = [] hourglass_index = 0 - hourglass_size = self.tileSize + hourglass_size = self.tileSize*20/50 if self.is_manual: hourglass_index = self.used_frame // 10 % 15 toggle_data.append( + # create_image_view_data(image_id=f"hourglass_{hourglass_index}", x=0, y=2, width=20, height=20, angle=0)) create_image_view_data(image_id=f"hourglass_{hourglass_index}", x=0, y=2, width=hourglass_size, height=hourglass_size, angle=0)) - x = 28 + x = 23 y = 8 for frame in range((self.frame_limit - self.used_frame) // int((30 * 2))): - toggle_data.append(create_rect_view_data("frame", x, y, 3, 15, RED)) + toggle_data.append(create_rect_view_data("frame", x, y, 3, 10, RED)) x += 3.5 + # toggle_data.append(create_text_view_data(f"Frame: {self.frame_limit - self.used_frame}", + # self.width_center + self.width_center // 2 + 85, 8, RED, + # "24px Arial BOLD")) toggle_data.append(create_text_view_data(f"Frame: {self.frame_limit - self.used_frame}", self.scene_width-165, 8, RED, "24px Arial BOLD")) - x = 28 - y = 25 + x = 24 + y = 20 for score in range(min(self.team_green_score, self.team_blue_score)): toggle_data.append(create_rect_view_data(name="score", x=x, y=y, width=1, height=10, color=ORANGE)) x += 1.5 if x > self.width_center: - if y == 25: - y = 36 + if y == 32: + y = 44 else: - y = 25 - x = 28 + y = 32 + x = 24 for score in range(abs(self.team_green_score - self. team_blue_score)): if self.team_green_score > self.team_blue_score: toggle_data.append(create_rect_view_data("score", x, y, 1, 10, DARKGREEN)) @@ -337,17 +362,21 @@ def get_toggle_progress_data(self): y = 32 x = 24 # 1P + # x = WINDOW_WIDTH - 125 + # y = WINDOW_HEIGHT - 40 x = self.scene_width - 125 y = self.scene_height - 40 toggle_data.append(create_text_view_data(f"Score: {self.team_green_score}", x, y, DARKGREEN, "24px Arial BOLD")) # 2P x = 5 + # y = WINDOW_HEIGHT - 40 + y = self.scene_height - 40 toggle_data.append(create_text_view_data(f"Score: {self.team_blue_score}", x, y, BLUE, "24px Arial BOLD")) for player in self.all_players: if isinstance(player, Player) and player.is_alive: # lives team_id = "team_a_lives" if player.id == 1 else "team_b_lives" - color = DARKGREEN if player.id == 1 else BLUE + color = DARKGREEN if player.id == 1 else BLUE x = player.play_rect_area.midbottom[0] + 7 + (player.no - 1) * 60 if player.id == 1 \ else player.play_rect_area.midbottom[0] - (player.no - self.green_team_num) * 60 y = player.play_rect_area.height + 73 @@ -397,6 +426,8 @@ def get_ai_data_to_player(self): , 2: [player.get_data_from_obj_to_game() for player in self.players_b if isinstance(player, Player)] } walls_info = [wall.get_data_from_obj_to_game() for wall in self.walls if isinstance(wall, Wall)] + unbreak_wall_info = [wall.get_data_from_obj_to_game() for wall in self.unbreakable_walls if isinstance(wall, Unbreakable_Wall)] + walls_info.extend(unbreak_wall_info) bullet_stations_info = [bullst_station.get_data_from_obj_to_game() for bullst_station in self.bullet_stations if isinstance(bullst_station, Station)] oil_stations_info = [oil_station.get_data_from_obj_to_game() for oil_station in self.oil_stations if @@ -414,6 +445,7 @@ def get_ai_data_to_player(self): to_game_data["bullets_info"] = bullets_info to_game_data["bullet_stations_info"] = bullet_stations_info to_game_data["oil_stations_info"] = oil_stations_info + to_game_data["size_multiplier"] = self.size_multiplier to_player_data[get_ai_name(num)] = to_game_data num += 1 for player in self.players_b: @@ -427,6 +459,7 @@ def get_ai_data_to_player(self): to_game_data["bullets_info"] = bullets_info to_game_data["bullet_stations_info"] = bullet_stations_info to_game_data["oil_stations_info"] = oil_stations_info + to_game_data["size_multiplier"] = self.size_multiplier to_player_data[get_ai_name(num)] = to_game_data num += 1 diff --git a/src/Unbreakable_Wall.py b/src/Unbreakable_Wall.py new file mode 100644 index 0000000..dc1a59f --- /dev/null +++ b/src/Unbreakable_Wall.py @@ -0,0 +1,38 @@ +from os import path + +import pygame +from mlgame.view.view_model import create_asset_init_data, create_image_view_data + +from .env import IMAGE_DIR + + +class Unbreakable_Wall(pygame.sprite.Sprite): + def __init__(self, construction, **kwargs): + super().__init__() + self.id = construction["_id"] + self.no = 0 + self.rect = pygame.Rect(construction["_init_pos"], construction["_init_size"]) + self.angle = 0 + self.is_alive = True + self.lives = -1 + + def update(self, *args, **kwargs) -> None: + pass + + def collide_with_bullets(self): + pass + + def get_data_from_obj_to_game(self): + info = {"id": f"wall_unbreak", "x": self.rect.x, "y": self.rect.y, "lives": self.lives} + return info + + def get_obj_progress_data(self): + return create_image_view_data(f"wall_unbreak", self.rect.x, self.rect.y + , self.rect.width, self.rect.height, self.angle) + + def get_obj_init_data(self): + image_init_data = [] + image_init_data.append(create_asset_init_data(f"wall_unbreak", self.rect.width, self.rect.height, + path.join(IMAGE_DIR, f"wall_unbreak.png"), + f"https://raw.githubusercontent.com/Jesse-Jumbo/TankMan/main/asset/image/wall_unbreak.png")) + return image_init_data diff --git a/src/collide_hit_rect.py b/src/collide_hit_rect.py index f71a861..3c825dd 100644 --- a/src/collide_hit_rect.py +++ b/src/collide_hit_rect.py @@ -4,6 +4,7 @@ from src.Player import Player from src.Bullet import Bullet from src.Wall import Wall +from src.Unbreakable_Wall import Unbreakable_Wall def collide_with_walls(group1: pygame.sprite.Group, group2: pygame.sprite.Group): @@ -17,7 +18,7 @@ def collide_with_bullets(group1: pygame.sprite.Group, group2: pygame.sprite.Grou player_score_data = {} for sprite, bullets in hits.items(): for bullet in bullets: - if bullet.no != sprite.no and sprite.lives > 0: + if bullet.no != sprite.no and sprite.lives != 0: bullet.kill() if isinstance(sprite, Player): @@ -27,7 +28,7 @@ def collide_with_bullets(group1: pygame.sprite.Group, group2: pygame.sprite.Grou score = -20 else: score = 20 - elif isinstance(sprite, Wall): + elif isinstance(sprite, Wall) or isinstance(sprite, Unbreakable_Wall): score = 1 if sprite.lives == 1: score += 5 diff --git a/src/env.py b/src/env.py index 07581da..01336a2 100644 --- a/src/env.py +++ b/src/env.py @@ -75,6 +75,7 @@ WALL_IMG_NO = 3 BULLET_STATION_IMG_NO = 4 OIL_STATION_IMG_NO = 5 +UNBREAK_WALL_IMG_NO = 6 """music""" BGM = 'background_music.ogg/.wav/.mp3'