diff --git a/platformer-2d-rework/README.md b/platformer-2d-rework/README.md new file mode 100644 index 0000000..c66d672 --- /dev/null +++ b/platformer-2d-rework/README.md @@ -0,0 +1,5 @@ +# 2D Platformer Rework + +This is the first official demo to be reworked to adhere to the [GDQuest Best Practices guidlines](https://www.gdquest.com/open-source/guidelines/godot-gdscript/). + +See the [open issue](https://github.com/GDquest/2019-godot-kickstarter/issues/56) for more information. \ No newline at end of file diff --git a/platformer-2d-rework/assets/art/background/cloud_1.png b/platformer-2d-rework/assets/art/background/cloud_1.png new file mode 100644 index 0000000..51c37b5 Binary files /dev/null and b/platformer-2d-rework/assets/art/background/cloud_1.png differ diff --git a/platformer-2d-rework/assets/art/background/cloud_1.png.import b/platformer-2d-rework/assets/art/background/cloud_1.png.import new file mode 100644 index 0000000..720169e --- /dev/null +++ b/platformer-2d-rework/assets/art/background/cloud_1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/cloud_1.png-03c0ad8be397b731df0dd38fa3c87727.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/background/cloud_1.png" +dest_files=[ "res://.import/cloud_1.png-03c0ad8be397b731df0dd38fa3c87727.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/background/cloud_2.png b/platformer-2d-rework/assets/art/background/cloud_2.png new file mode 100644 index 0000000..cbd6098 Binary files /dev/null and b/platformer-2d-rework/assets/art/background/cloud_2.png differ diff --git a/platformer-2d-rework/assets/art/background/cloud_2.png.import b/platformer-2d-rework/assets/art/background/cloud_2.png.import new file mode 100644 index 0000000..7fa52aa --- /dev/null +++ b/platformer-2d-rework/assets/art/background/cloud_2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/cloud_2.png-4ddf8c5bceca4aa07a8bc86d7d788e02.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/background/cloud_2.png" +dest_files=[ "res://.import/cloud_2.png-4ddf8c5bceca4aa07a8bc86d7d788e02.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/background/cloud_3.png b/platformer-2d-rework/assets/art/background/cloud_3.png new file mode 100644 index 0000000..5bac873 Binary files /dev/null and b/platformer-2d-rework/assets/art/background/cloud_3.png differ diff --git a/platformer-2d-rework/assets/art/background/cloud_3.png.import b/platformer-2d-rework/assets/art/background/cloud_3.png.import new file mode 100644 index 0000000..67c7f71 --- /dev/null +++ b/platformer-2d-rework/assets/art/background/cloud_3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/cloud_3.png-a1b7dc71aa84bea9cb4f78f585dcc65d.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/background/cloud_3.png" +dest_files=[ "res://.import/cloud_3.png-a1b7dc71aa84bea9cb4f78f585dcc65d.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/background/distant_platforms_1.png b/platformer-2d-rework/assets/art/background/distant_platforms_1.png new file mode 100644 index 0000000..99821f3 Binary files /dev/null and b/platformer-2d-rework/assets/art/background/distant_platforms_1.png differ diff --git a/platformer-2d-rework/assets/art/background/distant_platforms_1.png.import b/platformer-2d-rework/assets/art/background/distant_platforms_1.png.import new file mode 100644 index 0000000..a3012ea --- /dev/null +++ b/platformer-2d-rework/assets/art/background/distant_platforms_1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/distant_platforms_1.png-7286fe6c8587b96abbbe0bc4a8cbc510.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/background/distant_platforms_1.png" +dest_files=[ "res://.import/distant_platforms_1.png-7286fe6c8587b96abbbe0bc4a8cbc510.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/background/distant_platforms_2.png b/platformer-2d-rework/assets/art/background/distant_platforms_2.png new file mode 100644 index 0000000..e8d2905 Binary files /dev/null and b/platformer-2d-rework/assets/art/background/distant_platforms_2.png differ diff --git a/platformer-2d-rework/assets/art/background/distant_platforms_2.png.import b/platformer-2d-rework/assets/art/background/distant_platforms_2.png.import new file mode 100644 index 0000000..73225a0 --- /dev/null +++ b/platformer-2d-rework/assets/art/background/distant_platforms_2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/distant_platforms_2.png-ba010b30987da6d74062ce964ab450ef.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/background/distant_platforms_2.png" +dest_files=[ "res://.import/distant_platforms_2.png-ba010b30987da6d74062ce964ab450ef.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/background/sky.png b/platformer-2d-rework/assets/art/background/sky.png new file mode 100644 index 0000000..d4e8773 Binary files /dev/null and b/platformer-2d-rework/assets/art/background/sky.png differ diff --git a/platformer-2d-rework/assets/art/background/sky.png.import b/platformer-2d-rework/assets/art/background/sky.png.import new file mode 100644 index 0000000..535ab1c --- /dev/null +++ b/platformer-2d-rework/assets/art/background/sky.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sky.png-c175b712c46edc17f2b5fc55b9de3c49.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/background/sky.png" +dest_files=[ "res://.import/sky.png-c175b712c46edc17f2b5fc55b9de3c49.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/coin/coin.png b/platformer-2d-rework/assets/art/coin/coin.png new file mode 100644 index 0000000..9d1568b Binary files /dev/null and b/platformer-2d-rework/assets/art/coin/coin.png differ diff --git a/platformer-2d-rework/assets/art/coin/coin.png.import b/platformer-2d-rework/assets/art/coin/coin.png.import new file mode 100644 index 0000000..6efc052 --- /dev/null +++ b/platformer-2d-rework/assets/art/coin/coin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/coin.png-87689993f83db6056500d4fa153313d8.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/coin/coin.png" +dest_files=[ "res://.import/coin.png-87689993f83db6056500d4fa153313d8.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/enemy/enemy.png b/platformer-2d-rework/assets/art/enemy/enemy.png new file mode 100644 index 0000000..4c28bc1 Binary files /dev/null and b/platformer-2d-rework/assets/art/enemy/enemy.png differ diff --git a/platformer-2d-rework/assets/art/enemy/enemy.png.import b/platformer-2d-rework/assets/art/enemy/enemy.png.import new file mode 100644 index 0000000..e8eb575 --- /dev/null +++ b/platformer-2d-rework/assets/art/enemy/enemy.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/enemy.png-c2f48b2558d3b68a547452306041a310.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/enemy/enemy.png" +dest_files=[ "res://.import/enemy.png-c2f48b2558d3b68a547452306041a310.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/platforms/moving_platform.png b/platformer-2d-rework/assets/art/platforms/moving_platform.png new file mode 100644 index 0000000..f3d7ce3 Binary files /dev/null and b/platformer-2d-rework/assets/art/platforms/moving_platform.png differ diff --git a/platformer-2d-rework/assets/art/platforms/moving_platform.png.import b/platformer-2d-rework/assets/art/platforms/moving_platform.png.import new file mode 100644 index 0000000..950a735 --- /dev/null +++ b/platformer-2d-rework/assets/art/platforms/moving_platform.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/moving_platform.png-479aa8f802d1a4964b138893ada8d372.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/platforms/moving_platform.png" +dest_files=[ "res://.import/moving_platform.png-479aa8f802d1a4964b138893ada8d372.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/platforms/one_way_platform.png b/platformer-2d-rework/assets/art/platforms/one_way_platform.png new file mode 100644 index 0000000..4e55eb9 Binary files /dev/null and b/platformer-2d-rework/assets/art/platforms/one_way_platform.png differ diff --git a/platformer-2d-rework/assets/art/platforms/one_way_platform.png.import b/platformer-2d-rework/assets/art/platforms/one_way_platform.png.import new file mode 100644 index 0000000..a9cc95b --- /dev/null +++ b/platformer-2d-rework/assets/art/platforms/one_way_platform.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/one_way_platform.png-aaf0179c7171228f27cb489e99e339bd.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/platforms/one_way_platform.png" +dest_files=[ "res://.import/one_way_platform.png-aaf0179c7171228f27cb489e99e339bd.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/player/bullet/bullet.png b/platformer-2d-rework/assets/art/player/bullet/bullet.png new file mode 100644 index 0000000..4b42272 Binary files /dev/null and b/platformer-2d-rework/assets/art/player/bullet/bullet.png differ diff --git a/platformer-2d-rework/assets/art/player/bullet/bullet.png.import b/platformer-2d-rework/assets/art/player/bullet/bullet.png.import new file mode 100644 index 0000000..892c664 --- /dev/null +++ b/platformer-2d-rework/assets/art/player/bullet/bullet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/bullet.png-a148438922f3743d5615622ef8134c9f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/player/bullet/bullet.png" +dest_files=[ "res://.import/bullet.png-a148438922f3743d5615622ef8134c9f.stex" ] + +[params] + +compress/mode=3 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=2 +flags/repeat=0 +flags/filter=true +flags/mipmaps=true +flags/anisotropic=false +flags/srgb=0 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/player/robot_demo.png b/platformer-2d-rework/assets/art/player/robot_demo.png new file mode 100644 index 0000000..9e9b667 Binary files /dev/null and b/platformer-2d-rework/assets/art/player/robot_demo.png differ diff --git a/platformer-2d-rework/assets/art/player/robot_demo.png.import b/platformer-2d-rework/assets/art/player/robot_demo.png.import new file mode 100644 index 0000000..ef85722 --- /dev/null +++ b/platformer-2d-rework/assets/art/player/robot_demo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/robot_demo.png-cd7cbcf6d0c47d4a233ea7ce93b142c2.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/player/robot_demo.png" +dest_files=[ "res://.import/robot_demo.png-cd7cbcf6d0c47d4a233ea7ce93b142c2.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/tileset/tiles_demo.png b/platformer-2d-rework/assets/art/tileset/tiles_demo.png new file mode 100644 index 0000000..ec36688 Binary files /dev/null and b/platformer-2d-rework/assets/art/tileset/tiles_demo.png differ diff --git a/platformer-2d-rework/assets/art/tileset/tiles_demo.png.import b/platformer-2d-rework/assets/art/tileset/tiles_demo.png.import new file mode 100644 index 0000000..690a20c --- /dev/null +++ b/platformer-2d-rework/assets/art/tileset/tiles_demo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/tiles_demo.png-f720a7de2b60b01f690cfa3cb881996b.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/tileset/tiles_demo.png" +dest_files=[ "res://.import/tiles_demo.png-f720a7de2b60b01f690cfa3cb881996b.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/tileset/tileset.tres b/platformer-2d-rework/assets/art/tileset/tileset.tres new file mode 100644 index 0000000..e96c2c7 --- /dev/null +++ b/platformer-2d-rework/assets/art/tileset/tileset.tres @@ -0,0 +1,263 @@ +[gd_resource type="TileSet" load_steps=14 format=2] + +[ext_resource path="res://assets/art/tileset/tiles_demo.png" type="Texture" id=1] + +[sub_resource type="ConvexPolygonShape2D" id=1] +points = PoolVector2Array( 0, 12, 64, 12, 64, 64, 0, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] +points = PoolVector2Array( 0, 12, 56, 12, 56, 64, 0, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=3] +points = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=4] +points = PoolVector2Array( 0, 12, 64, 12, 64, 64, 0, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=5] +points = PoolVector2Array( 64, 76, 64, 128, 0, 128, 0, 12 ) + +[sub_resource type="ConvexPolygonShape2D" id=6] +points = PoolVector2Array( 0, 0, 56, 0, 56, 64, 0, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=7] +points = PoolVector2Array( 56, 12, 64, 12, 64, 64, 0, 64, 0, 0, 56, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=8] +points = PoolVector2Array( 0, 12, 64, 12, 64, 64, 0, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=9] +points = PoolVector2Array( 0, 12, 56, 12, 56, 64, 0, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=10] +points = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=11] +points = PoolVector2Array( 0, 0, 64, 0, 64, 48, 0, 48 ) + +[sub_resource type="ConvexPolygonShape2D" id=12] +points = PoolVector2Array( 0, 0, 56, 0, 56, 48, 0, 48 ) + +[resource] +0/name = "ground" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 64, 64 ) +0/tile_mode = 0 +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 1 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +0/z_index = 0 +1/name = "ground_end" +1/texture = ExtResource( 1 ) +1/tex_offset = Vector2( 0, 0 ) +1/modulate = Color( 1, 1, 1, 1 ) +1/region = Rect2( 64, 0, 64, 64 ) +1/tile_mode = 0 +1/occluder_offset = Vector2( 0, 0 ) +1/navigation_offset = Vector2( 0, 0 ) +1/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 2 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +1/z_index = 0 +2/name = "slope" +2/texture = ExtResource( 1 ) +2/tex_offset = Vector2( 0, 0 ) +2/modulate = Color( 1, 1, 1, 1 ) +2/region = Rect2( 128, 128, 64, 128 ) +2/tile_mode = 0 +2/occluder_offset = Vector2( 0, 0 ) +2/navigation_offset = Vector2( 0, 0 ) +2/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 5 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +2/z_index = 0 +3/name = "wall" +3/texture = ExtResource( 1 ) +3/tex_offset = Vector2( 0, 0 ) +3/modulate = Color( 1, 1, 1, 1 ) +3/region = Rect2( 64, 64, 64, 64 ) +3/tile_mode = 0 +3/occluder_offset = Vector2( 0, 0 ) +3/navigation_offset = Vector2( 0, 0 ) +3/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 6 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +3/z_index = 0 +4/name = "slope_top" +4/texture = ExtResource( 1 ) +4/tex_offset = Vector2( 0, 0 ) +4/modulate = Color( 1, 1, 1, 1 ) +4/region = Rect2( 64, 128, 64, 64 ) +4/tile_mode = 0 +4/occluder_offset = Vector2( 0, 0 ) +4/navigation_offset = Vector2( 0, 0 ) +4/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 7 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +4/z_index = 0 +5/name = "one_way" +5/texture = ExtResource( 1 ) +5/tex_offset = Vector2( 0, 0 ) +5/modulate = Color( 1, 1, 1, 1 ) +5/region = Rect2( 128, 0, 64, 64 ) +5/tile_mode = 0 +5/occluder_offset = Vector2( 0, 0 ) +5/navigation_offset = Vector2( 0, 0 ) +5/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": true, +"one_way_margin": 1.0, +"shape": SubResource( 8 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +5/z_index = 0 +6/name = "one_way_end" +6/texture = ExtResource( 1 ) +6/tex_offset = Vector2( 0, 0 ) +6/modulate = Color( 1, 1, 1, 1 ) +6/region = Rect2( 192, 0, 64, 64 ) +6/tile_mode = 0 +6/occluder_offset = Vector2( 0, 0 ) +6/navigation_offset = Vector2( 0, 0 ) +6/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": true, +"one_way_margin": 1.0, +"shape": SubResource( 9 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +6/z_index = 0 +7/name = "rock" +7/texture = ExtResource( 1 ) +7/tex_offset = Vector2( 0, 0 ) +7/modulate = Color( 1, 1, 1, 1 ) +7/region = Rect2( 0, 64, 64, 64 ) +7/tile_mode = 0 +7/occluder_offset = Vector2( 0, 0 ) +7/navigation_offset = Vector2( 0, 0 ) +7/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 10 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +7/z_index = 0 +8/name = "bottom" +8/texture = ExtResource( 1 ) +8/tex_offset = Vector2( 0, 0 ) +8/modulate = Color( 1, 1, 1, 1 ) +8/region = Rect2( 384, 64, 64, 64 ) +8/tile_mode = 0 +8/occluder_offset = Vector2( 0, 0 ) +8/navigation_offset = Vector2( 0, 0 ) +8/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 11 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +8/z_index = 0 +9/name = "bottom_end" +9/texture = ExtResource( 1 ) +9/tex_offset = Vector2( 0, 0 ) +9/modulate = Color( 1, 1, 1, 1 ) +9/region = Rect2( 448, 64, 64, 64 ) +9/tile_mode = 0 +9/occluder_offset = Vector2( 0, 0 ) +9/navigation_offset = Vector2( 0, 0 ) +9/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 12 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +9/z_index = 0 +10/name = "bottom_corner" +10/texture = ExtResource( 1 ) +10/tex_offset = Vector2( 0, 0 ) +10/modulate = Color( 1, 1, 1, 1 ) +10/region = Rect2( 320, 64, 64, 64 ) +10/tile_mode = 0 +10/occluder_offset = Vector2( 0, 0 ) +10/navigation_offset = Vector2( 0, 0 ) +10/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 3 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +10/z_index = 0 +11/name = "tree_trunk_0" +11/texture = ExtResource( 1 ) +11/tex_offset = Vector2( 0, 0 ) +11/modulate = Color( 1, 1, 1, 1 ) +11/region = Rect2( 256, 128, 64, 64 ) +11/tile_mode = 0 +11/occluder_offset = Vector2( 0, 0 ) +11/navigation_offset = Vector2( 0, 0 ) +11/shapes = [ ] +11/z_index = 0 +12/name = "tree_trunk_1" +12/texture = ExtResource( 1 ) +12/tex_offset = Vector2( 0, 0 ) +12/modulate = Color( 1, 1, 1, 1 ) +12/region = Rect2( 256, 64, 64, 64 ) +12/tile_mode = 0 +12/occluder_offset = Vector2( 0, 0 ) +12/navigation_offset = Vector2( 0, 0 ) +12/shapes = [ ] +12/z_index = 0 +13/name = "tree_base" +13/texture = ExtResource( 1 ) +13/tex_offset = Vector2( 0, 0 ) +13/modulate = Color( 1, 1, 1, 1 ) +13/region = Rect2( 256, 192, 64, 64 ) +13/tile_mode = 0 +13/occluder_offset = Vector2( 0, 0 ) +13/navigation_offset = Vector2( 0, 0 ) +13/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 4 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +13/z_index = 0 +14/name = "tree_top" +14/texture = ExtResource( 1 ) +14/tex_offset = Vector2( 0, 0 ) +14/modulate = Color( 1, 1, 1, 1 ) +14/region = Rect2( 256, 0, 64, 64 ) +14/tile_mode = 0 +14/occluder_offset = Vector2( 0, 0 ) +14/navigation_offset = Vector2( 0, 0 ) +14/shapes = [ ] +14/z_index = 0 diff --git a/platformer-2d-rework/assets/art/ui/touch_button_fire.png b/platformer-2d-rework/assets/art/ui/touch_button_fire.png new file mode 100644 index 0000000..2675174 Binary files /dev/null and b/platformer-2d-rework/assets/art/ui/touch_button_fire.png differ diff --git a/platformer-2d-rework/assets/art/ui/touch_button_fire.png.import b/platformer-2d-rework/assets/art/ui/touch_button_fire.png.import new file mode 100644 index 0000000..b1faa25 --- /dev/null +++ b/platformer-2d-rework/assets/art/ui/touch_button_fire.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/touch_button_fire.png-8b72c42a8cb252207ce8948d4b623690.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/ui/touch_button_fire.png" +dest_files=[ "res://.import/touch_button_fire.png-8b72c42a8cb252207ce8948d4b623690.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/ui/touch_button_jump.png b/platformer-2d-rework/assets/art/ui/touch_button_jump.png new file mode 100644 index 0000000..495339b Binary files /dev/null and b/platformer-2d-rework/assets/art/ui/touch_button_jump.png differ diff --git a/platformer-2d-rework/assets/art/ui/touch_button_jump.png.import b/platformer-2d-rework/assets/art/ui/touch_button_jump.png.import new file mode 100644 index 0000000..cd9d665 --- /dev/null +++ b/platformer-2d-rework/assets/art/ui/touch_button_jump.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/touch_button_jump.png-f72afeb370538aa951853dbc52052250.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/ui/touch_button_jump.png" +dest_files=[ "res://.import/touch_button_jump.png-f72afeb370538aa951853dbc52052250.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/ui/touch_button_left.png b/platformer-2d-rework/assets/art/ui/touch_button_left.png new file mode 100644 index 0000000..aaadb14 Binary files /dev/null and b/platformer-2d-rework/assets/art/ui/touch_button_left.png differ diff --git a/platformer-2d-rework/assets/art/ui/touch_button_left.png.import b/platformer-2d-rework/assets/art/ui/touch_button_left.png.import new file mode 100644 index 0000000..720a79d --- /dev/null +++ b/platformer-2d-rework/assets/art/ui/touch_button_left.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/touch_button_left.png-e48f16cfdaae98fdc92a21f20c157c53.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/ui/touch_button_left.png" +dest_files=[ "res://.import/touch_button_left.png-e48f16cfdaae98fdc92a21f20c157c53.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/art/ui/touch_button_right.png b/platformer-2d-rework/assets/art/ui/touch_button_right.png new file mode 100644 index 0000000..f69d933 Binary files /dev/null and b/platformer-2d-rework/assets/art/ui/touch_button_right.png differ diff --git a/platformer-2d-rework/assets/art/ui/touch_button_right.png.import b/platformer-2d-rework/assets/art/ui/touch_button_right.png.import new file mode 100644 index 0000000..157b300 --- /dev/null +++ b/platformer-2d-rework/assets/art/ui/touch_button_right.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/touch_button_right.png-74bf87a3a0fa663fbb3574844de31372.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/ui/touch_button_right.png" +dest_files=[ "res://.import/touch_button_right.png-74bf87a3a0fa663fbb3574844de31372.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/assets/audio/music/music.ogg b/platformer-2d-rework/assets/audio/music/music.ogg new file mode 100644 index 0000000..ed3e9f0 Binary files /dev/null and b/platformer-2d-rework/assets/audio/music/music.ogg differ diff --git a/platformer-2d-rework/assets/audio/music/music.ogg.import b/platformer-2d-rework/assets/audio/music/music.ogg.import new file mode 100644 index 0000000..3d232d9 --- /dev/null +++ b/platformer-2d-rework/assets/audio/music/music.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/music.ogg-e27216112531ea490cdad574860a53a5.oggstr" + +[deps] + +source_file="res://assets/audio/music/music.ogg" +dest_files=[ "res://.import/music.ogg-e27216112531ea490cdad574860a53a5.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/platformer-2d-rework/assets/audio/sfx/coin_pickup.wav b/platformer-2d-rework/assets/audio/sfx/coin_pickup.wav new file mode 100644 index 0000000..e78579f Binary files /dev/null and b/platformer-2d-rework/assets/audio/sfx/coin_pickup.wav differ diff --git a/platformer-2d-rework/assets/audio/sfx/coin_pickup.wav.import b/platformer-2d-rework/assets/audio/sfx/coin_pickup.wav.import new file mode 100644 index 0000000..63842c3 --- /dev/null +++ b/platformer-2d-rework/assets/audio/sfx/coin_pickup.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/coin_pickup.wav-69d455f3063e30fd994846647c281aea.sample" + +[deps] + +source_file="res://assets/audio/sfx/coin_pickup.wav" +dest_files=[ "res://.import/coin_pickup.wav-69d455f3063e30fd994846647c281aea.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/platformer-2d-rework/assets/audio/sfx/explode.wav b/platformer-2d-rework/assets/audio/sfx/explode.wav new file mode 100644 index 0000000..229c853 Binary files /dev/null and b/platformer-2d-rework/assets/audio/sfx/explode.wav differ diff --git a/platformer-2d-rework/assets/audio/sfx/explode.wav.import b/platformer-2d-rework/assets/audio/sfx/explode.wav.import new file mode 100644 index 0000000..34d8239 --- /dev/null +++ b/platformer-2d-rework/assets/audio/sfx/explode.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/explode.wav-302a3de6d016432bf47477d337a4d553.sample" + +[deps] + +source_file="res://assets/audio/sfx/explode.wav" +dest_files=[ "res://.import/explode.wav-302a3de6d016432bf47477d337a4d553.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/platformer-2d-rework/assets/audio/sfx/hit.wav b/platformer-2d-rework/assets/audio/sfx/hit.wav new file mode 100644 index 0000000..4fb3b13 Binary files /dev/null and b/platformer-2d-rework/assets/audio/sfx/hit.wav differ diff --git a/platformer-2d-rework/assets/audio/sfx/hit.wav.import b/platformer-2d-rework/assets/audio/sfx/hit.wav.import new file mode 100644 index 0000000..d40ca4f --- /dev/null +++ b/platformer-2d-rework/assets/audio/sfx/hit.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/hit.wav-27e178036f6cee6545e9f025a3865a36.sample" + +[deps] + +source_file="res://assets/audio/sfx/hit.wav" +dest_files=[ "res://.import/hit.wav-27e178036f6cee6545e9f025a3865a36.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/platformer-2d-rework/assets/audio/sfx/jump.wav b/platformer-2d-rework/assets/audio/sfx/jump.wav new file mode 100644 index 0000000..e9942e6 Binary files /dev/null and b/platformer-2d-rework/assets/audio/sfx/jump.wav differ diff --git a/platformer-2d-rework/assets/audio/sfx/jump.wav.import b/platformer-2d-rework/assets/audio/sfx/jump.wav.import new file mode 100644 index 0000000..16d6001 --- /dev/null +++ b/platformer-2d-rework/assets/audio/sfx/jump.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/jump.wav-127418ac4fc0b61a7fed0684053202c7.sample" + +[deps] + +source_file="res://assets/audio/sfx/jump.wav" +dest_files=[ "res://.import/jump.wav-127418ac4fc0b61a7fed0684053202c7.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/platformer-2d-rework/assets/audio/sfx/shoot.wav b/platformer-2d-rework/assets/audio/sfx/shoot.wav new file mode 100644 index 0000000..ad74f32 Binary files /dev/null and b/platformer-2d-rework/assets/audio/sfx/shoot.wav differ diff --git a/platformer-2d-rework/assets/audio/sfx/shoot.wav.import b/platformer-2d-rework/assets/audio/sfx/shoot.wav.import new file mode 100644 index 0000000..8a0eeb6 --- /dev/null +++ b/platformer-2d-rework/assets/audio/sfx/shoot.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/shoot.wav-f3ce9b4ae60220ecd3cf78df7278a10f.sample" + +[deps] + +source_file="res://assets/audio/sfx/shoot.wav" +dest_files=[ "res://.import/shoot.wav-f3ce9b4ae60220ecd3cf78df7278a10f.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/platformer-2d-rework/icon.png b/platformer-2d-rework/icon.png new file mode 100644 index 0000000..705484b Binary files /dev/null and b/platformer-2d-rework/icon.png differ diff --git a/platformer-2d-rework/icon.png.import b/platformer-2d-rework/icon.png.import new file mode 100644 index 0000000..c16cdba --- /dev/null +++ b/platformer-2d-rework/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/platformer-2d-rework/project.godot b/platformer-2d-rework/project.godot new file mode 100644 index 0000000..002008f --- /dev/null +++ b/platformer-2d-rework/project.godot @@ -0,0 +1,160 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + +_global_script_classes=[ { +"base": "KinematicBody2D", +"class": "Actor", +"language": "GDScript", +"path": "res://src/Actors/Actor.gd" +}, { +"base": "RigidBody2D", +"class": "Bullet", +"language": "GDScript", +"path": "res://src/Objects/Bullet.gd" +}, { +"base": "Area2D", +"class": "Coin", +"language": "GDScript", +"path": "res://src/Objects/Coin.gd" +}, { +"base": "Actor", +"class": "Enemy", +"language": "GDScript", +"path": "res://src/Actors/Enemy.gd" +}, { +"base": "Position2D", +"class": "Gun", +"language": "GDScript", +"path": "res://src/Actors/Gun.gd" +}, { +"base": "Node2D", +"class": "MovingPlatform", +"language": "GDScript", +"path": "res://src/Platforms/MovingPlatform.gd" +}, { +"base": "Actor", +"class": "Player", +"language": "GDScript", +"path": "res://src/Actors/Player.gd" +} ] +_global_script_class_icons={ +"Actor": "", +"Bullet": "", +"Coin": "", +"Enemy": "", +"Gun": "", +"MovingPlatform": "", +"Player": "" +} + +[application] + +config/name="Platformer 2D" +run/main_scene="res://src/Stage.tscn" +config/icon="res://icon.png" +target_fps="60" + +[debug] + +gdscript/completion/autocomplete_setters_and_getters=true +gdscript/warnings/unsafe_property_access=true +gdscript/warnings/unsafe_method_access=true +gdscript/warnings/unsafe_cast=true +gdscript/warnings/unsafe_call_argument=true + +[display] + +window/size/width=800 +window/size/height=480 +window/size/test_width=1600 +window/size/test_height=960 +window/dpi/allow_hidpi=true +window/stretch/mode="2d" +window/stretch/aspect="keep" +stretch/aspect="keep_height" +stretch/mode="2d" + +[gdnative] + +singletons=[ ] + +[image_loader] + +repeat=false + +[input] + +jump={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) + ] +} +move_left={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) + ] +} +move_right={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) + ] +} +shoot={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) + ] +} +spawn={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777244,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null) + ] +} + +[layer_names] + +2d_physics/layer_1="player" +2d_physics/layer_2="enemies" +2d_physics/layer_3="coins" +2d_physics/layer_4="platforms" +2d_physics/layer_5="ground" + +[physics] + +2d/default_gravity=700 + +[rasterizer] + +use_pixel_snap=true + +[render] + +mipmap_policy=1 + +[rendering] + +quality/intended_usage/framebuffer_allocation=0 +quality/intended_usage/framebuffer_allocation.mobile=1 +quality/filters/anisotropic_filter_level=2 +quality/filters/use_nearest_mipmap_filter=true +quality/depth/hdr=false + +[texture_import] + +filter=false diff --git a/platformer-2d-rework/src/Actors/Actor.gd b/platformer-2d-rework/src/Actors/Actor.gd new file mode 100644 index 0000000..cec9867 --- /dev/null +++ b/platformer-2d-rework/src/Actors/Actor.gd @@ -0,0 +1,23 @@ +extends KinematicBody2D +class_name Actor + +""" +Both the Player and Enemy inherit this scene as they have shared behaviours such as +speed and are affected by gravity. +""" + + +export var speed: = Vector2(400.0, 500.0) +export var gravity: = 3500.0 + +const FLOOR_NORMAL: = Vector2.UP + +var _velocity: = Vector2.ZERO + +""" +_physics_process is called after the inherited _physics_process function. +This allows the Player and Enemy scenes to be affected by gravity. +""" +func _physics_process(delta: float) -> void: + + _velocity.y += gravity * delta diff --git a/platformer-2d-rework/src/Actors/Enemy.gd b/platformer-2d-rework/src/Actors/Enemy.gd new file mode 100644 index 0000000..c1dd3ef --- /dev/null +++ b/platformer-2d-rework/src/Actors/Enemy.gd @@ -0,0 +1,82 @@ +extends Actor +class_name Enemy + + +onready var platform_detector: RayCast2D = $PlatformDetector +onready var floor_detector_left: RayCast2D = $FloorDetectorLeft +onready var floor_detector_right: RayCast2D = $FloorDetectorRight +onready var sprite: Sprite = $Sprite +onready var animation_player: AnimationPlayer = $AnimationPlayer + +enum State {WALKING, DEAD} + +var _state = State.WALKING + +""" +This function is called when the scene enters the scene tree. +We can initialize variables here. +""" +func _ready() -> void: + _velocity.x = speed.x + +""" +Physics process is a built-in loop in Godot. +If you define _physics_process on a node, Godot will call it every frame. + +At a glance, you can see that the physics process loop: + 1. Calculates the move velocity. + 2. Moves the character. + 3. Updates the sprite direction. + 4. Updates the animation. + +Splitting the physics process logic into functions not only makes it easier to read, it help to change or improve the code later on: + - If you need to change a calculation, you can use Go To -> Function (Ctrl Alt F) to quickly jump to the corresponding function. + - If you split the character into a state machine or more advanced pattern, you can easily move individual functions. +""" +func _physics_process(delta: float) -> void: + _velocity = calculate_move_velocity(_velocity) + + # We only update the y value of _velocity as we want to handle the horizontal movement ourselves. + _velocity.y = move_and_slide(_velocity, FLOOR_NORMAL).y + + # We flip the Sprite depending on which way the enemy is moving. + sprite.scale.x = 1 if _velocity.x > 0 else -1 + + + var animation: = get_new_animation() + if animation != animation_player.current_animation: + animation_player.play(animation) + + +func destroy() -> void: + _state = State.DEAD + _velocity = Vector2.ZERO + + +""" +This function calculates a new velocity whenever you need it. +If the enemy encounters a wall or an edge, the horizontal velocity is flipped. +""" +func calculate_move_velocity( + linear_velocity: Vector2 + ) -> Vector2: + var velocity: = linear_velocity + + if not floor_detector_left.is_colliding(): + velocity.x = speed.x + elif not floor_detector_right.is_colliding(): + velocity.x = -speed.x + + if is_on_wall(): + velocity.x *= -1 + + return velocity + + +func get_new_animation() -> String: + var animation_new: = "" + if _state == State.WALKING: + animation_new = "walk" if abs(_velocity.x) > 0 else "idle" + else: + animation_new = "destroy" + return animation_new diff --git a/platformer-2d-rework/src/Actors/Enemy.tscn b/platformer-2d-rework/src/Actors/Enemy.tscn new file mode 100644 index 0000000..04f8f36 --- /dev/null +++ b/platformer-2d-rework/src/Actors/Enemy.tscn @@ -0,0 +1,243 @@ +[gd_scene load_steps=13 format=2] + +[ext_resource path="res://assets/art/player/bullet/bullet.png" type="Texture" id=1] +[ext_resource path="res://assets/audio/sfx/explode.wav" type="AudioStream" id=2] +[ext_resource path="res://assets/audio/sfx/hit.wav" type="AudioStream" id=3] +[ext_resource path="res://assets/art/enemy/enemy.png" type="Texture" id=4] +[ext_resource path="res://src/Actors/Enemy.gd" type="Script" id=5] + +[sub_resource type="CanvasItemMaterial" id=1] + +[sub_resource type="Animation" id=2] +resource_name = "destroy" +length = 1.5 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 7 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Sprite:rotation_degrees") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 0.8 ), +"transitions": PoolRealArray( 0.0796601, 1 ), +"update": 0, +"values": [ 0.0, 180.0 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Sprite:self_modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.3, 0.9 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Explosion:emitting") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0, 0.8 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ false, true ] +} +tracks/4/type = "value" +tracks/4/path = NodePath("Explosion:process_material:scale") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/keys = { +"times": PoolRealArray( 0.4, 0.8 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ 1.0, 4.0 ] +} +tracks/5/type = "value" +tracks/5/path = NodePath("Hit:playing") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/keys = { +"times": PoolRealArray( 0.00999999 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} +tracks/6/type = "value" +tracks/6/path = NodePath("Explode:playing") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/keys = { +"times": PoolRealArray( 0.6 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} +tracks/7/type = "method" +tracks/7/path = NodePath(".") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/keys = { +"times": PoolRealArray( 1.5 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ ], +"method": "queue_free" +} ] +} +tracks/8/type = "value" +tracks/8/path = NodePath(".:collision_layer") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 0 ] +} +tracks/9/type = "value" +tracks/9/path = NodePath("Sprite:position") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/keys = { +"times": PoolRealArray( 0, 0.2, 0.4 ), +"transitions": PoolRealArray( 2.2974, 0.183011, 1 ), +"update": 0, +"values": [ Vector2( 0, 0 ), Vector2( 0, -32 ), Vector2( 0, 0 ) ] +} + +[sub_resource type="Animation" id=3] +length = 6.75 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 5, 6, 5, 6, 5, 6, 7, 6, 7, 5 ] +} + +[sub_resource type="Animation" id=4] +length = 1.25 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 0, 1, 2, 3, 4, 0 ] +} + +[sub_resource type="CapsuleShape2D" id=5] +radius = 13.4556 +height = 14.2002 + +[sub_resource type="CanvasItemMaterial" id=6] +blend_mode = 1 + +[sub_resource type="ParticlesMaterial" id=7] +flag_disable_z = true +gravity = Vector3( 0, 98, 0 ) +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +scale = 4.0 + +[node name="Enemy" type="KinematicBody2D"] +collision_layer = 2 +collision_mask = 24 +script = ExtResource( 5 ) +speed = Vector2( 150, 500 ) +gravity = 1800.0 + +[node name="PlatformDetector" type="RayCast2D" parent="."] +position = Vector2( 0, 12 ) +enabled = true +cast_to = Vector2( 0, 8 ) +collision_mask = 8 + +[node name="FloorDetectorLeft" type="RayCast2D" parent="."] +position = Vector2( -30, -8 ) +enabled = true +cast_to = Vector2( 0, 70 ) +collision_mask = 24 + +[node name="FloorDetectorRight" type="RayCast2D" parent="."] +position = Vector2( 31.16, -8 ) +enabled = true +cast_to = Vector2( 0, 70 ) +collision_mask = 24 + +[node name="Sprite" type="Sprite" parent="."] +material = SubResource( 1 ) +texture = ExtResource( 4 ) +flip_h = true +hframes = 8 +frame = 5 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/destroy = SubResource( 2 ) +anims/idle = SubResource( 3 ) +anims/walk = SubResource( 4 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +rotation = -1.5708 +shape = SubResource( 5 ) + +[node name="Explosion" type="Particles2D" parent="."] +self_modulate = Color( 1, 1, 1, 0.12 ) +material = SubResource( 6 ) +emitting = false +amount = 32 +lifetime = 0.5 +one_shot = true +speed_scale = 1.2 +explosiveness = 0.1 +draw_order = 215832976 +process_material = SubResource( 7 ) +texture = ExtResource( 1 ) + +[node name="Hit" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource( 3 ) + +[node name="Explode" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource( 2 ) diff --git a/platformer-2d-rework/src/Actors/Gun.gd b/platformer-2d-rework/src/Actors/Gun.gd new file mode 100644 index 0000000..75143b1 --- /dev/null +++ b/platformer-2d-rework/src/Actors/Gun.gd @@ -0,0 +1,26 @@ +extends Position2D +class_name Gun +""" +Represents a weapon that spawns and shoots bullets. +The Cooldown timer controls the cooldown duration between shots. +""" + + +onready var sound_shoot: AudioStreamPlayer2D = $Shoot +onready var timer: Timer = $Cooldown + +const Bullet = preload("res://src/Objects/Bullet.tscn") +const BULLET_VELOCITY := 1000.0 + + +func shoot(direction: int = 1) -> bool: + if not timer.is_stopped(): + return false + var bullet = Bullet.instance() + bullet.global_position = global_position + bullet.linear_velocity = Vector2(direction * BULLET_VELOCITY, 0) + + bullet.set_as_toplevel(true) + add_child(bullet) + sound_shoot.play() + return true diff --git a/platformer-2d-rework/src/Actors/Player.gd b/platformer-2d-rework/src/Actors/Player.gd new file mode 100644 index 0000000..5e08556 --- /dev/null +++ b/platformer-2d-rework/src/Actors/Player.gd @@ -0,0 +1,94 @@ +extends Actor +class_name Player + + +onready var platform_detector: RayCast2D = $PlatformDetector +onready var sprite: Sprite = $Sprite +onready var animation_player: AnimationPlayer = $AnimationPlayer +onready var shoot_timer: = $ShootAnimation +onready var gun: Gun = $Sprite/Gun + + +""" +Physics process is a built-in loop in Godot. +If you define _physics_process on a node, Godot will call it every frame. + +We use separate functions to calculate the direction and velocity to make this one easier to read. +At a glance, you can see that the physics process loop: + 1. Calculates the move direction. + 2. Calculates the move velocity. + 3. Moves the character. + 4. Updates the sprite direction. + 5. Shoots bullets. + 6. Updates the animation. + +Splitting the physics process logic into functions not only makes it easier to read, it help to +change or improve the code later on: + - If you need to change a calculation, you can use Go To -> Function (Ctrl Alt F) to quickly jump to the corresponding function. + - If you split the character into a state machine or more advanced pattern, you can easily move individual functions. +""" +func _physics_process(delta: float) -> void: + var direction: = get_direction() + + var is_jump_interrupted: = Input.is_action_just_released("jump") and _velocity.y < 0.0 + _velocity = calculate_move_velocity(_velocity, direction, speed, is_jump_interrupted) + + var is_snapping: = Vector2.DOWN * 60.0 if direction.y == 0.0 else Vector2.ZERO + var is_on_platform: = platform_detector.is_colliding() + _velocity = move_and_slide_with_snap( + _velocity, is_snapping, FLOOR_NORMAL, not is_on_platform, 4, 0.9, false + ) + + # When the character’s direction changes, we want to to scale the Sprite accordingly to flip it. This will make Robi face left or right depending on the direction you move. + if direction.x != 0: + sprite.scale.x = direction.x + + # We use the sprite's scale to store Robi’s look direction which allows us in turn to shoot bullets forward. + # There are many situations like these where you can reuse existing properties instead of creating new variables. + var is_shooting: = false + if Input.is_action_just_pressed("shoot"): + is_shooting = gun.shoot(sprite.scale.x) + + + var animation: = get_new_animation(is_shooting) + if animation != animation_player.current_animation and shoot_timer.is_stopped(): + if is_shooting: + shoot_timer.start() + animation_player.play(animation) + + +func get_direction() -> Vector2: + return Vector2( + Input.get_action_strength("move_right") - Input.get_action_strength("move_left"), + -Input.get_action_strength("jump") if is_on_floor() and Input.is_action_just_pressed("jump") else 0.0 + ) + + +""" +This function calculates a new velocity whenever you need it. +It allows you to interrupt jumps. +""" +func calculate_move_velocity( + linear_velocity: Vector2, + direction: Vector2, + speed: Vector2, + is_jump_interrupted: bool + ) -> Vector2: + var velocity: = linear_velocity + velocity.x = speed.x * direction.x + if direction.y != 0.0: + velocity.y = speed.y * direction.y + if is_jump_interrupted: + velocity.y = 0.0 + return velocity + + +func get_new_animation(is_shooting: bool = false) -> String: + var animation_new: = "" + if is_on_floor(): + animation_new = "run" if abs(_velocity.x) > 0.1 else "idle" + else: + animation_new = "falling" if _velocity.y > 0 else "jumping" + if is_shooting: + animation_new += "_weapon" + return animation_new diff --git a/platformer-2d-rework/src/Actors/Player.tscn b/platformer-2d-rework/src/Actors/Player.tscn new file mode 100644 index 0000000..211bb53 --- /dev/null +++ b/platformer-2d-rework/src/Actors/Player.tscn @@ -0,0 +1,279 @@ +[gd_scene load_steps=21 format=2] + +[ext_resource path="res://src/Actors/Player.gd" type="Script" id=1] +[ext_resource path="res://assets/art/player/robot_demo.png" type="Texture" id=2] +[ext_resource path="res://assets/audio/sfx/jump.wav" type="AudioStream" id=3] +[ext_resource path="res://assets/audio/sfx/shoot.wav" type="AudioStream" id=4] +[ext_resource path="res://assets/art/ui/touch_button_left.png" type="Texture" id=5] +[ext_resource path="res://assets/art/ui/touch_button_right.png" type="Texture" id=6] +[ext_resource path="res://assets/art/ui/touch_button_jump.png" type="Texture" id=7] +[ext_resource path="res://assets/art/ui/touch_button_fire.png" type="Texture" id=8] +[ext_resource path="res://src/Actors/Gun.gd" type="Script" id=9] + +[sub_resource type="Animation" id=1] +resource_name = "crouch" +length = 0.01 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 22 ] +} + +[sub_resource type="Animation" id=2] +resource_name = "falling" +length = 0.01 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 21 ] +} + +[sub_resource type="Animation" id=3] +resource_name = "falling_weapon" +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 26 ] +} + +[sub_resource type="Animation" id=4] +length = 7.0 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 1.25, 1.5, 2, 4.5, 4.75, 5, 5.25 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 16, 17, 18, 16, 19, 20, 19, 16 ] +} + +[sub_resource type="Animation" id=5] +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 25 ] +} + +[sub_resource type="Animation" id=6] +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.25, 0.5 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 1, +"values": [ 23, 24, 23 ] +} + +[sub_resource type="Animation" id=7] +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 26 ] +} + +[sub_resource type="Animation" id=8] +length = 1.25 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 0, 1, 2, 3, 4, 0 ] +} + +[sub_resource type="Animation" id=9] +length = 1.25 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 5, 6, 7, 8, 9, 5 ] +} + +[sub_resource type="Animation" id=10] +length = 1.25 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 10, 11, 12, 13, 14, 5 ] +} + +[sub_resource type="CapsuleShape2D" id=11] +height = 44.4787 + +[node name="Player" type="KinematicBody2D"] +collision_mask = 30 +script = ExtResource( 1 ) +speed = Vector2( 400, 700 ) +gravity = 1800.0 + +[node name="ShootAnimation" type="Timer" parent="."] +process_mode = 0 +wait_time = 0.2 +one_shot = true + +[node name="PlatformDetector" type="RayCast2D" parent="."] +position = Vector2( 0, 29.9245 ) +enabled = true +cast_to = Vector2( 0, 4 ) +collision_mask = 8 + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 2 ) +vframes = 2 +hframes = 16 +frame = 22 + +[node name="Gun" type="Position2D" parent="Sprite"] +position = Vector2( 30.6589, 6.13176 ) +script = ExtResource( 9 ) + +[node name="Shoot" type="AudioStreamPlayer2D" parent="Sprite/Gun"] +position = Vector2( -30.6589, -6.13176 ) +stream = ExtResource( 4 ) + +[node name="Cooldown" type="Timer" parent="Sprite/Gun"] +process_mode = 0 +wait_time = 0.3 +one_shot = true + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +playback_speed = 2.6 +anims/crouch = SubResource( 1 ) +anims/falling = SubResource( 2 ) +anims/falling_weapon = SubResource( 3 ) +anims/idle = SubResource( 4 ) +anims/idle_weapon = SubResource( 5 ) +anims/jumping = SubResource( 6 ) +anims/jumping_weapon = SubResource( 7 ) +anims/run = SubResource( 8 ) +anims/run_weapon = SubResource( 9 ) +anims/standing_weapon_ready = SubResource( 10 ) + +[node name="Camera" type="Camera2D" parent="."] +current = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 0.291992, -0.835023 ) +shape = SubResource( 11 ) + +[node name="Jump" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource( 3 ) + +[node name="UI" type="CanvasLayer" parent="."] +layer = 0 + +[node name="Left" type="TouchScreenButton" parent="UI"] +position = Vector2( 27.7593, 360.87 ) +scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 5 ) +passby_press = true +action = "move_left" +visibility_mode = 1 + +[node name="Right" type="TouchScreenButton" parent="UI"] +position = Vector2( 121.542, 361.415 ) +scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 6 ) +passby_press = true +action = "move_right" +visibility_mode = 1 + +[node name="Jump" type="TouchScreenButton" parent="UI"] +position = Vector2( 666.224, 359.02 ) +scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 7 ) +action = "jump" +visibility_mode = 1 + +[node name="Fire" type="TouchScreenButton" parent="UI"] +position = Vector2( 668.073, 262.788 ) +scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 8 ) +action = "shoot" +visibility_mode = 1 diff --git a/platformer-2d-rework/src/Objects/Bullet.gd b/platformer-2d-rework/src/Objects/Bullet.gd new file mode 100644 index 0000000..f308e4a --- /dev/null +++ b/platformer-2d-rework/src/Objects/Bullet.gd @@ -0,0 +1,14 @@ +extends RigidBody2D +class_name Bullet + + +onready var animation_player: AnimationPlayer = $AnimationPlayer + + +func destroy() -> void: + animation_player.play("destroy") + + +func _on_body_entered(body: PhysicsBody2D): + if body is Enemy: + body.destroy() diff --git a/platformer-2d-rework/src/Objects/Bullet.tscn b/platformer-2d-rework/src/Objects/Bullet.tscn new file mode 100644 index 0000000..93a585f --- /dev/null +++ b/platformer-2d-rework/src/Objects/Bullet.tscn @@ -0,0 +1,97 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://assets/art/player/bullet/bullet.png" type="Texture" id=1] +[ext_resource path="res://src/Objects/Bullet.gd" type="Script" id=2] + +[sub_resource type="CanvasItemMaterial" id=1] + +[sub_resource type="CanvasItemMaterial" id=2] +blend_mode = 1 + +[sub_resource type="ParticlesMaterial" id=3] +flag_disable_z = true +spread = 0.0 +gravity = Vector3( 0, 0, 0 ) +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +scale = 0.8 +color = Color( 1, 1, 1, 0.705882 ) + +[sub_resource type="CanvasItemMaterial" id=4] + +[sub_resource type="CircleShape2D" id=5] + +[sub_resource type="Animation" id=6] +resource_name = "destroy" +length = 0.3 +tracks/0/type = "method" +tracks/0/path = NodePath(".") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0.3 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ ], +"method": "queue_free" +} ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Sprite:self_modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 0.3 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Particles2D:self_modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.3 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} + +[node name="Bullet" type="RigidBody2D"] +material = SubResource( 1 ) +collision_layer = 0 +collision_mask = 26 +continuous_cd = 2 +contacts_reported = 1 +contact_monitor = true +script = ExtResource( 2 ) + +[node name="Particles2D" type="Particles2D" parent="."] +material = SubResource( 2 ) +lifetime = 0.3 +speed_scale = 3.0 +local_coords = false +process_material = SubResource( 3 ) +texture = ExtResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] +material = SubResource( 4 ) +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 5 ) + +[node name="Timer" type="Timer" parent="."] +one_shot = true +autostart = true + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/destroy = SubResource( 6 ) +[connection signal="body_entered" from="." to="." method="_on_body_entered"] +[connection signal="timeout" from="Timer" to="." method="destroy"] diff --git a/platformer-2d-rework/src/Objects/Coin.gd b/platformer-2d-rework/src/Objects/Coin.gd new file mode 100644 index 0000000..7ea2b6e --- /dev/null +++ b/platformer-2d-rework/src/Objects/Coin.gd @@ -0,0 +1,24 @@ +extends Area2D +class_name Coin +""" +Collectible that disappears when the player touches it. +""" + +onready var animation_player: AnimationPlayer = $AnimationPlayer + +""" +The Coins only detects collisions with the Player thanks to its collision mask. +This prevents other characters such as enemies from picking up coins. +""" +func _on_body_entered(body: Node) -> void: + picked() + + +""" +When the player collides with a coin, the coin plays its 'picked' animation. +The animation takes cares of making the coin disappear, but also deactivates its collisions +and frees it from memory, saving us from writing more complex code. +Click the AnimationPlayer node to see the animation timeline. +""" +func picked() -> void: + animation_player.play("picked") diff --git a/platformer-2d-rework/src/Objects/Coin.tscn b/platformer-2d-rework/src/Objects/Coin.tscn new file mode 100644 index 0000000..7acad94 --- /dev/null +++ b/platformer-2d-rework/src/Objects/Coin.tscn @@ -0,0 +1,161 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://assets/art/coin/coin.png" type="Texture" id=2] +[ext_resource path="res://assets/audio/sfx/coin_pickup.wav" type="AudioStream" id=3] +[ext_resource path="res://src/Objects/Coin.gd" type="Script" id=4] + +[sub_resource type="Animation" id=1] +resource_name = "picked" +length = 1.5 +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0 ] +} +tracks/1/type = "method" +tracks/1/path = NodePath(".") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 1 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ ], +"method": "queue_free" +} ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Sprite:self_modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0.25, 1.25 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Pickup:playing") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 2, +"values": [ true ] +} +tracks/4/type = "value" +tracks/4/path = NodePath(".:monitoring") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ false ] +} +tracks/5/type = "value" +tracks/5/path = NodePath("Sprite:position") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/keys = { +"times": PoolRealArray( 0, 1.5 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Vector2( 0, 0 ), Vector2( 0, -42 ) ] +} + +[sub_resource type="Animation" id=2] +length = 1.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 0, 1, 2, 3, 2, 1, 0 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Sprite:position") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 2, +"values": [ Vector2( 0, 0 ) ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Sprite:self_modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 2, +"values": [ Color( 1, 1, 1, 1 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath(".:monitoring") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 2, +"values": [ true ] +} + +[sub_resource type="CircleShape2D" id=3] + +[node name="Coin" type="Area2D"] +monitorable = false +collision_layer = 0 +script = ExtResource( 4 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 2 ) +hframes = 4 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +autoplay = "spinning" +playback_speed = 1.5 +anims/picked = SubResource( 1 ) +anims/spinning = SubResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 3 ) + +[node name="Pickup" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource( 3 ) +[connection signal="body_entered" from="." to="." method="_on_body_entered" flags=6] diff --git a/platformer-2d-rework/src/ParallaxBackground.tscn b/platformer-2d-rework/src/ParallaxBackground.tscn new file mode 100644 index 0000000..ebfee2d --- /dev/null +++ b/platformer-2d-rework/src/ParallaxBackground.tscn @@ -0,0 +1,75 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://assets/art/background/sky.png" type="Texture" id=1] +[ext_resource path="res://assets/art/background/cloud_1.png" type="Texture" id=2] +[ext_resource path="res://assets/art/background/cloud_2.png" type="Texture" id=3] +[ext_resource path="res://assets/art/background/cloud_3.png" type="Texture" id=4] +[ext_resource path="res://assets/art/background/distant_platforms_2.png" type="Texture" id=5] +[ext_resource path="res://assets/art/background/distant_platforms_1.png" type="Texture" id=6] + +[node name="ParallaxBackground" type="ParallaxBackground"] +scroll_base_scale = Vector2( 0.7, 0 ) + +[node name="Sky" type="ParallaxLayer" parent="."] +motion_mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="Sky"] +scale = Vector2( 32, 0.94 ) +texture = ExtResource( 1 ) +centered = false + +[node name="Clouds" type="ParallaxLayer" parent="."] +motion_scale = Vector2( 0.1, 1 ) +motion_mirroring = Vector2( 800, 0 ) + +[node name="Sprite1" type="Sprite" parent="Clouds"] +position = Vector2( 28, 127 ) +texture = ExtResource( 2 ) +centered = false + +[node name="Sprite2" type="Sprite" parent="Clouds"] +position = Vector2( 404, 24 ) +texture = ExtResource( 2 ) +centered = false + +[node name="Sprite3" type="Sprite" parent="Clouds"] +position = Vector2( 154, 46 ) +texture = ExtResource( 3 ) +centered = false + +[node name="Sprite4" type="Sprite" parent="Clouds"] +position = Vector2( 525, 130 ) +texture = ExtResource( 3 ) +centered = false + +[node name="Sprite5" type="Sprite" parent="Clouds"] +position = Vector2( 255, 158 ) +texture = ExtResource( 4 ) +centered = false + +[node name="Sprite6" type="Sprite" parent="Clouds"] +position = Vector2( 674, 70 ) +texture = ExtResource( 4 ) +centered = false + +[node name="MountainsFar" type="ParallaxLayer" parent="."] +motion_scale = Vector2( 0.2, 1 ) +motion_mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="MountainsFar"] +position = Vector2( 0, 225 ) +texture = ExtResource( 5 ) +centered = false +region_enabled = true +region_rect = Rect2( 0, 0, 800, 256 ) + +[node name="MountainsClose" type="ParallaxLayer" parent="."] +motion_scale = Vector2( 0.4, 1 ) +motion_mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="MountainsClose"] +position = Vector2( 0, 225 ) +texture = ExtResource( 6 ) +centered = false +region_enabled = true +region_rect = Rect2( 0, 0, 800, 256 ) diff --git a/platformer-2d-rework/src/Platforms/MovingPlatform.gd b/platformer-2d-rework/src/Platforms/MovingPlatform.gd new file mode 100644 index 0000000..68ee64a --- /dev/null +++ b/platformer-2d-rework/src/Platforms/MovingPlatform.gd @@ -0,0 +1,9 @@ +extends Node2D +class_name MovingPlatform + + +onready var animation_player: AnimationPlayer = $AnimationPlayer + + +func _ready() -> void: + animation_player.play("move") diff --git a/platformer-2d-rework/src/Platforms/MovingPlatform.tscn b/platformer-2d-rework/src/Platforms/MovingPlatform.tscn new file mode 100644 index 0000000..88e38b2 --- /dev/null +++ b/platformer-2d-rework/src/Platforms/MovingPlatform.tscn @@ -0,0 +1,39 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://src/Platforms/MovingPlatform.gd" type="Script" id=1] +[ext_resource path="res://assets/art/platforms/moving_platform.png" type="Texture" id=2] + +[sub_resource type="Animation" id=1] +resource_name = "move" +length = 4.0 +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("KinematicBody2D:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 1, 3 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ Vector2( 0, 0 ), Vector2( 64, 0 ), Vector2( -64, 0 ) ] +} + +[node name="MovingPlatform" type="Node2D"] +script = ExtResource( 1 ) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/move = SubResource( 1 ) + +[node name="KinematicBody2D" type="KinematicBody2D" parent="."] +collision_layer = 8 +collision_mask = 0 +motion/sync_to_physics = true + +[node name="Sprite" type="Sprite" parent="KinematicBody2D"] +texture = ExtResource( 2 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="KinematicBody2D"] +polygon = PoolVector2Array( -88, -24, 88, -24, 88, 0, -88, 0 ) +one_way_collision = true diff --git a/platformer-2d-rework/src/Stage.tscn b/platformer-2d-rework/src/Stage.tscn new file mode 100644 index 0000000..0f791d5 --- /dev/null +++ b/platformer-2d-rework/src/Stage.tscn @@ -0,0 +1,180 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://assets/art/tileset/tileset.tres" type="TileSet" id=1] +[ext_resource path="res://src/Actors/Enemy.tscn" type="PackedScene" id=2] +[ext_resource path="res://src/Platforms/MovingPlatform.tscn" type="PackedScene" id=3] +[ext_resource path="res://src/Objects/Coin.tscn" type="PackedScene" id=4] +[ext_resource path="res://src/Actors/Player.tscn" type="PackedScene" id=5] +[ext_resource path="res://src/ParallaxBackground.tscn" type="PackedScene" id=7] +[ext_resource path="res://assets/audio/music/music.ogg" type="AudioStream" id=8] + +[node name="Stage" type="Node"] + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource( 1 ) +collision_layer = 16 +collision_mask = 0 +format = 1 +tile_data = PoolIntArray( -65546, 536870913, 0, -65545, 1, 0, -131044, 536870913, 0, -131043, 1, 0, -10, 536870915, 0, -9, 3, 0, -65508, 536870915, 0, -65507, 3, 0, 65526, 536870915, 0, 65527, 3, 0, 28, 536870915, 0, 29, 3, 0, 131062, 536870915, 0, 131063, 3, 0, 65564, 536870915, 0, 65565, 3, 0, 196598, 536870915, 0, 196599, 3, 0, 131080, 536870913, 0, 131081, 0, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 1, 0, 131100, 536870915, 0, 131101, 3, 0, 262134, 536870915, 0, 262135, 3, 0, 196616, 536870921, 0, 196617, 8, 0, 196618, 8, 0, 196619, 8, 0, 196620, 8, 0, 196621, 9, 0, 196626, 536870913, 0, 196627, 0, 0, 196628, 0, 0, 196629, 0, 0, 196630, 0, 0, 196631, 0, 0, 196632, 0, 0, 196633, 0, 0, 196634, 0, 0, 196635, 0, 0, 196636, 536870916, 0, 196637, 3, 0, 327670, 536870915, 0, 327671, 3, 0, 262149, 536870918, 0, 262150, 6, 0, 262162, 536870921, 0, 262163, 536870920, 0, 262164, 536870920, 0, 262165, 536870920, 0, 262166, 536870920, 0, 262167, 536870922, 0, 262168, 7, 0, 262169, 7, 0, 262170, 7, 0, 262171, 7, 0, 262172, 7, 0, 262173, 3, 0, 393206, 536870915, 0, 393207, 3, 0, 327682, 536870918, 0, 327683, 6, 0, 327703, 536870921, 0, 327704, 536870920, 0, 327705, 536870922, 0, 327706, 7, 0, 327707, 7, 0, 327708, 7, 0, 327709, 3, 0, 458742, 536870915, 0, 458743, 4, 0, 458744, 0, 0, 458745, 0, 0, 458746, 1, 0, 393241, 536870921, 0, 393242, 536870920, 0, 393243, 536870920, 0, 393244, 536870922, 0, 393245, 3, 0, 524278, 536870915, 0, 524279, 536870919, 0, 524280, 536870919, 0, 524281, 536870919, 0, 524282, 3, 0, 458754, 536870913, 0, 458755, 0, 0, 458756, 0, 0, 458757, 2, 0, 458764, 536870913, 0, 458765, 1, 0, 458780, 536870915, 0, 458781, 3, 0, 589814, 536870915, 0, 589815, 536870919, 0, 589816, 536870919, 0, 589817, 536870919, 0, 589818, 3, 0, 524290, 536870915, 0, 524291, 7, 0, 524292, 7, 0, 524294, 536870912, 0, 524295, 536870912, 0, 524296, 536870912, 0, 524297, 536870912, 0, 524298, 536870912, 0, 524299, 536870912, 0, 524300, 536870916, 0, 524301, 3, 0, 524316, 536870915, 0, 524317, 3, 0, 655350, 536870915, 0, 655351, 536870919, 0, 655352, 536870919, 0, 655353, 536870919, 0, 655354, 3, 0, 589826, 536870915, 0, 589827, 7, 0, 589828, 7, 0, 589829, 7, 0, 589830, 7, 0, 589831, 7, 0, 589832, 7, 0, 589833, 7, 0, 589834, 7, 0, 589835, 7, 0, 589836, 7, 0, 589837, 7, 0, 589838, 0, 0, 589839, 1, 0, 589852, 536870915, 0, 589853, 3, 0, 720886, 536870915, 0, 720887, 536870919, 0, 720888, 536870919, 0, 720889, 536870919, 0, 720890, 3, 0, 655362, 536870921, 0, 655363, 536870920, 0, 655364, 536870920, 0, 655365, 536870920, 0, 655366, 536870920, 0, 655367, 536870920, 0, 655368, 536870920, 0, 655369, 536870920, 0, 655370, 536870920, 0, 655371, 536870920, 0, 655372, 536870920, 0, 655373, 536870920, 0, 655374, 536870920, 0, 655375, 9, 0, 655388, 536870915, 0, 655389, 3, 0, 786422, 536870915, 0, 786423, 536870919, 0, 786424, 536870919, 0, 786425, 536870919, 0, 786426, 3, 0, 720924, 536870915, 0, 720925, 3, 0, 851958, 536870915, 0, 851959, 536870919, 0, 851960, 536870919, 0, 851961, 536870919, 0, 851962, 3, 0, 786456, 536870918, 0, 786457, 536870917, 0, 786458, 6, 0, 786460, 536870915, 0, 786461, 3, 0, 917494, 536870915, 0, 917495, 536870919, 0, 917496, 536870919, 0, 917497, 536870919, 0, 917498, 4, 0, 917499, 0, 0, 917500, 0, 0, 917501, 0, 0, 917502, 0, 0, 917503, 0, 0, 851968, 0, 0, 851969, 1, 0, 851996, 536870915, 0, 851997, 3, 0, 983030, 536870915, 0, 983031, 536870919, 0, 983032, 536870919, 0, 983033, 536870919, 0, 983034, 536870919, 0, 983035, 536870919, 0, 983036, 536870919, 0, 983037, 536870919, 0, 983038, 536870919, 0, 983039, 536870919, 0, 917504, 536870919, 0, 917505, 3, 0, 917527, 536870913, 0, 917528, 536870912, 0, 917529, 0, 0, 917530, 536870912, 0, 917531, 536870912, 0, 917532, 536870916, 0, 917533, 3, 0, 1048566, 536870915, 0, 1048567, 536870919, 0, 1048568, 536870919, 0, 1048569, 536870919, 0, 1048570, 536870919, 0, 1048571, 536870919, 0, 1048572, 536870919, 0, 1048573, 536870919, 0, 1048574, 536870919, 0, 1048575, 536870919, 0, 983040, 536870919, 0, 983041, 3, 0, 983057, 536870918, 0, 983058, 5, 0, 983059, 6, 0, 983063, 536870915, 0, 983064, 7, 0, 983065, 7, 0, 983066, 7, 0, 983067, 7, 0, 983068, 7, 0, 983069, 3, 0, 1114102, 536870915, 0, 1114103, 536870919, 0, 1114104, 536870919, 0, 1114105, 536870919, 0, 1114106, 536870919, 0, 1114107, 536870919, 0, 1114108, 536870919, 0, 1114109, 536870919, 0, 1114110, 536870919, 0, 1114111, 536870919, 0, 1048576, 536870919, 0, 1048577, 3, 0, 1048579, 536870926, 0, 1048599, 536870915, 0, 1048600, 7, 0, 1048601, 7, 0, 1048602, 7, 0, 1048603, 7, 0, 1048604, 7, 0, 1048605, 3, 0, 1179638, 536870915, 0, 1179639, 536870919, 0, 1179640, 536870919, 0, 1179641, 536870919, 0, 1179642, 536870919, 0, 1179643, 536870919, 0, 1179644, 536870919, 0, 1179645, 536870919, 0, 1179646, 536870919, 0, 1179647, 536870919, 0, 1114112, 536870919, 0, 1114113, 4, 0, 1114114, 0, 0, 1114115, 536870925, 0, 1114116, 0, 0, 1114117, 2, 0, 1114123, 536870926, 0, 1114126, 536870918, 0, 1114127, 5, 0, 1114128, 6, 0, 1114134, 536870914, 0, 1114135, 536870916, 0, 1114136, 7, 0, 1114137, 7, 0, 1114138, 7, 0, 1114139, 7, 0, 1114140, 7, 0, 1114141, 3, 0, 1245174, 536870915, 0, 1245175, 536870919, 0, 1245176, 536870919, 0, 1245177, 536870919, 0, 1245178, 536870919, 0, 1245179, 536870919, 0, 1245180, 536870919, 0, 1245181, 536870919, 0, 1245182, 536870919, 0, 1245183, 536870919, 0, 1179648, 536870919, 0, 1179649, 536870919, 0, 1179650, 536870919, 0, 1179651, 536870919, 0, 1179652, 536870922, 0, 1179654, 2, 0, 1179658, 536870913, 0, 1179659, 536870925, 0, 1179660, 1, 0, 1179669, 536870914, 0, 1179671, 7, 0, 1179672, 7, 0, 1179673, 7, 0, 1179674, 7, 0, 1179675, 7, 0, 1179676, 7, 0, 1179677, 3, 0, 1310710, 536870915, 0, 1310711, 536870919, 0, 1310712, 536870919, 0, 1310713, 536870919, 0, 1310714, 536870919, 0, 1310715, 536870919, 0, 1310716, 536870919, 0, 1310717, 536870919, 0, 1310718, 536870919, 0, 1310719, 536870919, 0, 1245184, 536870919, 0, 1245185, 536870919, 0, 1245186, 536870919, 0, 1245187, 536870919, 0, 1245188, 536870919, 0, 1245189, 536870922, 0, 1245191, 2, 0, 1245194, 536870915, 0, 1245195, 7, 0, 1245196, 3, 0, 1245204, 536870914, 0, 1245206, 7, 0, 1245207, 7, 0, 1245208, 7, 0, 1245209, 7, 0, 1245210, 7, 0, 1245211, 7, 0, 1245212, 7, 0, 1245213, 3, 0, 1376246, 536870915, 0, 1376247, 536870919, 0, 1376248, 536870919, 0, 1376249, 536870919, 0, 1376250, 536870919, 0, 1376251, 536870919, 0, 1376252, 536870919, 0, 1376253, 536870919, 0, 1376254, 536870919, 0, 1376255, 536870919, 0, 1310720, 536870919, 0, 1310721, 536870919, 0, 1310722, 536870919, 0, 1310723, 536870919, 0, 1310724, 536870919, 0, 1310725, 536870919, 0, 1310726, 536870922, 0, 1310728, 536870912, 0, 1310729, 536870912, 0, 1310730, 536870916, 0, 1310731, 7, 0, 1310732, 4, 0, 1310733, 0, 0, 1310734, 0, 0, 1310735, 0, 0, 1310736, 0, 0, 1310737, 0, 0, 1310738, 0, 0, 1310739, 536870912, 0, 1310741, 7, 0, 1310742, 7, 0, 1310743, 7, 0, 1310744, 7, 0, 1310745, 7, 0, 1310746, 7, 0, 1310747, 7, 0, 1310748, 7, 0, 1310749, 3, 0, 1441782, 536870921, 0, 1441783, 536870920, 0, 1441784, 536870920, 0, 1441785, 536870920, 0, 1441786, 536870920, 0, 1441787, 536870920, 0, 1441788, 536870920, 0, 1441789, 536870920, 0, 1441790, 536870920, 0, 1441791, 536870920, 0, 1376256, 536870920, 0, 1376257, 536870920, 0, 1376258, 536870920, 0, 1376259, 536870920, 0, 1376260, 536870920, 0, 1376261, 536870920, 0, 1376262, 536870920, 0, 1376263, 536870920, 0, 1376264, 536870920, 0, 1376265, 536870920, 0, 1376266, 536870920, 0, 1376267, 536870920, 0, 1376268, 536870920, 0, 1376269, 536870920, 0, 1376270, 536870920, 0, 1376271, 536870920, 0, 1376272, 536870920, 0, 1376273, 536870920, 0, 1376274, 536870920, 0, 1376275, 536870920, 0, 1376276, 536870920, 0, 1376277, 536870920, 0, 1376278, 536870920, 0, 1376279, 536870920, 0, 1376280, 536870920, 0, 1376281, 536870920, 0, 1376282, 536870920, 0, 1376283, 536870920, 0, 1376284, 8, 0, 1376285, 9, 0 ) + +[node name="Player" parent="." instance=ExtResource( 5 )] +position = Vector2( 295.269, 1054.17 ) + +[node name="Coins" type="Node" parent="."] + +[node name="CoinsArc" type="Node2D" parent="Coins"] +position = Vector2( 539.755, 1147.54 ) + +[node name="Coin" parent="Coins/CoinsArc" instance=ExtResource( 4 )] +position = Vector2( -29.4628, 59.9619 ) + +[node name="Coin2" parent="Coins/CoinsArc" instance=ExtResource( 4 )] +position = Vector2( 0.171143, 0.141846 ) + +[node name="Coin3" parent="Coins/CoinsArc" instance=ExtResource( 4 )] +position = Vector2( 62.5472, -35.7081 ) + +[node name="CoinsVertical" type="Node2D" parent="Coins"] +position = Vector2( 732.045, 1037.88 ) + +[node name="Coin" parent="Coins/CoinsVertical" instance=ExtResource( 4 )] +position = Vector2( -0.110291, 31.8701 ) + +[node name="Coin2" parent="Coins/CoinsVertical" instance=ExtResource( 4 )] +position = Vector2( -0.110291, -0.129883 ) + +[node name="Coin3" parent="Coins/CoinsVertical" instance=ExtResource( 4 )] +position = Vector2( -0.110291, -32.1299 ) + +[node name="CoinsVertical2" type="Node2D" parent="Coins"] +position = Vector2( 1018.11, -17.9731 ) + +[node name="Coin" parent="Coins/CoinsVertical2" instance=ExtResource( 4 )] +position = Vector2( -0.110291, 31.8701 ) + +[node name="Coin2" parent="Coins/CoinsVertical2" instance=ExtResource( 4 )] +position = Vector2( -0.110291, -0.129883 ) + +[node name="Coin3" parent="Coins/CoinsVertical2" instance=ExtResource( 4 )] +position = Vector2( -0.110291, -32.1299 ) + +[node name="CoinsSquare" type="Node2D" parent="Coins"] +position = Vector2( -429.669, 323.199 ) + +[node name="Coin" parent="Coins/CoinsSquare" instance=ExtResource( 4 )] +position = Vector2( -32, -32 ) + +[node name="Coin2" parent="Coins/CoinsSquare" instance=ExtResource( 4 )] +position = Vector2( 32, -32 ) + +[node name="Coin3" parent="Coins/CoinsSquare" instance=ExtResource( 4 )] +position = Vector2( -32, 32 ) + +[node name="Coin4" parent="Coins/CoinsSquare" instance=ExtResource( 4 )] +position = Vector2( 32, 32 ) + +[node name="CoinsSquare2" type="Node2D" parent="Coins"] +position = Vector2( 695.105, 66.9483 ) + +[node name="Coin" parent="Coins/CoinsSquare2" instance=ExtResource( 4 )] +position = Vector2( -32, -32 ) + +[node name="Coin2" parent="Coins/CoinsSquare2" instance=ExtResource( 4 )] +position = Vector2( 32, -32 ) + +[node name="Coin3" parent="Coins/CoinsSquare2" instance=ExtResource( 4 )] +position = Vector2( -32, 32 ) + +[node name="Coin4" parent="Coins/CoinsSquare2" instance=ExtResource( 4 )] +position = Vector2( 32, 32 ) + +[node name="CoinsSquare3" type="Node2D" parent="Coins"] +position = Vector2( 1353.17, 117.285 ) + +[node name="Coin" parent="Coins/CoinsSquare3" instance=ExtResource( 4 )] +position = Vector2( -32, -32 ) + +[node name="Coin2" parent="Coins/CoinsSquare3" instance=ExtResource( 4 )] +position = Vector2( 32, -32 ) + +[node name="Coin3" parent="Coins/CoinsSquare3" instance=ExtResource( 4 )] +position = Vector2( -32, 32 ) + +[node name="Coin4" parent="Coins/CoinsSquare3" instance=ExtResource( 4 )] +position = Vector2( 32, 32 ) + +[node name="CoinsSquare4" type="Node2D" parent="Coins"] +position = Vector2( 1592.58, 117.285 ) + +[node name="Coin" parent="Coins/CoinsSquare4" instance=ExtResource( 4 )] +position = Vector2( -32, -32 ) + +[node name="Coin2" parent="Coins/CoinsSquare4" instance=ExtResource( 4 )] +position = Vector2( 32, -32 ) + +[node name="Coin3" parent="Coins/CoinsSquare4" instance=ExtResource( 4 )] +position = Vector2( -32, 32 ) + +[node name="Coin4" parent="Coins/CoinsSquare4" instance=ExtResource( 4 )] +position = Vector2( 32, 32 ) + +[node name="CoinsHorizontal" type="Node2D" parent="Coins"] +position = Vector2( -155.326, 799.28 ) + +[node name="Coin" parent="Coins/CoinsHorizontal" instance=ExtResource( 4 )] +position = Vector2( -32, 0 ) + +[node name="Coin2" parent="Coins/CoinsHorizontal" instance=ExtResource( 4 )] + +[node name="Coin3" parent="Coins/CoinsHorizontal" instance=ExtResource( 4 )] +position = Vector2( 32, 0 ) + +[node name="CoinsHorizontal2" type="Node2D" parent="Coins"] +position = Vector2( 1368.21, 828.089 ) + +[node name="Coin" parent="Coins/CoinsHorizontal2" instance=ExtResource( 4 )] +position = Vector2( -32, 0 ) + +[node name="Coin2" parent="Coins/CoinsHorizontal2" instance=ExtResource( 4 )] + +[node name="Coin3" parent="Coins/CoinsHorizontal2" instance=ExtResource( 4 )] +position = Vector2( 32, 0 ) + +[node name="CoinsHorizontal3" type="Node2D" parent="Coins"] +position = Vector2( 671.17, 340.245 ) + +[node name="Coin" parent="Coins/CoinsHorizontal3" instance=ExtResource( 4 )] +position = Vector2( -32, 0 ) + +[node name="Coin2" parent="Coins/CoinsHorizontal3" instance=ExtResource( 4 )] + +[node name="Coin3" parent="Coins/CoinsHorizontal3" instance=ExtResource( 4 )] +position = Vector2( 32, 0 ) + +[node name="Platforms" type="Node" parent="."] + +[node name="MovingPlatform" parent="Platforms" instance=ExtResource( 3 )] +position = Vector2( 1280, 704.71 ) + +[node name="MovingPlatform2" parent="Platforms" instance=ExtResource( 3 )] +position = Vector2( -96, 448 ) + +[node name="Enemies" type="Node" parent="."] + +[node name="Enemy" parent="Enemies" instance=ExtResource( 2 )] +position = Vector2( 542.081, 491.279 ) + +[node name="Enemy2" parent="Enemies" instance=ExtResource( 2 )] +position = Vector2( 692.218, 97.1263 ) + +[node name="Enemy3" parent="Enemies" instance=ExtResource( 2 )] +position = Vector2( 1265.45, 157.109 ) + +[node name="Enemy4" parent="Enemies" instance=ExtResource( 2 )] +position = Vector2( 1657.03, 154.524 ) + +[node name="ParallaxBackground" parent="." instance=ExtResource( 7 )] + +[node name="Music" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 8 ) +autoplay = true