diff --git a/project/README.md b/project/README.md new file mode 100644 index 0000000..4460a4c --- /dev/null +++ b/project/README.md @@ -0,0 +1,34 @@ +# Physics Platformer + +This demo uses [`RigidBody2D`](https://docs.godotengine.org/en/latest/classes/class_rigidbody2d.html) +for the player and enemies. +These character controllers are more powerful than +[`CharacterBody2D`](https://docs.godotengine.org/en/latest/classes/class_characterbody2d.html), +but can be more difficult to handle, as they require +manual modification of the RigidDynamicBody velocity. + +Language: GDScript + +Renderer: Forward+ + +Check out this demo on the asset library: https://godotengine.org/asset-library/asset/119 + +## How does it work? + +The player and enemies use dynamic character +controllers for movement, made with +[`RigidBody2D`](https://docs.godotengine.org/en/latest/classes/class_rigidbody2d.html), +which means that they can perfectly interact with physics +(there is a see-saw, and you can even ride enemies). +Because of this, all movement must be done in sync with +the physics engine, inside of `_integrate_forces()`. + +## Screenshots + +![Screenshot of the beginning](screenshots/beginning.png) + +![Screenshot of the seesaw and the player riding an enemy](screenshots/seesaw-riding.png) + +## Music + +"Pompy" by Hubert Lamontagne (madbr) https://soundcloud.com/madbr/pompy diff --git a/project/audio/music.ogg b/project/audio/music.ogg new file mode 100644 index 0000000..ed3e9f0 Binary files /dev/null and b/project/audio/music.ogg differ diff --git a/project/audio/music.ogg.import b/project/audio/music.ogg.import new file mode 100644 index 0000000..a80b8e4 --- /dev/null +++ b/project/audio/music.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://gunv00cij80t" +path="res://.godot/imported/music.ogg-552a37c4bfe46d894cb8004cf1c345ad.oggvorbisstr" + +[deps] + +source_file="res://audio/music.ogg" +dest_files=["res://.godot/imported/music.ogg-552a37c4bfe46d894cb8004cf1c345ad.oggvorbisstr"] + +[params] + +loop=true +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/project/audio/sound_coin.wav b/project/audio/sound_coin.wav new file mode 100644 index 0000000..e78579f Binary files /dev/null and b/project/audio/sound_coin.wav differ diff --git a/project/audio/sound_coin.wav.import b/project/audio/sound_coin.wav.import new file mode 100644 index 0000000..2e7f227 --- /dev/null +++ b/project/audio/sound_coin.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cy7lxrapbqu1r" +path="res://.godot/imported/sound_coin.wav-e18cceeba8b7dc02bbb940b85bcad99a.sample" + +[deps] + +source_file="res://audio/sound_coin.wav" +dest_files=["res://.godot/imported/sound_coin.wav-e18cceeba8b7dc02bbb940b85bcad99a.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_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/project/audio/sound_explode.wav b/project/audio/sound_explode.wav new file mode 100644 index 0000000..229c853 Binary files /dev/null and b/project/audio/sound_explode.wav differ diff --git a/project/audio/sound_explode.wav.import b/project/audio/sound_explode.wav.import new file mode 100644 index 0000000..750fe3c --- /dev/null +++ b/project/audio/sound_explode.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://bulmr2lpb7y4h" +path="res://.godot/imported/sound_explode.wav-536668d880bfb277b9e5253774598e9e.sample" + +[deps] + +source_file="res://audio/sound_explode.wav" +dest_files=["res://.godot/imported/sound_explode.wav-536668d880bfb277b9e5253774598e9e.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_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/project/audio/sound_hit.wav b/project/audio/sound_hit.wav new file mode 100644 index 0000000..4fb3b13 Binary files /dev/null and b/project/audio/sound_hit.wav differ diff --git a/project/audio/sound_hit.wav.import b/project/audio/sound_hit.wav.import new file mode 100644 index 0000000..38059b0 --- /dev/null +++ b/project/audio/sound_hit.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cfssio7r2t7wq" +path="res://.godot/imported/sound_hit.wav-6c98c4eeb2c6ac3fc45dc4a7ebd8602f.sample" + +[deps] + +source_file="res://audio/sound_hit.wav" +dest_files=["res://.godot/imported/sound_hit.wav-6c98c4eeb2c6ac3fc45dc4a7ebd8602f.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_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/project/audio/sound_jump.wav b/project/audio/sound_jump.wav new file mode 100644 index 0000000..e9942e6 Binary files /dev/null and b/project/audio/sound_jump.wav differ diff --git a/project/audio/sound_jump.wav.import b/project/audio/sound_jump.wav.import new file mode 100644 index 0000000..f11efeb --- /dev/null +++ b/project/audio/sound_jump.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://bpyko2i13mj0v" +path="res://.godot/imported/sound_jump.wav-7e05b84e4426c7461dd15838765e210b.sample" + +[deps] + +source_file="res://audio/sound_jump.wav" +dest_files=["res://.godot/imported/sound_jump.wav-7e05b84e4426c7461dd15838765e210b.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_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/project/audio/sound_shoot.wav b/project/audio/sound_shoot.wav new file mode 100644 index 0000000..ad74f32 Binary files /dev/null and b/project/audio/sound_shoot.wav differ diff --git a/project/audio/sound_shoot.wav.import b/project/audio/sound_shoot.wav.import new file mode 100644 index 0000000..2923018 --- /dev/null +++ b/project/audio/sound_shoot.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://gw2a4ii0oby2" +path="res://.godot/imported/sound_shoot.wav-a37772efd1dbcd76c4fe35742f502bb7.sample" + +[deps] + +source_file="res://audio/sound_shoot.wav" +dest_files=["res://.godot/imported/sound_shoot.wav-a37772efd1dbcd76c4fe35742f502bb7.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_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/project/background/parallax_bg.tscn b/project/background/parallax_bg.tscn new file mode 100644 index 0000000..b8a8c14 --- /dev/null +++ b/project/background/parallax_bg.tscn @@ -0,0 +1,74 @@ +[gd_scene load_steps=7 format=3 uid="uid://csdn3dwkaprow"] + +[ext_resource type="Texture2D" uid="uid://obtbrlptthky" path="res://background/scroll_bg_sky.png" id="1"] +[ext_resource type="Texture2D" uid="uid://udnu8aekj8mh" path="res://background/scroll_bg_cloud_1.png" id="2"] +[ext_resource type="Texture2D" uid="uid://crkm8guj5obto" path="res://background/scroll_bg_cloud_2.png" id="3"] +[ext_resource type="Texture2D" uid="uid://bb8syr2l4kbwp" path="res://background/scroll_bg_cloud_3.png" id="4"] +[ext_resource type="Texture2D" uid="uid://bitu0xunnhbjf" path="res://background/scroll_bg_fg_2.png" id="5"] +[ext_resource type="Texture2D" uid="uid://bdhblhpgjebrc" path="res://background/scroll_bg_fg_1.png" id="6"] + +[node name="ParallaxBg" type="ParallaxBackground"] +scroll_base_scale = Vector2(0.7, 0) + +[node name="Sky" type="ParallaxLayer" parent="."] +motion_mirroring = Vector2(400, 0) + +[node name="Sprite2D" type="Sprite2D" parent="Sky"] +scale = Vector2(1000, 0.94) +texture = ExtResource("1") +centered = false +offset = Vector2(-15, 0) + +[node name="Clouds" type="ParallaxLayer" parent="."] +motion_scale = Vector2(0.1, 1) +motion_mirroring = Vector2(400, 0) + +[node name="Sprite1" type="Sprite2D" parent="Clouds"] +position = Vector2(14, 64) +texture = ExtResource("2") +centered = false + +[node name="Sprite2" type="Sprite2D" parent="Clouds"] +position = Vector2(202, 12) +texture = ExtResource("2") +centered = false + +[node name="Sprite3" type="Sprite2D" parent="Clouds"] +position = Vector2(77, 23) +texture = ExtResource("3") +centered = false + +[node name="Sprite4" type="Sprite2D" parent="Clouds"] +position = Vector2(272, 65) +texture = ExtResource("3") +centered = false + +[node name="Sprite5" type="Sprite2D" parent="Clouds"] +position = Vector2(127, 79) +texture = ExtResource("4") +centered = false + +[node name="Sprite6" type="Sprite2D" parent="Clouds"] +position = Vector2(337, 35) +texture = ExtResource("4") +centered = false + +[node name="Mount2" type="ParallaxLayer" parent="."] +motion_scale = Vector2(0.2, 1) +motion_mirroring = Vector2(400, 0) + +[node name="Sprite2D" type="Sprite2D" parent="Mount2"] +position = Vector2(0, 113) +texture = ExtResource("5") +centered = false +region_rect = Rect2(0, 0, 400, 128) + +[node name="Mount1" type="ParallaxLayer" parent="."] +motion_scale = Vector2(0.4, 1) +motion_mirroring = Vector2(400, 0) + +[node name="Sprite2D" type="Sprite2D" parent="Mount1"] +position = Vector2(0, 113) +texture = ExtResource("6") +centered = false +region_rect = Rect2(0, 0, 400, 128) diff --git a/project/background/plank.png b/project/background/plank.png new file mode 100644 index 0000000..202f496 Binary files /dev/null and b/project/background/plank.png differ diff --git a/project/icon.svg.import b/project/background/plank.png.import similarity index 62% rename from project/icon.svg.import rename to project/background/plank.png.import index 869157e..4a23870 100644 --- a/project/icon.svg.import +++ b/project/background/plank.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://bwfkmwx6bd5u4" -path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +uid="uid://c3w6uvr4jjkwa" +path="res://.godot/imported/plank.png-d70731fc82f225d8353819786c2ed28a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://icon.svg" -dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] +source_file="res://background/plank.png" +dest_files=["res://.godot/imported/plank.png-d70731fc82f225d8353819786c2ed28a.ctex"] [params] @@ -32,6 +32,3 @@ process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=false -editor/convert_colors_with_editor_theme=false diff --git a/project/background/plankpin.png b/project/background/plankpin.png new file mode 100644 index 0000000..20791d3 Binary files /dev/null and b/project/background/plankpin.png differ diff --git a/project/background/plankpin.png.import b/project/background/plankpin.png.import new file mode 100644 index 0000000..8cd0811 --- /dev/null +++ b/project/background/plankpin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ci8y3ieuf3ltc" +path="res://.godot/imported/plankpin.png-68d06cc4b9ab95f9d0142d1a4c768140.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://background/plankpin.png" +dest_files=["res://.godot/imported/plankpin.png-68d06cc4b9ab95f9d0142d1a4c768140.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/background/scroll_bg_cloud_1.png b/project/background/scroll_bg_cloud_1.png new file mode 100644 index 0000000..5f01d1b Binary files /dev/null and b/project/background/scroll_bg_cloud_1.png differ diff --git a/project/background/scroll_bg_cloud_1.png.import b/project/background/scroll_bg_cloud_1.png.import new file mode 100644 index 0000000..59bf052 --- /dev/null +++ b/project/background/scroll_bg_cloud_1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://udnu8aekj8mh" +path="res://.godot/imported/scroll_bg_cloud_1.png-19f55c25a7e1985c92542faa0106888e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://background/scroll_bg_cloud_1.png" +dest_files=["res://.godot/imported/scroll_bg_cloud_1.png-19f55c25a7e1985c92542faa0106888e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/background/scroll_bg_cloud_2.png b/project/background/scroll_bg_cloud_2.png new file mode 100644 index 0000000..68c985f Binary files /dev/null and b/project/background/scroll_bg_cloud_2.png differ diff --git a/project/background/scroll_bg_cloud_2.png.import b/project/background/scroll_bg_cloud_2.png.import new file mode 100644 index 0000000..8c8ae68 --- /dev/null +++ b/project/background/scroll_bg_cloud_2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://crkm8guj5obto" +path="res://.godot/imported/scroll_bg_cloud_2.png-869806dcc546591f3d754e3b845c61c9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://background/scroll_bg_cloud_2.png" +dest_files=["res://.godot/imported/scroll_bg_cloud_2.png-869806dcc546591f3d754e3b845c61c9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/background/scroll_bg_cloud_3.png b/project/background/scroll_bg_cloud_3.png new file mode 100644 index 0000000..998d6ff Binary files /dev/null and b/project/background/scroll_bg_cloud_3.png differ diff --git a/project/background/scroll_bg_cloud_3.png.import b/project/background/scroll_bg_cloud_3.png.import new file mode 100644 index 0000000..d5e1014 --- /dev/null +++ b/project/background/scroll_bg_cloud_3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bb8syr2l4kbwp" +path="res://.godot/imported/scroll_bg_cloud_3.png-831c6ed9fa8b4070081428a936bcc2f7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://background/scroll_bg_cloud_3.png" +dest_files=["res://.godot/imported/scroll_bg_cloud_3.png-831c6ed9fa8b4070081428a936bcc2f7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/background/scroll_bg_fg_1.png b/project/background/scroll_bg_fg_1.png new file mode 100644 index 0000000..08826e4 Binary files /dev/null and b/project/background/scroll_bg_fg_1.png differ diff --git a/project/background/scroll_bg_fg_1.png.import b/project/background/scroll_bg_fg_1.png.import new file mode 100644 index 0000000..78ffe66 --- /dev/null +++ b/project/background/scroll_bg_fg_1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bdhblhpgjebrc" +path="res://.godot/imported/scroll_bg_fg_1.png-20c90ebded5095c6863cdf6b1b82882d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://background/scroll_bg_fg_1.png" +dest_files=["res://.godot/imported/scroll_bg_fg_1.png-20c90ebded5095c6863cdf6b1b82882d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/background/scroll_bg_fg_2.png b/project/background/scroll_bg_fg_2.png new file mode 100644 index 0000000..e43baa9 Binary files /dev/null and b/project/background/scroll_bg_fg_2.png differ diff --git a/project/background/scroll_bg_fg_2.png.import b/project/background/scroll_bg_fg_2.png.import new file mode 100644 index 0000000..24b9592 --- /dev/null +++ b/project/background/scroll_bg_fg_2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bitu0xunnhbjf" +path="res://.godot/imported/scroll_bg_fg_2.png-2b54decd69e8aff2caa33640a336d1e9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://background/scroll_bg_fg_2.png" +dest_files=["res://.godot/imported/scroll_bg_fg_2.png-2b54decd69e8aff2caa33640a336d1e9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/background/scroll_bg_sky.png b/project/background/scroll_bg_sky.png new file mode 100644 index 0000000..13ba7b6 Binary files /dev/null and b/project/background/scroll_bg_sky.png differ diff --git a/project/background/scroll_bg_sky.png.import b/project/background/scroll_bg_sky.png.import new file mode 100644 index 0000000..b8a0210 --- /dev/null +++ b/project/background/scroll_bg_sky.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://obtbrlptthky" +path="res://.godot/imported/scroll_bg_sky.png-377ea542199b2e23d7a822ed940ea99e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://background/scroll_bg_sky.png" +dest_files=["res://.godot/imported/scroll_bg_sky.png-377ea542199b2e23d7a822ed940ea99e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/background/seesaw.tscn b/project/background/seesaw.tscn new file mode 100644 index 0000000..2c48f79 --- /dev/null +++ b/project/background/seesaw.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=5 format=3 uid="uid://rxbjx7rhfd8k"] + +[ext_resource type="Texture2D" uid="uid://c3w6uvr4jjkwa" path="res://background/plank.png" id="1"] +[ext_resource type="Texture2D" uid="uid://ci8y3ieuf3ltc" path="res://background/plankpin.png" id="2"] + +[sub_resource type="RectangleShape2D" id="1"] +size = Vector2(128, 8) + +[sub_resource type="RectangleShape2D" id="2"] +size = Vector2(16, 27) + +[node name="Seesaw" type="Node2D"] + +[node name="Plank" type="RigidBody2D" parent="."] +mass = 5.10204 + +[node name="Sprite2D" type="Sprite2D" parent="Plank"] +texture = ExtResource("1") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Plank"] +shape = SubResource("1") + +[node name="Pin" type="PinJoint2D" parent="."] +node_a = NodePath("../Plank") +node_b = NodePath("../Pillar") + +[node name="Pillar" type="StaticBody2D" parent="."] + +[node name="Sprite2D" type="Sprite2D" parent="Pillar"] +position = Vector2(0, 10) +texture = ExtResource("2") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Pillar"] +position = Vector2(0, 12.5) +shape = SubResource("2") diff --git a/project/coin/coin.gd b/project/coin/coin.gd new file mode 100644 index 0000000..6c83375 --- /dev/null +++ b/project/coin/coin.gd @@ -0,0 +1,8 @@ +class_name Coin +extends Area2D + +var taken = false + +func _on_body_enter(body): + if not taken and body is Player: + ($AnimationPlayer as AnimationPlayer).play("taken") diff --git a/project/coin/coin.png b/project/coin/coin.png new file mode 100644 index 0000000..2c966e5 Binary files /dev/null and b/project/coin/coin.png differ diff --git a/project/coin/coin.png.import b/project/coin/coin.png.import new file mode 100644 index 0000000..8809e6b --- /dev/null +++ b/project/coin/coin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bio1crwbvrmc2" +path="res://.godot/imported/coin.png-c9e5c2f51b2a10beb2d794afbbee004f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://coin/coin.png" +dest_files=["res://.godot/imported/coin.png-c9e5c2f51b2a10beb2d794afbbee004f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/coin/coin.tscn b/project/coin/coin.tscn new file mode 100644 index 0000000..3617c4d --- /dev/null +++ b/project/coin/coin.tscn @@ -0,0 +1,143 @@ +[gd_scene load_steps=11 format=3 uid="uid://6uilf6rad880"] + +[ext_resource type="Script" path="res://coin/coin.gd" id="1"] +[ext_resource type="Texture2D" uid="uid://bio1crwbvrmc2" path="res://coin/coin.png" id="2"] +[ext_resource type="AudioStream" uid="uid://cy7lxrapbqu1r" path="res://audio/sound_coin.wav" id="3"] +[ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="4"] + +[sub_resource type="Animation" id="1"] +resource_name = "spin" +length = 0.5 +loop_mode = 1 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.08325, 0.1665, 0.24975, 0.333, 0.41625, 0.4995), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 2, 1, 0] +} + +[sub_resource type="Animation" id="2"] +length = 3.0 +step = 0.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("GPUParticles3D:emitting") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/2/type = "method" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath(".") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(2.7), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"queue_free" +}] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Sound:playing") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("Sprite2D:self_modulate") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0, 0.41), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_4atuj"] +_data = { +"spin": SubResource("1"), +"taken": SubResource("2") +} + +[sub_resource type="CircleShape2D" id="3"] +radius = 5.0 + +[sub_resource type="CanvasItemMaterial" id="4"] +blend_mode = 1 + +[sub_resource type="Curve" id="5"] +_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.1, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 3 + +[node name="Coin" type="Area2D"] +script = ExtResource("1") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("2") +hframes = 4 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_4atuj") +} +autoplay = "spin" + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("3") + +[node name="Sound" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("3") + +[node name="GPUParticles3D" type="CPUParticles2D" parent="."] +modulate = Color(0.596078, 0.639216, 1, 1) +material = SubResource("4") +emitting = false +lifetime = 0.4 +one_shot = true +explosiveness = 0.7 +texture = ExtResource("4") +emission_shape = 1 +emission_sphere_radius = 4.0 +gravity = Vector2(0, 0) +scale_amount_curve = SubResource("5") + +[node name="Enabler" type="VisibleOnScreenEnabler2D" parent="."] +rect = Rect2(-5, -5, 10, 10) + +[connection signal="body_entered" from="." to="." method="_on_body_enter"] diff --git a/project/enemy/enemy.gd b/project/enemy/enemy.gd new file mode 100644 index 0000000..64fefb9 --- /dev/null +++ b/project/enemy/enemy.gd @@ -0,0 +1,87 @@ +class_name Enemy +extends RigidBody2D + + +const WALK_SPEED = 50 + +enum State { + WALKING, + DYING, +} + +var _state := State.WALKING + +var direction := -1 +var anim := "" + +@onready var rc_left := $RaycastLeft as RayCast2D +@onready var rc_right := $RaycastRight as RayCast2D + + +func _integrate_forces(state: PhysicsDirectBodyState2D) -> void: + var velocity := state.get_linear_velocity() + var new_anim := anim + + if _state == State.DYING: + new_anim = "explode" + elif _state == State.WALKING: + new_anim = "walk" + + var wall_side := 0.0 + + for collider_index in state.get_contact_count(): + var collider := state.get_contact_collider_object(collider_index) + var collision_normal := state.get_contact_local_normal(collider_index) + + if collider is Bullet and not (collider as Bullet).disabled: + _bullet_collider.call_deferred(collider, state, collision_normal) + break + + if collision_normal.x > 0.9: + wall_side = 1.0 + elif collision_normal.x < -0.9: + wall_side = -1.0 + + if wall_side != 0 and wall_side != direction: + direction = -direction + ($Sprite2D as Sprite2D).scale.x = -direction + if direction < 0 and not rc_left.is_colliding() and rc_right.is_colliding(): + direction = -direction + ($Sprite2D as Sprite2D).scale.x = -direction + elif direction > 0 and not rc_right.is_colliding() and rc_left.is_colliding(): + direction = -direction + ($Sprite2D as Sprite2D).scale.x = -direction + + velocity.x = direction * WALK_SPEED + + if anim != new_anim: + anim = new_anim + ($AnimationPlayer as AnimationPlayer).play(anim) + + state.set_linear_velocity(velocity) + + +func _die() -> void: + queue_free() + + +func _pre_explode() -> void: + #make sure nothing collides against this + $Shape1.queue_free() + $Shape2.queue_free() + $Shape3.queue_free() + + ($SoundExplode as AudioStreamPlayer2D).play() + + +func _bullet_collider( + collider: Bullet, + state: PhysicsDirectBodyState2D, + collision_normal: Vector2 +) -> void: + _state = State.DYING + + state.set_angular_velocity(signf(collision_normal.x) * 33.0) + physics_material_override.friction = 1 + collider.disable() + ($SoundHit as AudioStreamPlayer2D).play() diff --git a/project/enemy/enemy.png b/project/enemy/enemy.png new file mode 100644 index 0000000..5fcf950 Binary files /dev/null and b/project/enemy/enemy.png differ diff --git a/project/enemy/enemy.png.import b/project/enemy/enemy.png.import new file mode 100644 index 0000000..102cacd --- /dev/null +++ b/project/enemy/enemy.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://crrmmbu8k46tl" +path="res://.godot/imported/enemy.png-1891d9038eeed672a2459bc4e7db5910.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://enemy/enemy.png" +dest_files=["res://.godot/imported/enemy.png-1891d9038eeed672a2459bc4e7db5910.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/enemy/enemy.tscn b/project/enemy/enemy.tscn new file mode 100644 index 0000000..52f3542 --- /dev/null +++ b/project/enemy/enemy.tscn @@ -0,0 +1,202 @@ +[gd_scene load_steps=14 format=3 uid="uid://daqqtote00syu"] + +[ext_resource type="Script" path="res://enemy/enemy.gd" id="1_hjwkx"] +[ext_resource type="Texture2D" uid="uid://crrmmbu8k46tl" path="res://enemy/enemy.png" id="2_org2d"] +[ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="3_7unrb"] +[ext_resource type="AudioStream" uid="uid://cfssio7r2t7wq" path="res://audio/sound_hit.wav" id="4_5rkwm"] +[ext_resource type="AudioStream" uid="uid://bulmr2lpb7y4h" path="res://audio/sound_explode.wav" id="5_t2e2f"] + +[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_eyxlk"] + +[sub_resource type="Animation" id="Animation_a7qal"] +resource_name = "RESET" +length = 0.01 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Sprite2D:self_modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 1)] +} + +[sub_resource type="Animation" id="2"] +length = 6.0 +step = 0.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [4] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Explosion:emitting") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(1), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/2/type = "method" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath(".") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(1.04, 2), +"transitions": PackedFloat32Array(1, 1), +"values": [{ +"args": [], +"method": &"_pre_explode" +}, { +"args": [], +"method": &"_die" +}] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Sprite2D:self_modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0.5, 1.1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] +} + +[sub_resource type="Animation" id="3"] +length = 6.75 +loop_mode = 1 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75), +"transitions": PackedFloat32Array(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 = 0.5 +loop_mode = 1 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_ay0tp"] +_data = { +"RESET": SubResource("Animation_a7qal"), +"explode": SubResource("2"), +"idle": SubResource("3"), +"walk": SubResource("4") +} + +[sub_resource type="CircleShape2D" id="5"] +radius = 7.0 + +[sub_resource type="Gradient" id="6"] +offsets = PackedFloat32Array(0.5, 1) +colors = PackedColorArray(1, 1, 1, 0.501961, 0, 0, 0, 0) + +[node name="Enemy" type="RigidBody2D"] +physics_material_override = SubResource("PhysicsMaterial_eyxlk") +lock_rotation = true +max_contacts_reported = 4 +contact_monitor = true +script = ExtResource("1_hjwkx") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_ay0tp") +} + +[node name="SoundExplode" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("5_t2e2f") + +[node name="SoundHit" type="AudioStreamPlayer2D" parent="."] +position = Vector2(0, -1) +stream = ExtResource("4_5rkwm") + +[node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."] +rect = Rect2(-150, -100, 300, 200) + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("2_org2d") +hframes = 8 + +[node name="Shape1" type="CollisionShape2D" parent="."] +position = Vector2(-0.54036, -1.08072) +shape = SubResource("5") + +[node name="Shape2" type="CollisionShape2D" parent="."] +position = Vector2(3.24216, 1.62108) +shape = SubResource("5") + +[node name="Shape3" type="CollisionShape2D" parent="."] +position = Vector2(-6.2475, 1.76707) +shape = SubResource("5") + +[node name="RaycastLeft" type="RayCast2D" parent="."] +position = Vector2(-14, -4.672) + +[node name="RaycastRight" type="RayCast2D" parent="."] +position = Vector2(11, -4.672) + +[node name="Explosion" type="CPUParticles2D" parent="."] +modulate = Color(1, 1, 1, 0.685843) +emitting = false +amount = 32 +lifetime = 0.5 +one_shot = true +speed_scale = 1.2 +explosiveness = 0.76 +texture = ExtResource("3_7unrb") +emission_shape = 1 +emission_sphere_radius = 8.0 +spread = 180.0 +gravity = Vector2(0, 0) +color_ramp = SubResource("6") diff --git a/project/icon.svg b/project/icon.svg deleted file mode 100644 index 9d8b7fa..0000000 --- a/project/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/project/icon.webp b/project/icon.webp new file mode 100644 index 0000000..5738e21 Binary files /dev/null and b/project/icon.webp differ diff --git a/project/icon.webp.import b/project/icon.webp.import new file mode 100644 index 0000000..29730c1 --- /dev/null +++ b/project/icon.webp.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://upnbycigfu4k" +path="res://.godot/imported/icon.webp-e94f9a68b0f625a567a797079e4d325f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.webp" +dest_files=["res://.godot/imported/icon.webp-e94f9a68b0f625a567a797079e4d325f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/platform/moving_platform.png b/project/platform/moving_platform.png new file mode 100644 index 0000000..d74281a Binary files /dev/null and b/project/platform/moving_platform.png differ diff --git a/project/platform/moving_platform.png.import b/project/platform/moving_platform.png.import new file mode 100644 index 0000000..9a28b89 --- /dev/null +++ b/project/platform/moving_platform.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cde7btbdorp8f" +path="res://.godot/imported/moving_platform.png-7e92061cd93e8b0235df711d3782cd8c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://platform/moving_platform.png" +dest_files=["res://.godot/imported/moving_platform.png-7e92061cd93e8b0235df711d3782cd8c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/platform/moving_platform.tscn b/project/platform/moving_platform.tscn new file mode 100644 index 0000000..199f298 --- /dev/null +++ b/project/platform/moving_platform.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=2 format=3 uid="uid://dtbrdmojpvetu"] + +[ext_resource type="Texture2D" uid="uid://cde7btbdorp8f" path="res://platform/moving_platform.png" id="2"] + +[node name="MovingPlatform" type="CharacterBody2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("2") + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] +polygon = PackedVector2Array(-44, -12, 44, -12, 44, 12, -44, 12) diff --git a/project/platform/one_way_platform.png b/project/platform/one_way_platform.png new file mode 100644 index 0000000..f5837a3 Binary files /dev/null and b/project/platform/one_way_platform.png differ diff --git a/project/platform/one_way_platform.png.import b/project/platform/one_way_platform.png.import new file mode 100644 index 0000000..88e6b44 --- /dev/null +++ b/project/platform/one_way_platform.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c15sicsdamq2o" +path="res://.godot/imported/one_way_platform.png-2865772e209813c1636a14aee8d019a3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://platform/one_way_platform.png" +dest_files=["res://.godot/imported/one_way_platform.png-2865772e209813c1636a14aee8d019a3.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/platform/one_way_platform.tscn b/project/platform/one_way_platform.tscn new file mode 100644 index 0000000..94a2ee6 --- /dev/null +++ b/project/platform/one_way_platform.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=3 format=3 uid="uid://dkmxopg1dknq8"] + +[ext_resource type="Texture2D" uid="uid://c15sicsdamq2o" path="res://platform/one_way_platform.png" id="1"] + +[sub_resource type="RectangleShape2D" id="1"] +size = Vector2(110, 10) + +[node name="OneWayPlatform" type="StaticBody2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0.73152, -6.5836) +shape = SubResource("1") +one_way_collision = true diff --git a/project/player/bullet.gd b/project/player/bullet.gd new file mode 100644 index 0000000..07e286b --- /dev/null +++ b/project/player/bullet.gd @@ -0,0 +1,15 @@ +class_name Bullet +extends RigidBody2D + +var disabled = false + +func _ready(): + ($Timer as Timer).start() + + +func disable(): + if disabled: + return + + ($AnimationPlayer as AnimationPlayer).play("shutdown") + disabled = true diff --git a/project/player/bullet.png b/project/player/bullet.png new file mode 100644 index 0000000..f8e0168 Binary files /dev/null and b/project/player/bullet.png differ diff --git a/project/player/bullet.png.import b/project/player/bullet.png.import new file mode 100644 index 0000000..504f371 --- /dev/null +++ b/project/player/bullet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://7sv64orewgmb" +path="res://.godot/imported/bullet.png-5615cb9904aab8db60fe6f48e996475f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/bullet.png" +dest_files=["res://.godot/imported/bullet.png-5615cb9904aab8db60fe6f48e996475f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/player/bullet.tscn b/project/player/bullet.tscn new file mode 100644 index 0000000..a09856e --- /dev/null +++ b/project/player/bullet.tscn @@ -0,0 +1,85 @@ +[gd_scene load_steps=7 format=3 uid="uid://dlfwkokoudcwv"] + +[ext_resource type="Script" path="res://player/bullet.gd" id="1"] +[ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="2"] + +[sub_resource type="CanvasItemMaterial" id="1"] +blend_mode = 1 + +[sub_resource type="CircleShape2D" id="2"] +radius = 4.5 + +[sub_resource type="Animation" id="3"] +length = 1.5 +tracks/0/type = "method" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(1.31), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"queue_free" +}] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Sprite2D:modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 1.03), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("GPUParticles2D:self_modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 0.5), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_hkd2b"] +_data = { +"shutdown": SubResource("3") +} + +[node name="Bullet" type="RigidBody2D"] +continuous_cd = 2 +script = ExtResource("1") + +[node name="GPUParticles2D" type="CPUParticles2D" parent="."] +material = SubResource("1") +emitting = false +lifetime = 0.3 +speed_scale = 3.0 +texture = ExtResource("2") +spread = 0.0 +gravity = Vector2(0, 0) + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("2") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("2") + +[node name="Timer" type="Timer" parent="."] +one_shot = true + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_hkd2b") +} + +[connection signal="timeout" from="Timer" to="." method="disable"] diff --git a/project/player/osb_fire.png b/project/player/osb_fire.png new file mode 100644 index 0000000..1d7ed2d Binary files /dev/null and b/project/player/osb_fire.png differ diff --git a/project/player/osb_fire.png.import b/project/player/osb_fire.png.import new file mode 100644 index 0000000..40e453f --- /dev/null +++ b/project/player/osb_fire.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dfaohortmfvm7" +path="res://.godot/imported/osb_fire.png-67a49910acd764fd7c67429af0ad5cb8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/osb_fire.png" +dest_files=["res://.godot/imported/osb_fire.png-67a49910acd764fd7c67429af0ad5cb8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/player/osb_jump.png b/project/player/osb_jump.png new file mode 100644 index 0000000..819ba61 Binary files /dev/null and b/project/player/osb_jump.png differ diff --git a/project/player/osb_jump.png.import b/project/player/osb_jump.png.import new file mode 100644 index 0000000..bdc4381 --- /dev/null +++ b/project/player/osb_jump.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c7ymjckh78mib" +path="res://.godot/imported/osb_jump.png-0d4d2b2d1a7d2c11e3e4fd800b8589ed.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/osb_jump.png" +dest_files=["res://.godot/imported/osb_jump.png-0d4d2b2d1a7d2c11e3e4fd800b8589ed.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/player/osb_left.png b/project/player/osb_left.png new file mode 100644 index 0000000..60e48d6 Binary files /dev/null and b/project/player/osb_left.png differ diff --git a/project/player/osb_left.png.import b/project/player/osb_left.png.import new file mode 100644 index 0000000..ea323c6 --- /dev/null +++ b/project/player/osb_left.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dx42eijx3d7df" +path="res://.godot/imported/osb_left.png-95ec3a371455889d592aa8cae0a755bc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/osb_left.png" +dest_files=["res://.godot/imported/osb_left.png-95ec3a371455889d592aa8cae0a755bc.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/player/osb_right.png b/project/player/osb_right.png new file mode 100644 index 0000000..8f0c57c Binary files /dev/null and b/project/player/osb_right.png differ diff --git a/project/player/osb_right.png.import b/project/player/osb_right.png.import new file mode 100644 index 0000000..7ea33fd --- /dev/null +++ b/project/player/osb_right.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dykiknf7km7u4" +path="res://.godot/imported/osb_right.png-db9bb4651315f3d42b87bd17a86cce76.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/osb_right.png" +dest_files=["res://.godot/imported/osb_right.png-db9bb4651315f3d42b87bd17a86cce76.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/player/player.gd b/project/player/player.gd new file mode 100644 index 0000000..de9f9cc --- /dev/null +++ b/project/player/player.gd @@ -0,0 +1,208 @@ +class_name Player +extends RigidBody2D + +const WALK_ACCEL = 1000.0 +const WALK_DEACCEL = 1000.0 +const WALK_MAX_VELOCITY = 200.0 +const AIR_ACCEL = 250.0 +const AIR_DEACCEL = 250.0 +const JUMP_VELOCITY = 380.0 +const STOP_JUMP_FORCE = 450.0 +const MAX_SHOOT_POSE_TIME = 0.3 +const MAX_FLOOR_AIRBORNE_TIME = 0.15 + +const BULLET_SCENE = preload("res://player/bullet.tscn") +const ENEMY_SCENE = preload("res://enemy/enemy.tscn") + +var anim := "" +var siding_left := false +var jumping := false +var stopping_jump := false +var shooting := false + +var floor_h_velocity: float = 0.0 + +var airborne_time: float = 1e20 +var shoot_time: float = 1e20 + +@onready var sound_jump := $SoundJump as AudioStreamPlayer2D +@onready var sound_shoot := $SoundShoot as AudioStreamPlayer2D +@onready var sprite := $Sprite2D as Sprite2D +@onready var sprite_smoke := sprite.get_node(^"Smoke") as CPUParticles2D +@onready var animation_player := $AnimationPlayer as AnimationPlayer +@onready var bullet_shoot := $BulletShoot as Marker2D + + +func _integrate_forces(state: PhysicsDirectBodyState2D) -> void: + var velocity := state.get_linear_velocity() + var step := state.get_step() + + var new_anim := anim + var new_siding_left := siding_left + + # Get player input. + var move_left := Input.is_action_pressed(&"move_left") + var move_right := Input.is_action_pressed(&"move_right") + var jump := Input.is_action_pressed(&"jump") + var shoot := Input.is_action_pressed(&"shoot") + var spawn := Input.is_action_just_pressed(&"spawn") + + if spawn: + _spawn_enemy_above.call_deferred() + + # Deapply prev floor velocity. + velocity.x -= floor_h_velocity + floor_h_velocity = 0.0 + + # Find the floor (a contact with upwards facing collision normal). + var found_floor := false + var floor_index := -1 + + for contact_index in state.get_contact_count(): + var collision_normal = state.get_contact_local_normal(contact_index) + + if collision_normal.dot(Vector2(0, -1)) > 0.6: + found_floor = true + floor_index = contact_index + + # A good idea when implementing characters of all kinds, + # compensates for physics imprecision, as well as human reaction delay. + if shoot and not shooting: + _shot_bullet.call_deferred() + else: + shoot_time += step + + if found_floor: + airborne_time = 0.0 + else: + airborne_time += step # Time it spent in the air. + + var on_floor := airborne_time < MAX_FLOOR_AIRBORNE_TIME + + # Process jump. + if jumping: + if velocity.y > 0: + # Set off the jumping flag if going down. + jumping = false + elif not jump: + stopping_jump = true + + if stopping_jump: + velocity.y += STOP_JUMP_FORCE * step + + if on_floor: + # Process logic when character is on floor. + if move_left and not move_right: + if velocity.x > -WALK_MAX_VELOCITY: + velocity.x -= WALK_ACCEL * step + elif move_right and not move_left: + if velocity.x < WALK_MAX_VELOCITY: + velocity.x += WALK_ACCEL * step + else: + var xv := absf(velocity.x) + xv -= WALK_DEACCEL * step + if xv < 0: + xv = 0 + velocity.x = signf(velocity.x) * xv + + # Check jump. + if not jumping and jump: + velocity.y = -JUMP_VELOCITY + jumping = true + stopping_jump = false + sound_jump.play() + + # Check siding. + if velocity.x < 0 and move_left: + new_siding_left = true + elif velocity.x > 0 and move_right: + new_siding_left = false + if jumping: + new_anim = "jumping" + elif absf(velocity.x) < 0.1: + if shoot_time < MAX_SHOOT_POSE_TIME: + new_anim = "idle_weapon" + else: + new_anim = "idle" + else: + if shoot_time < MAX_SHOOT_POSE_TIME: + new_anim = "run_weapon" + else: + new_anim = "run" + else: + # Process logic when the character is in the air. + if move_left and not move_right: + if velocity.x > -WALK_MAX_VELOCITY: + velocity.x -= AIR_ACCEL * step + elif move_right and not move_left: + if velocity.x < WALK_MAX_VELOCITY: + velocity.x += AIR_ACCEL * step + else: + var xv := absf(velocity.x) + xv -= AIR_DEACCEL * step + + if xv < 0: + xv = 0 + velocity.x = signf(velocity.x) * xv + + if velocity.y < 0: + if shoot_time < MAX_SHOOT_POSE_TIME: + new_anim = "jumping_weapon" + else: + new_anim = "jumping" + else: + if shoot_time < MAX_SHOOT_POSE_TIME: + new_anim = "falling_weapon" + else: + new_anim = "falling" + + # Update siding. + if new_siding_left != siding_left: + if new_siding_left: + sprite.scale.x = -1 + else: + sprite.scale.x = 1 + + siding_left = new_siding_left + + # Change animation. + if new_anim != anim: + anim = new_anim + animation_player.play(anim) + + shooting = shoot + + # Apply floor velocity. + if found_floor: + floor_h_velocity = state.get_contact_collider_velocity_at_position(floor_index).x + velocity.x += floor_h_velocity + + # Finally, apply gravity and set back the linear velocity. + velocity += state.get_total_gravity() * step + state.set_linear_velocity(velocity) + + +func _shot_bullet() -> void: + shoot_time = 0 + var bullet := BULLET_SCENE.instantiate() as RigidBody2D + var speed_scale: float + if siding_left: + speed_scale = -1.0 + else: + speed_scale = 1.0 + + bullet.position = position + bullet_shoot.position * Vector2(speed_scale, 1.0) + get_parent().add_child(bullet) + + bullet.linear_velocity = Vector2(400.0 * speed_scale, -40) + + sprite_smoke.restart() + sound_shoot.play() + + add_collision_exception_with(bullet) # Make bullet and this not collide. + + +func _spawn_enemy_above() -> void: + var enemy := ENEMY_SCENE.instantiate() as RigidBody2D + enemy.position = position + 50 * Vector2.UP + get_parent().add_child(enemy) diff --git a/project/player/player.tscn b/project/player/player.tscn new file mode 100644 index 0000000..d895e8d --- /dev/null +++ b/project/player/player.tscn @@ -0,0 +1,278 @@ +[gd_scene load_steps=20 format=3 uid="uid://bbxsp4gp554vh"] + +[ext_resource type="Script" path="res://player/player.gd" id="1"] +[ext_resource type="Texture2D" uid="uid://dh57uloeigwj6" path="res://player/player.webp" id="2_675nc"] +[ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="3"] +[ext_resource type="AudioStream" uid="uid://gw2a4ii0oby2" path="res://audio/sound_shoot.wav" id="8"] +[ext_resource type="AudioStream" uid="uid://bpyko2i13mj0v" path="res://audio/sound_jump.wav" id="9"] + +[sub_resource type="PhysicsMaterial" id="1"] +friction = 0.0 + +[sub_resource type="Gradient" id="2"] +colors = PackedColorArray(0.708353, 0.72498, 1, 1, 1, 1, 1, 0) + +[sub_resource type="Animation" id="3"] +length = 0.01 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [22] +} + +[sub_resource type="Animation" id="4"] +length = 0.01 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [21] +} + +[sub_resource type="Animation" id="5"] +length = 0.5 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [26] +} + +[sub_resource type="Animation" id="6"] +length = 2.0 +loop_mode = 1 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.3575, 0.429, 0.572, 1.287, 1.3585, 1.43, 1.5015), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [16, 17, 18, 16, 19, 20, 19, 16] +} + +[sub_resource type="Animation" id="7"] +length = 0.5 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [25] +} + +[sub_resource type="Animation" id="8"] +length = 0.5 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.25, 0.5), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [23, 24, 23] +} + +[sub_resource type="Animation" id="9"] +length = 0.5 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [26] +} + +[sub_resource type="Animation" id="10"] +length = 0.5 +loop_mode = 1 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 0] +} + +[sub_resource type="Animation" id="11"] +length = 0.5 +loop_mode = 1 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), +"update": 1, +"values": [5, 6, 7, 8, 9, 5] +} + +[sub_resource type="Animation" id="12"] +length = 0.5 +loop_mode = 1 +step = 0.25 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), +"update": 1, +"values": [10, 11, 12, 13, 14, 5] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_30623"] +_data = { +"crouch": SubResource("3"), +"falling": SubResource("4"), +"falling_weapon": SubResource("5"), +"idle": SubResource("6"), +"idle_weapon": SubResource("7"), +"jumping": SubResource("8"), +"jumping_weapon": SubResource("9"), +"run": SubResource("10"), +"run_weapon": SubResource("11"), +"standing_weapon_ready": SubResource("12") +} + +[sub_resource type="SeparationRayShape2D" id="13"] +custom_solver_bias = 0.5 +length = 18.0 + +[node name="Player" type="RigidBody2D"] +mass = 1.5 +physics_material_override = SubResource("1") +lock_rotation = true +custom_integrator = true +max_contacts_reported = 4 +contact_monitor = true +script = ExtResource("1") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("2_675nc") +hframes = 16 +vframes = 2 +frame = 22 + +[node name="Smoke" type="CPUParticles2D" parent="Sprite2D"] +self_modulate = Color(1, 1, 1, 0.26702) +position = Vector2(10, 1.5) +rotation = -1.45648 +emitting = false +lifetime = 0.3 +one_shot = true +explosiveness = 1.0 +texture = ExtResource("3") +spread = 65.84 +gravity = Vector2(0, -15) +color_ramp = SubResource("2") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_30623") +} + +[node name="Camera2D" type="Camera2D" parent="."] +zoom = Vector2(2, 2) +limit_left = 0 +limit_top = 0 + +[node name="BulletShoot" type="Marker2D" parent="."] +position = Vector2(15, 2) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0.15, -6) +shape = SubResource("13") + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] +polygon = PackedVector2Array(-0.138, 8.25, -10, -12, 11, -12) + +[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) +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) +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) +action = "jump" +visibility_mode = 1 + +[node name="Fire" type="TouchScreenButton" parent="UI"] +position = Vector2(668.073, 262.788) +scale = Vector2(1.49157, 1.46265) +action = "shoot" +visibility_mode = 1 + +[node name="SoundShoot" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("8") + +[node name="SoundJump" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("9") diff --git a/project/player/player.webp b/project/player/player.webp new file mode 100644 index 0000000..f5969fd Binary files /dev/null and b/project/player/player.webp differ diff --git a/project/player/player.webp.import b/project/player/player.webp.import new file mode 100644 index 0000000..c1de455 --- /dev/null +++ b/project/player/player.webp.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dh57uloeigwj6" +path="res://.godot/imported/player.webp-f8efd9c2246a95708b9c4853ed21513e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/player.webp" +dest_files=["res://.godot/imported/player.webp-f8efd9c2246a95708b9c4853ed21513e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/project.godot b/project/project.godot index bd5ab3b..0e2a7c6 100644 --- a/project/project.godot +++ b/project/project.godot @@ -10,6 +10,94 @@ config_version=5 [application] -config/name="PROJECT" -config/features=PackedStringArray("4.4", "Forward Plus") -config/icon="res://icon.svg" +config/name="Physics-Based Platformer 2D" +config/description="This demo uses RigidBody2D for the player and enemies. These +character controllers are more powerful than CharacterBody2D, +but can be more difficult to handle, as they require +manual modification of the RigidBody3D velocity." +config/tags=PackedStringArray("2d", "demo", "official", "physics", "tilemap") +run/main_scene="res://stage.tscn" +config/features=PackedStringArray("4.3") +config/icon="res://icon.webp" + +[display] + +window/size/viewport_width=800 +window/size/viewport_height=480 +window/stretch/mode="canvas_items" +window/stretch/aspect="keep_height" +window/stretch/scale_mode="integer" + +[importer_defaults] + +texture={ +"compress/bptc_ldr": 0, +"compress/hdr_mode": 0, +"compress/lossy_quality": 0.7, +"compress/mode": 0, +"compress/normal_map": 0, +"detect_3d": false, +"flags/anisotropic": false, +"flags/filter": false, +"flags/mipmaps": false, +"flags/repeat": 0, +"flags/srgb": 2, +"process/HDR_as_SRGB": false, +"process/fix_alpha_border": true, +"process/invert_color": false, +"process/premult_alpha": false, +"size_limit": 0, +"stream": false, +"svg/scale": 1.0 +} + +[input] + +jump={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":122,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null) +] +} +move_left={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":false,"script":null) +] +} +move_right={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":15,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) +] +} +shoot={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":7,"pressure":0.0,"pressed":false,"script":null) +] +} +spawn={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":3,"pressure":0.0,"pressed":false,"script":null) +] +} + +[physics] + +common/physics_ticks_per_second=120 +2d/default_gravity=900 + +[rendering] + +textures/canvas_textures/default_texture_filter=0 +renderer/rendering_method="gl_compatibility" +renderer/rendering_method.mobile="gl_compatibility" diff --git a/project/screenshots/.gdignore b/project/screenshots/.gdignore new file mode 100644 index 0000000..e69de29 diff --git a/project/screenshots/beginning.png b/project/screenshots/beginning.png new file mode 100644 index 0000000..4653589 Binary files /dev/null and b/project/screenshots/beginning.png differ diff --git a/project/screenshots/seesaw-riding.png b/project/screenshots/seesaw-riding.png new file mode 100644 index 0000000..d7439e0 Binary files /dev/null and b/project/screenshots/seesaw-riding.png differ diff --git a/project/stage.tscn b/project/stage.tscn new file mode 100644 index 0000000..b8d5b7d --- /dev/null +++ b/project/stage.tscn @@ -0,0 +1,344 @@ +[gd_scene load_steps=24 format=3 uid="uid://b53muvlsw1tx3"] + +[ext_resource type="TileSet" uid="uid://rowrak7ls50v" path="res://tileset.tres" id="1"] +[ext_resource type="PackedScene" uid="uid://6uilf6rad880" path="res://coin/coin.tscn" id="2"] +[ext_resource type="PackedScene" uid="uid://dtbrdmojpvetu" path="res://platform/moving_platform.tscn" id="3"] +[ext_resource type="PackedScene" uid="uid://rxbjx7rhfd8k" path="res://background/seesaw.tscn" id="4"] +[ext_resource type="PackedScene" uid="uid://dkmxopg1dknq8" path="res://platform/one_way_platform.tscn" id="5"] +[ext_resource type="PackedScene" uid="uid://bbxsp4gp554vh" path="res://player/player.tscn" id="6_fauva"] +[ext_resource type="PackedScene" uid="uid://daqqtote00syu" path="res://enemy/enemy.tscn" id="7"] +[ext_resource type="PackedScene" uid="uid://csdn3dwkaprow" path="res://background/parallax_bg.tscn" id="8"] +[ext_resource type="AudioStream" uid="uid://gunv00cij80t" path="res://audio/music.ogg" id="9"] + +[sub_resource type="Animation" id="Animation_oxal6"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("MovingPlatform2:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(438, 272)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("MovingPlatform3:position") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1554, 369)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("MovingPlatform1:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(725, 439)] +} + +[sub_resource type="Animation" id="Animation_vjtqx"] +resource_name = "move" +length = 6.0 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("MovingPlatform1:position") +tracks/0/interp = 2 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 3), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Vector2(725, 439), Vector2(725, 304)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("MovingPlatform2:position") +tracks/1/interp = 2 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 3), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Vector2(438, 272), Vector2(137, 272)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("MovingPlatform3:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 3), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Vector2(1490, 369), Vector2(1905, 369)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_el48w"] +_data = { +"RESET": SubResource("Animation_oxal6"), +"move": SubResource("Animation_vjtqx") +} + +[sub_resource type="PhysicsMaterial" id="2"] + +[sub_resource type="PhysicsMaterial" id="3"] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id="4"] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id="5"] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id="6"] + +[sub_resource type="PhysicsMaterial" id="7"] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id="8"] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id="9"] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id="10"] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id="11"] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id="12"] +friction = 0.0 + +[node name="Stage" type="Node2D"] + +[node name="TileMap" type="TileMap" parent="."] +position = Vector2(2, 0) +tile_set = ExtResource("1") +rendering_quadrant_size = 4 +format = 2 +layer_0/tile_data = PackedInt32Array(0, 2, 0, 70, 2, 65536, 71, 10, 0, 72, 10, 0, 73, 10, 0, 74, 10, 0, 75, 10, 0, 76, 10, 0, 77, 10, 0, 78, 10, 0, 65536, 2, 0, 65606, 2, 65536, 65607, 10, 0, 65608, 10, 0, 65609, 10, 0, 65610, 10, 0, 65611, 10, 0, 65612, 10, 0, 65613, 10, 0, 65614, 10, 0, 131072, 2, 0, 131142, 2, 65536, 131143, 10, 0, 131144, 10, 0, 131145, 10, 0, 131146, 10, 0, 131147, 10, 0, 131148, 10, 0, 131149, 10, 0, 131150, 10, 0, 196608, 2, 0, 196626, 9, 0, 196678, 2, 65536, 196679, 10, 0, 196680, 10, 0, 196681, 10, 0, 196682, 10, 0, 196683, 10, 0, 196684, 10, 0, 196685, 10, 0, 196686, 10, 0, 262144, 2, 0, 262162, 8, 0, 262214, 2, 65536, 262215, 10, 0, 262216, 10, 0, 262217, 10, 0, 262218, 10, 0, 262219, 10, 0, 262220, 10, 0, 262221, 10, 0, 262222, 10, 0, 327680, 2, 0, 327697, 9, 65536, 327698, 7, 0, 327733, 9, 0, 327750, 2, 65536, 327751, 10, 0, 327752, 10, 0, 327753, 10, 0, 327754, 10, 0, 327755, 10, 0, 327756, 10, 0, 327757, 10, 0, 327758, 10, 0, 393216, 2, 0, 393233, 8, 65536, 393234, 7, 0, 393257, 9, 0, 393269, 7, 0, 393286, 2, 65536, 393287, 10, 0, 393288, 10, 0, 393289, 10, 0, 393290, 10, 0, 393291, 10, 0, 393292, 10, 0, 393293, 10, 0, 393294, 10, 0, 458752, 2, 0, 458769, 7, 0, 458770, 8, 0, 458790, 9, 0, 458793, 8, 0, 458805, 8, 0, 458822, 2, 65536, 458823, 10, 0, 458824, 10, 0, 458825, 10, 0, 458826, 10, 0, 458827, 10, 0, 458828, 10, 0, 458829, 10, 0, 458830, 10, 0, 524288, 4, 0, 524289, 1, 0, 524304, 1, 65536, 524305, 6, 65536, 524306, 6, 0, 524307, 5, 0, 524308, 1, 0, 524326, 8, 0, 524329, 7, 0, 524341, 7, 0, 524358, 2, 65536, 524359, 10, 0, 524360, 10, 0, 524361, 10, 0, 524362, 10, 0, 524363, 10, 0, 524364, 10, 0, 524365, 10, 0, 524366, 10, 0, 589824, 10, 0, 589825, 13, 0, 589840, 2, 65536, 589841, 10, 0, 589842, 10, 0, 589843, 10, 0, 589844, 2, 0, 589862, 7, 0, 589865, 7, 0, 589876, 1, 65536, 589877, 6, 0, 589878, 1, 0, 589894, 2, 65536, 589895, 10, 0, 589896, 10, 0, 589897, 10, 0, 589898, 10, 0, 589899, 10, 0, 589900, 10, 0, 589901, 10, 0, 589902, 10, 0, 655360, 2, 0, 655376, 2, 65536, 655377, 10, 0, 655378, 10, 0, 655379, 10, 0, 655380, 2, 0, 655398, 7, 0, 655401, 8, 0, 655412, 13, 65536, 655413, 11, 0, 655414, 13, 0, 655430, 2, 65536, 655431, 10, 0, 655432, 10, 0, 655433, 10, 0, 655434, 10, 0, 655435, 10, 0, 655436, 10, 0, 655437, 10, 0, 655438, 10, 0, 720896, 2, 0, 720912, 2, 65536, 720913, 10, 0, 720914, 10, 0, 720915, 10, 0, 720916, 2, 0, 720934, 8, 0, 720937, 7, 0, 720958, 1, 65536, 720959, 5, 0, 720960, 5, 65536, 720961, 5, 0, 720962, 5, 0, 720963, 5, 65536, 720964, 5, 0, 720965, 0, 0, 720966, 4, 65536, 720967, 10, 0, 720968, 10, 0, 720969, 10, 0, 720970, 10, 0, 720971, 10, 0, 720972, 10, 0, 720973, 10, 0, 720974, 10, 0, 786432, 2, 0, 786437, 9, 0, 786448, 2, 65536, 786449, 10, 0, 786450, 10, 0, 786451, 10, 0, 786452, 2, 0, 786464, 1, 65536, 786465, 1, 0, 786470, 7, 0, 786473, 7, 0, 786474, 12, 65536, 786475, 1, 0, 786494, 2, 65536, 786495, 10, 0, 786496, 10, 0, 786497, 10, 0, 786498, 10, 0, 786499, 10, 0, 786500, 10, 0, 786501, 10, 0, 786502, 10, 0, 786503, 10, 0, 786504, 10, 0, 786505, 10, 0, 786506, 10, 0, 786507, 10, 0, 786508, 10, 0, 786509, 10, 0, 851968, 2, 0, 851973, 7, 0, 851984, 2, 65536, 851985, 10, 0, 851986, 10, 0, 851987, 10, 0, 851988, 2, 0, 851996, 1, 65536, 851997, 1, 0, 852000, 2, 65536, 852006, 7, 0, 852009, 6, 0, 852011, 2, 0, 852030, 2, 65536, 852031, 10, 0, 852032, 10, 0, 852033, 10, 0, 852034, 10, 0, 852035, 10, 0, 852036, 10, 0, 852037, 10, 0, 852038, 10, 0, 852039, 10, 0, 852040, 10, 0, 852041, 10, 0, 852042, 10, 0, 852043, 10, 0, 852044, 10, 0, 852045, 10, 0, 917504, 2, 0, 917506, 9, 0, 917509, 7, 0, 917512, 9, 65536, 917520, 13, 65536, 917521, 11, 0, 917522, 11, 0, 917523, 11, 0, 917524, 13, 0, 917532, 13, 65536, 917533, 13, 0, 917536, 2, 65536, 917537, 4, 0, 917538, 1, 0, 917540, 1, 65536, 917541, 0, 0, 917542, 6, 0, 917545, 10, 0, 917546, 10, 0, 917547, 4, 0, 917548, 1, 0, 917566, 2, 65536, 917567, 10, 0, 917568, 10, 0, 917569, 10, 0, 917570, 10, 0, 917571, 10, 0, 917572, 10, 0, 917573, 10, 0, 917574, 10, 0, 917575, 10, 0, 917576, 10, 0, 917577, 10, 0, 917578, 10, 0, 917579, 10, 0, 917580, 10, 0, 917581, 10, 0, 983040, 2, 0, 983042, 7, 0, 983045, 7, 0, 983048, 8, 65536, 983050, 1, 65536, 983051, 0, 0, 983052, 1, 0, 983064, 1, 65536, 983065, 1, 0, 983072, 2, 65536, 983073, 10, 0, 983074, 4, 0, 983075, 0, 0, 983076, 4, 65536, 983077, 10, 0, 983078, 10, 0, 983079, 10, 0, 983080, 10, 0, 983081, 10, 0, 983082, 10, 0, 983083, 10, 0, 983084, 2, 0, 983095, 9, 0, 983102, 2, 65536, 983103, 10, 0, 983104, 10, 0, 983105, 10, 0, 983106, 10, 0, 983107, 10, 0, 983108, 10, 0, 983109, 10, 0, 983110, 10, 0, 983111, 10, 0, 983112, 10, 0, 983113, 10, 0, 983114, 10, 0, 983115, 10, 0, 983116, 10, 0, 983117, 10, 0, 1048576, 2, 0, 1048578, 8, 0, 1048581, 8, 0, 1048584, 7, 65536, 1048586, 2, 65536, 1048587, 10, 65536, 1048588, 2, 0, 1048600, 13, 65536, 1048601, 13, 0, 1048604, 9, 0, 1048608, 13, 65536, 1048609, 11, 65536, 1048610, 11, 65536, 1048611, 11, 65536, 1048612, 10, 0, 1048613, 10, 0, 1048614, 10, 0, 1048615, 10, 0, 1048616, 10, 0, 1048617, 10, 0, 1048618, 10, 0, 1048619, 10, 0, 1048620, 4, 0, 1048621, 1, 0, 1048630, 9, 65536, 1048631, 8, 0, 1048638, 2, 65536, 1048639, 10, 0, 1048640, 10, 0, 1048641, 10, 0, 1048642, 10, 0, 1048643, 10, 0, 1048644, 10, 0, 1048645, 10, 0, 1048646, 10, 0, 1048647, 10, 0, 1048648, 10, 0, 1048649, 10, 0, 1048650, 10, 0, 1048651, 10, 0, 1048652, 10, 0, 1048653, 10, 0, 1114112, 4, 0, 1114113, 0, 0, 1114114, 6, 0, 1114115, 0, 0, 1114116, 0, 0, 1114117, 6, 0, 1114118, 1, 0, 1114120, 8, 65536, 1114122, 13, 65536, 1114123, 11, 0, 1114124, 13, 0, 1114128, 1, 65536, 1114129, 5, 0, 1114130, 5, 65536, 1114131, 5, 0, 1114132, 0, 0, 1114133, 1, 0, 1114140, 7, 0, 1114141, 9, 65536, 1114148, 2, 65536, 1114149, 10, 0, 1114150, 10, 0, 1114151, 10, 0, 1114152, 10, 0, 1114153, 10, 0, 1114154, 10, 0, 1114155, 10, 0, 1114156, 10, 0, 1114157, 2, 0, 1114166, 8, 65536, 1114167, 8, 0, 1114174, 2, 65536, 1114175, 10, 0, 1114176, 10, 0, 1114177, 10, 0, 1114178, 10, 0, 1114179, 10, 0, 1114180, 10, 0, 1114181, 10, 0, 1114182, 10, 0, 1114183, 10, 0, 1114184, 10, 0, 1114185, 10, 0, 1114186, 10, 0, 1114187, 10, 0, 1114188, 10, 0, 1179648, 10, 0, 1179649, 10, 0, 1179650, 10, 0, 1179651, 10, 0, 1179652, 10, 0, 1179653, 10, 0, 1179654, 2, 0, 1179656, 7, 65536, 1179664, 2, 65536, 1179665, 10, 0, 1179666, 10, 0, 1179667, 10, 0, 1179668, 10, 0, 1179669, 4, 0, 1179670, 12, 0, 1179675, 9, 0, 1179676, 8, 0, 1179677, 8, 0, 1179684, 2, 65536, 1179685, 10, 0, 1179686, 10, 0, 1179687, 10, 0, 1179688, 10, 0, 1179689, 10, 0, 1179690, 10, 0, 1179691, 10, 0, 1179692, 10, 0, 1179693, 4, 0, 1179694, 1, 0, 1179701, 9, 0, 1179702, 7, 65536, 1179703, 7, 0, 1179710, 2, 65536, 1179711, 10, 0, 1179712, 10, 0, 1179713, 10, 0, 1179714, 10, 0, 1179715, 10, 0, 1179716, 10, 0, 1179717, 10, 0, 1179718, 10, 0, 1179719, 10, 0, 1179720, 10, 0, 1179721, 10, 0, 1179722, 10, 0, 1245184, 10, 0, 1245185, 10, 0, 1245186, 10, 0, 1245187, 10, 0, 1245188, 10, 0, 1245189, 10, 0, 1245190, 2, 0, 1245192, 7, 65536, 1245199, 1, 65536, 1245200, 4, 65536, 1245201, 10, 0, 1245202, 10, 0, 1245203, 10, 0, 1245204, 10, 0, 1245205, 10, 0, 1245207, 1, 0, 1245211, 7, 0, 1245212, 7, 0, 1245213, 8, 65536, 1245220, 2, 65536, 1245221, 10, 0, 1245222, 10, 0, 1245223, 10, 0, 1245224, 10, 0, 1245225, 10, 0, 1245226, 10, 0, 1245227, 10, 0, 1245228, 10, 0, 1245229, 10, 0, 1245230, 2, 0, 1245237, 8, 0, 1245238, 7, 65536, 1245239, 8, 0, 1245240, 9, 65536, 1245246, 2, 65536, 1245247, 10, 0, 1245248, 10, 0, 1245249, 10, 0, 1245250, 10, 0, 1245251, 10, 0, 1245252, 10, 0, 1245253, 10, 0, 1245254, 10, 0, 1245255, 10, 0, 1245256, 10, 0, 1245257, 10, 0, 1245258, 10, 0, 1310720, 10, 0, 1310721, 10, 0, 1310722, 10, 0, 1310723, 10, 0, 1310724, 10, 0, 1310725, 10, 0, 1310726, 2, 0, 1310728, 8, 65536, 1310730, 1, 65536, 1310731, 1, 0, 1310734, 1, 65536, 1310735, 4, 65536, 1310736, 10, 0, 1310737, 10, 0, 1310738, 10, 0, 1310739, 10, 0, 1310740, 10, 0, 1310741, 10, 0, 1310742, 10, 0, 1310743, 4, 0, 1310744, 1, 0, 1310747, 8, 0, 1310748, 7, 0, 1310749, 7, 65536, 1310756, 2, 65536, 1310757, 10, 0, 1310758, 10, 0, 1310759, 10, 0, 1310760, 10, 0, 1310761, 10, 0, 1310762, 10, 0, 1310763, 10, 0, 1310764, 10, 0, 1310765, 10, 0, 1310766, 4, 0, 1310767, 5, 0, 1310768, 12, 0, 1310773, 7, 0, 1310774, 7, 65536, 1310775, 7, 0, 1310776, 7, 65536, 1310782, 2, 65536, 1310783, 10, 0, 1310784, 10, 0, 1310785, 10, 0, 1310786, 10, 0, 1310787, 10, 0, 1310788, 10, 0, 1310789, 10, 0, 1310790, 10, 0, 1310791, 10, 0, 1310792, 10, 0, 1310793, 10, 0, 1376256, 10, 0, 1376257, 10, 0, 1376258, 10, 0, 1376259, 10, 0, 1376260, 10, 0, 1376261, 10, 0, 1376262, 4, 0, 1376263, 0, 0, 1376265, 0, 0, 1376266, 4, 65536, 1376267, 4, 0, 1376268, 0, 0, 1376269, 0, 0, 1376270, 4, 65536, 1376271, 10, 0, 1376272, 10, 0, 1376273, 10, 0, 1376274, 10, 0, 1376275, 10, 0, 1376276, 10, 0, 1376277, 10, 0, 1376278, 10, 0, 1376279, 10, 0, 1376280, 4, 0, 1376281, 12, 0, 1376283, 8, 0, 1376284, 8, 0, 1376285, 8, 65536, 1376287, 12, 65536, 1376288, 0, 0, 1376289, 5, 0, 1376290, 5, 65536, 1376291, 0, 0, 1376292, 4, 65536, 1376293, 10, 0, 1376294, 10, 0, 1376295, 10, 0, 1376296, 10, 0, 1376297, 10, 0, 1376298, 10, 0, 1376299, 10, 0, 1376300, 10, 0, 1376301, 10, 0, 1376302, 10, 0, 1376303, 10, 0, 1376305, 12, 0, 1376309, 7, 0, 1376310, 8, 65536, 1376311, 7, 0, 1376312, 8, 65536, 1376318, 2, 65536, 1376319, 10, 0, 1376320, 10, 0, 1376321, 10, 0, 1376322, 10, 0, 1376323, 10, 0, 1376324, 10, 0, 1376325, 10, 0, 1376326, 10, 0, 1376327, 10, 0, 1376328, 10, 0, 1441792, 10, 0, 1441793, 10, 0, 1441794, 10, 0, 1441795, 10, 0, 1441796, 10, 0, 1441797, 10, 0, 1441798, 10, 0, 1441799, 10, 0, 1441800, 10, 0, 1441801, 10, 0, 1441802, 10, 0, 1441803, 10, 0, 1441804, 10, 0, 1441805, 10, 0, 1441806, 10, 0, 1441807, 10, 0, 1441808, 10, 0, 1441809, 10, 0, 1441810, 10, 0, 1441811, 10, 0, 1441812, 10, 0, 1441813, 10, 0, 1441814, 10, 0, 1441815, 10, 0, 1441816, 10, 0, 1441818, 0, 0, 1441819, 6, 0, 1441820, 6, 0, 1441821, 6, 65536, 1441822, 5, 0, 1441824, 10, 0, 1441825, 10, 0, 1441826, 10, 0, 1441827, 10, 0, 1441828, 10, 0, 1441829, 10, 0, 1441830, 10, 0, 1441831, 10, 0, 1441832, 10, 0, 1441833, 10, 0, 1441834, 10, 0, 1441835, 10, 0, 1441836, 10, 0, 1441837, 10, 0, 1441838, 10, 0, 1441839, 10, 0, 1441840, 10, 0, 1441842, 0, 0, 1441843, 0, 0, 1441844, 0, 0, 1441845, 6, 0, 1441846, 6, 65536, 1441847, 6, 0, 1441848, 6, 65536, 1441849, 0, 0, 1441850, 5, 0, 1441851, 5, 65536, 1441852, 5, 0, 1441853, 0, 0, 1441854, 4, 65536, 1441855, 10, 0, 1441856, 10, 0, 1441857, 10, 0, 1441858, 10, 0, 1441859, 10, 0, 1441860, 10, 0, 1441861, 10, 0, 1441862, 10, 0, 1441863, 10, 0, 1507328, 10, 0, 1507329, 10, 0, 1507330, 10, 0, 1507331, 10, 0, 1507332, 10, 0, 1507333, 10, 0, 1507334, 10, 0, 1507335, 10, 0, 1507336, 10, 0, 1507337, 10, 0, 1507338, 10, 0, 1507339, 10, 0, 1507340, 10, 0, 1507341, 10, 0, 1507342, 10, 0, 1507343, 10, 0, 1507344, 10, 0, 1507345, 10, 0, 1507346, 10, 0, 1507347, 10, 0, 1507348, 10, 0, 1507349, 10, 0, 1507350, 10, 0, 1507351, 10, 0, 1507352, 10, 0, 1507353, 10, 0, 1507354, 10, 0, 1507355, 10, 0, 1507356, 10, 0, 1507357, 10, 0, 1507358, 10, 0, 1507359, 10, 0, 1507360, 10, 0, 1507361, 10, 0, 1507362, 10, 0, 1507363, 10, 0, 1507364, 10, 0, 1507365, 10, 0, 1507366, 10, 0, 1507367, 10, 0, 1507368, 10, 0, 1507369, 10, 0, 1507370, 10, 0, 1507371, 10, 0, 1507372, 10, 0, 1507373, 10, 0, 1507374, 10, 0, 1507375, 10, 0, 1507376, 10, 0, 1507377, 10, 0, 1507378, 10, 0, 1507379, 10, 0, 1507380, 10, 0, 1507381, 10, 0, 1507382, 10, 0, 1507383, 10, 0, 1507384, 10, 0, 1507385, 10, 0, 1507386, 10, 0, 1507387, 10, 0, 1507388, 10, 0, 1507389, 10, 0, 1507390, 10, 0, 1507391, 10, 0, 1507392, 10, 0, 1507393, 10, 0, 1507394, 10, 0, 1507395, 10, 0, 1507396, 10, 0, 1507397, 10, 0, 1507398, 10, 0, 1507399, 10, 0, 1572864, 10, 0, 1572865, 10, 0, 1572866, 10, 0, 1572867, 10, 0, 1572868, 10, 0, 1572869, 10, 0, 1572870, 10, 0, 1572871, 10, 0, 1572872, 10, 0, 1572873, 10, 0, 1572874, 10, 0, 1572875, 10, 0, 1572876, 10, 0, 1572877, 10, 0, 1572878, 10, 0, 1572879, 10, 0, 1572880, 10, 0, 1572881, 10, 0, 1572882, 10, 0, 1572883, 10, 0, 1572884, 10, 0, 1572885, 10, 0, 1572886, 10, 0, 1572887, 10, 0, 1572888, 10, 0, 1572889, 10, 0, 1572890, 10, 0, 1572891, 10, 0, 1572892, 10, 0, 1572893, 10, 0, 1572894, 10, 0, 1572895, 10, 0, 1572896, 10, 0, 1572897, 10, 0, 1572898, 10, 0, 1572899, 10, 0, 1572900, 10, 0, 1572901, 10, 0, 1572902, 10, 0, 1572903, 10, 0, 1572904, 10, 0, 1572905, 10, 0, 1572906, 10, 0, 1572907, 10, 0, 1572908, 10, 0, 1572909, 10, 0, 1572910, 10, 0, 1572911, 10, 0, 1572912, 10, 0, 1572913, 10, 0, 1572914, 10, 0, 1572915, 10, 0, 1572916, 10, 0, 1572917, 10, 0, 1572918, 10, 0, 1572919, 10, 0, 1572920, 10, 0, 1572921, 10, 0, 1572922, 10, 0, 1572923, 10, 0, 1572924, 10, 0, 1572925, 10, 0, 1572926, 10, 0, 1572927, 10, 0, 1572928, 10, 0, 1572929, 10, 0, 1572930, 10, 0, 1572931, 10, 0, 1572932, 10, 0, 1572933, 10, 0, 1572934, 10, 0, 1572935, 10, 0, 1638400, 10, 0, 1638401, 10, 0, 1638402, 10, 0, 1638403, 10, 0, 1638404, 10, 0, 1638405, 10, 0, 1638406, 10, 0, 1638407, 10, 0, 1638408, 10, 0, 1638409, 10, 0, 1638410, 10, 0, 1638411, 10, 0, 1638412, 10, 0, 1638413, 10, 0, 1638414, 10, 0, 1638415, 10, 0, 1638416, 10, 0, 1638417, 10, 0, 1638418, 10, 0, 1638419, 10, 0, 1638420, 10, 0, 1638421, 10, 0, 1638422, 10, 0, 1638423, 10, 0, 1638424, 10, 0, 1638425, 10, 0, 1638426, 10, 0, 1638427, 10, 0, 1638428, 10, 0, 1638429, 10, 0, 1638430, 10, 0, 1638431, 10, 0, 1638432, 10, 0, 1638433, 10, 0, 1638434, 10, 0, 1638435, 10, 0, 1638436, 10, 0, 1638437, 10, 0, 1638438, 10, 0, 1638439, 10, 0, 1638440, 10, 0, 1638441, 10, 0, 1638442, 10, 0, 1638443, 10, 0, 1638444, 10, 0, 1638445, 10, 0, 1638446, 10, 0, 1638447, 10, 0, 1638448, 10, 0, 1638449, 10, 0, 1638450, 10, 0, 1638451, 10, 0, 1638452, 10, 0, 1638453, 10, 0, 1638454, 10, 0, 1638455, 10, 0, 1638456, 10, 0, 1638457, 10, 0, 1638458, 10, 0, 1638459, 10, 0, 1638460, 10, 0, 1638461, 10, 0, 1638462, 10, 0, 1638463, 10, 0, 1638464, 10, 0, 1638465, 10, 0, 1638466, 10, 0, 1638467, 10, 0, 1638468, 10, 0, 1638469, 10, 0, 1638470, 10, 0, 1638471, 10, 0, 1703952, 10, 0, 1703953, 10, 0, 1703954, 10, 0, 1703955, 10, 0, 1703956, 10, 0, 1703957, 10, 0, 1703958, 10, 0, 1703959, 10, 0, 1703960, 10, 0, 1703961, 10, 0, 1703962, 10, 0, 1703963, 10, 0, 1703964, 10, 0, 1703965, 10, 0, 1703966, 10, 0, 1703967, 10, 0, 1703968, 10, 0, 1703969, 10, 0, 1703970, 10, 0, 1703971, 10, 0, 1703972, 10, 0, 1703973, 10, 0, 1703974, 10, 0, 1703975, 10, 0, 1703976, 10, 0, 1703977, 10, 0, 1703978, 10, 0, 1703979, 10, 0, 1703980, 10, 0, 1703981, 10, 0, 1703982, 10, 0, 1703983, 10, 0, 1703984, 10, 0, 1703985, 10, 0, 1703986, 10, 0, 1703987, 10, 0, 1703988, 10, 0, 1703989, 10, 0, 1703990, 10, 0, 1703991, 10, 0, 1703992, 10, 0, 1703993, 10, 0, 1703994, 10, 0, 1703995, 10, 0, 1703996, 10, 0, 1703997, 10, 0, 1703998, 10, 0, 1703999, 10, 0, 1704000, 10, 0, 1704001, 10, 0, 1704002, 10, 0, 1704003, 10, 0, 1704004, 10, 0, 1704005, 10, 0, 1704006, 10, 0, 1704007, 10, 0, 1769488, 10, 0, 1769489, 10, 0, 1769490, 10, 0, 1769491, 10, 0, 1769492, 10, 0, 1769493, 10, 0, 1769494, 10, 0, 1769495, 10, 0, 1769496, 10, 0, 1769497, 10, 0, 1769498, 10, 0, 1769499, 10, 0, 1769500, 10, 0, 1769501, 10, 0, 1769502, 10, 0, 1769503, 10, 0, 1769504, 10, 0, 1769505, 10, 0, 1769506, 10, 0, 1769507, 10, 0, 1769508, 10, 0, 1769509, 10, 0, 1769510, 10, 0, 1769511, 10, 0, 1769512, 10, 0, 1769513, 10, 0, 1769514, 10, 0, 1769515, 10, 0, 1769516, 10, 0, 1769517, 10, 0, 1769518, 10, 0, 1769519, 10, 0, 1769520, 10, 0, 1769521, 10, 0, 1769522, 10, 0, 1769523, 10, 0, 1769524, 10, 0, 1769525, 10, 0, 1769526, 10, 0, 1769527, 10, 0, 1769528, 10, 0, 1769529, 10, 0, 1769530, 10, 0, 1769531, 10, 0, 1769532, 10, 0, 1769533, 10, 0, 1769534, 10, 0, 1769535, 10, 0, 1769536, 10, 0, 1769537, 10, 0, 1769538, 10, 0, 1769539, 10, 0, 1769540, 10, 0, 1769541, 10, 0, 1376264, 6, 65536, 917543, 5, 0, 917544, 4, 65536, 852008, 1, 65536, 852002, 3, 0) + +[node name="Coins" type="Node2D" parent="."] +position = Vector2(1, 0) + +[node name="Coin" parent="Coins" instance=ExtResource("2")] +position = Vector2(336, 589.5) + +[node name="Coin2" parent="Coins" instance=ExtResource("2")] +position = Vector2(352, 589.5) + +[node name="Coin3" parent="Coins" instance=ExtResource("2")] +position = Vector2(368, 589.5) + +[node name="Coin4" parent="Coins" instance=ExtResource("2")] +position = Vector2(560, 496) + +[node name="Coin5" parent="Coins" instance=ExtResource("2")] +position = Vector2(576, 496) + +[node name="Coin6" parent="Coins" instance=ExtResource("2")] +position = Vector2(592, 496) + +[node name="Coin7" parent="Coins" instance=ExtResource("2")] +position = Vector2(608, 496) + +[node name="Coin8" parent="Coins" instance=ExtResource("2")] +position = Vector2(624, 496) + +[node name="Coin9" parent="Coins" instance=ExtResource("2")] +position = Vector2(784, 432) + +[node name="Coin10" parent="Coins" instance=ExtResource("2")] +position = Vector2(816, 432) + +[node name="Coin11" parent="Coins" instance=ExtResource("2")] +position = Vector2(912, 384) + +[node name="Coin12" parent="Coins" instance=ExtResource("2")] +position = Vector2(944, 384) + +[node name="Coin13" parent="Coins" instance=ExtResource("2")] +position = Vector2(1040, 336) + +[node name="Coin14" parent="Coins" instance=ExtResource("2")] +position = Vector2(1072, 336) + +[node name="Coin15" parent="Coins" instance=ExtResource("2")] +position = Vector2(896, 624) + +[node name="Coin16" parent="Coins" instance=ExtResource("2")] +position = Vector2(928, 624) + +[node name="Coin17" parent="Coins" instance=ExtResource("2")] +position = Vector2(960, 624) + +[node name="Coin18" parent="Coins" instance=ExtResource("2")] +position = Vector2(960, 592) + +[node name="Coin19" parent="Coins" instance=ExtResource("2")] +position = Vector2(928, 592) + +[node name="Coin20" parent="Coins" instance=ExtResource("2")] +position = Vector2(896, 592) + +[node name="Coin21" parent="Coins" instance=ExtResource("2")] +position = Vector2(49.4434, 244.258) + +[node name="Coin22" parent="Coins" instance=ExtResource("2")] +position = Vector2(44.7994, 240.609) + +[node name="Coin23" parent="Coins" instance=ExtResource("2")] +position = Vector2(54.0875, 240.609) + +[node name="Coin24" parent="Coins" instance=ExtResource("2")] +position = Vector2(58.068, 234.969) + +[node name="Coin25" parent="Coins" instance=ExtResource("2")] +position = Vector2(58.7315, 228.999) + +[node name="Coin26" parent="Coins" instance=ExtResource("2")] +position = Vector2(53.092, 224.686) + +[node name="Coin27" parent="Coins" instance=ExtResource("2")] +position = Vector2(49.1117, 229.331) + +[node name="Coin28" parent="Coins" instance=ExtResource("2")] +position = Vector2(44.136, 224.355) + +[node name="Coin29" parent="Coins" instance=ExtResource("2")] +position = Vector2(39.8238, 228.667) + +[node name="Coin30" parent="Coins" instance=ExtResource("2")] +position = Vector2(41.4823, 234.306) + +[node name="Coin31" parent="Coins" instance=ExtResource("2")] +position = Vector2(1678.71, 232.644) + +[node name="Coin32" parent="Coins" instance=ExtResource("2")] +position = Vector2(1710.71, 232.644) + +[node name="Coin33" parent="Coins" instance=ExtResource("2")] +position = Vector2(1742.71, 232.644) + +[node name="Coin34" parent="Coins" instance=ExtResource("2")] +position = Vector2(1742.71, 200.644) + +[node name="Coin35" parent="Coins" instance=ExtResource("2")] +position = Vector2(1710.71, 200.644) + +[node name="Coin36" parent="Coins" instance=ExtResource("2")] +position = Vector2(1678.71, 200.644) + +[node name="Coin37" parent="Coins" instance=ExtResource("2")] +position = Vector2(2086.38, 302.529) + +[node name="Coin38" parent="Coins" instance=ExtResource("2")] +position = Vector2(2118.38, 302.529) + +[node name="Coin39" parent="Coins" instance=ExtResource("2")] +position = Vector2(2150.38, 302.529) + +[node name="Coin40" parent="Coins" instance=ExtResource("2")] +position = Vector2(2150.38, 270.529) + +[node name="Coin41" parent="Coins" instance=ExtResource("2")] +position = Vector2(2118.38, 270.529) + +[node name="Coin42" parent="Coins" instance=ExtResource("2")] +position = Vector2(2086.38, 270.529) + +[node name="Props" type="Node2D" parent="."] + +[node name="MovingPlatform1" parent="Props" instance=ExtResource("3")] +position = Vector2(725, 439) + +[node name="MovingPlatform2" parent="Props" instance=ExtResource("3")] +position = Vector2(438, 272) + +[node name="MovingPlatform3" parent="Props" instance=ExtResource("3")] +position = Vector2(1554, 369) + +[node name="MovePlatforms" type="AnimationPlayer" parent="Props"] +libraries = { +"": SubResource("AnimationLibrary_el48w") +} +autoplay = "move" + +[node name="Seesaw" parent="Props" instance=ExtResource("4")] +position = Vector2(1201.4, 424.76) + +[node name="OneWayPlatform" parent="Props" instance=ExtResource("5")] +position = Vector2(465, 560.405) + +[node name="Player" parent="." instance=ExtResource("6_fauva")] +position = Vector2(126, 501) + +[node name="Enemies" type="Node2D" parent="."] + +[node name="Enemy1" parent="Enemies" instance=ExtResource("7")] +position = Vector2(417.332, 654.8) +physics_material_override = SubResource("2") + +[node name="Enemy2" parent="Enemies" instance=ExtResource("7")] +position = Vector2(353.832, 612.525) +physics_material_override = SubResource("3") + +[node name="Enemy3" parent="Enemies" instance=ExtResource("7")] +position = Vector2(562.605, 526.53) +physics_material_override = SubResource("4") + +[node name="Enemy4" parent="Enemies" instance=ExtResource("7")] +position = Vector2(646.055, 529.62) +physics_material_override = SubResource("5") + +[node name="Enemy5" parent="Enemies" instance=ExtResource("7")] +position = Vector2(803.69, 461.62) +physics_material_override = SubResource("6") + +[node name="Enemy6" parent="Enemies" instance=ExtResource("7")] +position = Vector2(1325, 391) +physics_material_override = SubResource("7") + +[node name="Enemy7" parent="Enemies" instance=ExtResource("7")] +position = Vector2(728.8, 344.371) +physics_material_override = SubResource("8") + +[node name="Enemy8" parent="Enemies" instance=ExtResource("7")] +position = Vector2(596.815, 230.191) +physics_material_override = SubResource("9") + +[node name="Enemy9" parent="Enemies" instance=ExtResource("7")] +position = Vector2(1714.86, 270.432) +physics_material_override = SubResource("10") + +[node name="Enemy10" parent="Enemies" instance=ExtResource("7")] +position = Vector2(1773.1, 678.095) +physics_material_override = SubResource("11") + +[node name="Enemy11" parent="Enemies" instance=ExtResource("7")] +position = Vector2(1203.31, 407.557) +physics_material_override = SubResource("12") + +[node name="ParallaxBg" parent="." instance=ExtResource("8")] + +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +stream = ExtResource("9") +autoplay = true diff --git a/project/tiles_demo.png b/project/tiles_demo.png new file mode 100644 index 0000000..d0a655f Binary files /dev/null and b/project/tiles_demo.png differ diff --git a/project/tiles_demo.png.import b/project/tiles_demo.png.import new file mode 100644 index 0000000..0aee776 --- /dev/null +++ b/project/tiles_demo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbcdt0wqr3gd3" +path="res://.godot/imported/tiles_demo.png-7ca5c7c5c02ab8abe0d585a6a8f086bd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://tiles_demo.png" +dest_files=["res://.godot/imported/tiles_demo.png-7ca5c7c5c02ab8abe0d585a6a8f086bd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/tileset.tres b/project/tileset.tres new file mode 100644 index 0000000..6370f8e --- /dev/null +++ b/project/tileset.tres @@ -0,0 +1,542 @@ +[gd_resource type="TileSet" load_steps=18 format=3 uid="uid://rowrak7ls50v"] + +[ext_resource type="Texture2D" uid="uid://dbcdt0wqr3gd3" path="res://tiles_demo.png" id="1"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_va8am"] +texture = ExtResource("1") +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -12, 16, -12, 16, 16, -16, 16) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(16, -12, -16, -12, -16, 16, 16, 16) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 12, 16, 12, 16, -16, -16, -16) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(16, 12, -16, 12, -16, -16, 16, -16) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -12, 16, -12, 16, 16, -16, 16) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, -12, -16, -12, -16, 16, 16, 16) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 12, 16, 12, 16, -16, -16, -16) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, 12, -16, 12, -16, -16, 16, -16) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_dri2i"] +texture = ExtResource("1") +margins = Vector2i(32, 0) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -12, 12, -12, 12, 16) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -12, -12, -12, -12, 16) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 12, 12, 12, 12, -16) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 12, -12, 12, -12, -16) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -12, 12, -12, 12, 16) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -12, -12, -12, -12, 16) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 12, 12, 12, 12, -16) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 12, -12, 12, -12, -16) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_hfgct"] +texture = ExtResource("1") +margins = Vector2i(0, 32) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_7xlxp"] +texture = ExtResource("1") +margins = Vector2i(192, 32) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, -16, -16, -16, 16, 16, 16) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, 16, 16, 16, -16, -16, -16) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, -16, 16, -16, -16, 16, -16) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, -16, -16, -16, 16, 16, 16) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, 16, 16, 16, -16, -16, -16) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, -16, 16, -16, -16, 16, -16) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_64p8q"] +texture = ExtResource("1") +margins = Vector2i(64, 32) +texture_region_size = Vector2i(32, 96) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -10, 16, 22, 16, 48, -16, 48) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 22, 16, -10, 16, 48, -16, 48) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -48, 16, -48, 16, -22, -16, 10) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -48, 16, -48, 16, 10, -16, -22) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -28, 16, 4, 16, 32, -16, 32) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, -28, -16, 4, -16, 32, 16, 32) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 28, 16, -4, 16, -32, -16, -32) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, 28, -16, -4, -16, -32, 16, -32) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_bgjgk"] +texture = ExtResource("1") +margins = Vector2i(224, 32) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 12, -16, 12, 16) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -16, -12, -16, -12, 16) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 16, 12, 16, 12, -16) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 16, -12, 16, -12, -16) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 12, -16, 12, 16) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -16, -12, -16, -12, 16) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 16, 12, 16, 12, -16) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 16, -12, 16, -12, -16) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_uq55q"] +texture = ExtResource("1") +margins = Vector2i(64, 0) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -12, 16, -12, 16, 12, -16, 12) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(16, -12, -16, -12, -16, 12, 16, 12) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 12, 16, 12, 16, -12, -16, -12) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(16, 12, -16, 12, -16, -12, 16, -12) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -12, 16, -12, 16, 12, -16, 12) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, -12, -16, -12, -16, 12, 16, 12) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 12, 16, 12, 16, -12, -16, -12) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, 12, -16, 12, -16, -12, 16, -12) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_l5dh6"] +texture = ExtResource("1") +margins = Vector2i(96, 0) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -12, 12, -12, 12, 12, -16, 12) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(16, -12, -12, -12, -12, 12, 16, 12) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 12, 12, 12, 12, -12, -16, -12) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(16, 12, -12, 12, -12, -12, 16, -12) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -12, 12, -12, 12, 12, -16, 12) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, -12, -12, -12, -12, 12, 16, 12) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 12, 12, 12, 12, -12, -16, -12) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, 12, -12, 12, -12, -12, 16, -12) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_w6c8t"] +texture = ExtResource("1") +margins = Vector2i(32, 32) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 12, -16, 12, 16) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -16, -12, -16, -12, 16) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 16, 12, 16, 12, -16) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 16, -12, 16, -12, -16) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 12, -16, 12, 16) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -16, -12, -16, -12, 16) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 16, 12, 16, 12, -16) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 16, -12, 16, -12, -16) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_05nbk"] +texture = ExtResource("1") +margins = Vector2i(160, 64) +texture_region_size = Vector2i(96, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-48, 16, -48, -16, -20, -16, -20, 16) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(48, 16, 48, -16, 20, -16.5, 20, 16) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, -32, 16, -4, 16, -4, -16) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(32, -16, 32, 16, 4, 16, 4, -16) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 16, -32, -16, -4, -16, -4, 16) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(32, 16, 32, -16, 4, -16, 4, 16) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, -32, 16, -4, 16, -4, -16) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(32, -16, 32, 16, 4, 16, 4, -16) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ee0gv"] +texture = ExtResource("1") +margins = Vector2i(32, 64) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 12, -16, 16, -12, 16, 16) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -16, -12, -16, -16, -12, -16, 16) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 16, 12, 16, 16, 12, 16, -16) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 16, -12, 16, -16, 12, -16, -16) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 12, -16, 16, -12, 16, 16) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -16, -12, -16, -16, -12, -16, 16) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 16, 12, 16, 16, 12, 16, -16) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 16, -12, 16, -16, 12, -16, -16) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_lnu6d"] +texture = ExtResource("1") +margins = Vector2i(96, 96) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -12, 16, -12, 16, 16) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -12, -16, -12, -16, 16) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 12, 16, 12, 16, -16) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 12, -16, 12, -16, -16) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -12, 16, -12, 16, 16) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -12, -16, -12, -16, 16) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 12, 16, 12, 16, -16) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 12, -16, 12, -16, -16) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_8javq"] +texture = ExtResource("1") +margins = Vector2i(128, 96) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -12, 16, -12, 16, 16) +0:0/1 = 1 +0:0/1/flip_h = true +0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -12, -16, -12, -16, 16) +0:0/2 = 2 +0:0/2/flip_v = true +0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 12, 16, 12, 16, -16) +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 12, -16, 12, -16, -16) +0:0/4 = 4 +0:0/4/transpose = true +0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -12, 16, -12, 16, 16) +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, 16, -12, -16, -12, -16, 16) +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 12, 16, 12, 16, -16) +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true +0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 16, 12, -16, 12, -16, -16) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_8pchj"] +texture = ExtResource("1") +margins = Vector2i(128, 64) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/1 = 1 +0:0/1/flip_h = true +0:0/2 = 2 +0:0/2/flip_v = true +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/4 = 4 +0:0/4/transpose = true +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_s315k"] +texture = ExtResource("1") +margins = Vector2i(128, 32) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/1 = 1 +0:0/1/flip_h = true +0:0/2 = 2 +0:0/2/flip_v = true +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/4 = 4 +0:0/4/transpose = true +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_cnnsu"] +texture = ExtResource("1") +margins = Vector2i(128, 0) +texture_region_size = Vector2i(32, 32) +0:0/next_alternative_id = 8 +0:0/0 = 0 +0:0/1 = 1 +0:0/1/flip_h = true +0:0/2 = 2 +0:0/2/flip_v = true +0:0/3 = 3 +0:0/3/flip_h = true +0:0/3/flip_v = true +0:0/4 = 4 +0:0/4/transpose = true +0:0/5 = 5 +0:0/5/flip_h = true +0:0/5/transpose = true +0:0/6 = 6 +0:0/6/flip_v = true +0:0/6/transpose = true +0:0/7 = 7 +0:0/7/flip_h = true +0:0/7/flip_v = true +0:0/7/transpose = true + +[resource] +tile_size = Vector2i(32, 32) +physics_layer_0/collision_layer = 1 +sources/0 = SubResource("TileSetAtlasSource_va8am") +sources/1 = SubResource("TileSetAtlasSource_dri2i") +sources/2 = SubResource("TileSetAtlasSource_w6c8t") +sources/3 = SubResource("TileSetAtlasSource_05nbk") +sources/4 = SubResource("TileSetAtlasSource_ee0gv") +sources/5 = SubResource("TileSetAtlasSource_lnu6d") +sources/6 = SubResource("TileSetAtlasSource_8javq") +sources/7 = SubResource("TileSetAtlasSource_8pchj") +sources/8 = SubResource("TileSetAtlasSource_s315k") +sources/9 = SubResource("TileSetAtlasSource_cnnsu") +sources/10 = SubResource("TileSetAtlasSource_hfgct") +sources/11 = SubResource("TileSetAtlasSource_7xlxp") +sources/12 = SubResource("TileSetAtlasSource_64p8q") +sources/13 = SubResource("TileSetAtlasSource_bgjgk") +sources/14 = SubResource("TileSetAtlasSource_uq55q") +sources/15 = SubResource("TileSetAtlasSource_l5dh6") diff --git a/project/tileset_edit.tscn b/project/tileset_edit.tscn new file mode 100644 index 0000000..e6dc6b7 --- /dev/null +++ b/project/tileset_edit.tscn @@ -0,0 +1,158 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://tiles_demo.png" type="Texture2D" id=1] + +[node name="TilesetEdit" type="Node2D"] + +[node name="Floor" type="Sprite2D" parent="."] +texture = ExtResource( 1 ) +region_rect = Rect2(0, 0, 32, 32) + +[node name="Collision" type="StaticBody2D" parent="Floor"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Floor/Collision"] +polygon = PackedVector2Array(16, -12, 16, 16, -16, 16, -16, -12) + +[node name="Edge" type="Sprite2D" parent="."] +position = Vector2(32, 0) +texture = ExtResource( 1 ) +region_rect = Rect2(32, 0, 32, 32) + +[node name="Collision" type="StaticBody2D" parent="Edge"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Edge/Collision"] +polygon = PackedVector2Array(-16, -12, 12, -12, 12, 16, -16, 16) + +[node name="Wall" type="Sprite2D" parent="."] +position = Vector2(32, 32) +texture = ExtResource( 1 ) +region_rect = Rect2(32, 32, 32, 32) + +[node name="Collision" type="StaticBody2D" parent="Wall"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Wall/Collision"] +polygon = PackedVector2Array(-16, -16, 12, -16, 12, 16, -16, 16) + +[node name="WallDeco" type="Sprite2D" parent="."] +position = Vector2(48, 64) +texture = ExtResource( 1 ) +region_rect = Rect2(160, 64, 64, 32) + +[node name="Collision" type="StaticBody2D" parent="WallDeco"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="WallDeco/Collision"] +polygon = PackedVector2Array(-32, -16, -4, -16, -4, 16, -32, 16) + +[node name="Corner" type="Sprite2D" parent="."] +position = Vector2(32, 96) +texture = ExtResource( 1 ) +region_rect = Rect2(32, 64, 32, 32) + +[node name="Collision" type="StaticBody2D" parent="Corner"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Corner/Collision"] +polygon = PackedVector2Array(-16, -16, 12, -16, 16, -12, 16, 16, -16, 16) + +[node name="Flowers" type="Sprite2D" parent="."] +position = Vector2(64, 96) +texture = ExtResource( 1 ) +region_rect = Rect2(96, 96, 32, 32) + +[node name="Collision" type="StaticBody2D" parent="Flowers"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Flowers/Collision"] +polygon = PackedVector2Array(-16, 16, 16, 16, 16, -12, -16, -12) + +[node name="TreeBase" type="Sprite2D" parent="."] +position = Vector2(96, 96) +texture = ExtResource( 1 ) +region_rect = Rect2(128, 96, 32, 32) + +[node name="Collision" type="StaticBody2D" parent="TreeBase"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="TreeBase/Collision"] +polygon = PackedVector2Array(-16, 16, 16, 16, 16, -12, -16, -12) + +[node name="TreeMid" type="Sprite2D" parent="."] +position = Vector2(96, 64) +texture = ExtResource( 1 ) +region_rect = Rect2(128, 64, 32, 32) + +[node name="TreeMid2" type="Sprite2D" parent="."] +position = Vector2(96, 32) +texture = ExtResource( 1 ) +region_rect = Rect2(128, 32, 32, 32) + +[node name="TreeTop" type="Sprite2D" parent="."] +position = Vector2(96, 0) +texture = ExtResource( 1 ) +region_rect = Rect2(128, 0, 32, 32) + +[node name="Solid" type="Sprite2D" parent="."] +position = Vector2(0, 32) +texture = ExtResource( 1 ) +region_rect = Rect2(0, 32, 32, 32) + +[node name="Ceiling" type="Sprite2D" parent="."] +position = Vector2(0, 64) +texture = ExtResource( 1 ) +region_rect = Rect2(192, 32, 32, 32) + +[node name="Collision" type="StaticBody2D" parent="Ceiling"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Ceiling/Collision"] +polygon = PackedVector2Array(16, -16, 16, 16, -16, 16, -16, -16) + +[node name="Ramp" type="Sprite2D" parent="."] +position = Vector2(128, 112) +texture = ExtResource( 1 ) +region_rect = Rect2(64, 64, 32, 64) + +[node name="Collision" type="StaticBody2D" parent="Ramp"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Ramp/Collision"] +polygon = PackedVector2Array(-16, -28, 16, 4, 16, 32, -16, 32) + +[node name="CeilingWall" type="Sprite2D" parent="."] +position = Vector2(0, 96) +texture = ExtResource( 1 ) +region_rect = Rect2(224, 32, 32, 32) + +[node name="Collision" type="StaticBody2D" parent="CeilingWall"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="CeilingWall/Collision"] +polygon = PackedVector2Array(-16, -16, 12, -16, 12, 16, -16, 16) + +[node name="PlatformFloor" type="Sprite2D" parent="."] +position = Vector2(0, 128) +texture = ExtResource( 1 ) +region_rect = Rect2(64, 0, 32, 32) + +[node name="Collision" type="StaticBody2D" parent="PlatformFloor"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="PlatformFloor/Collision"] +polygon = PackedVector2Array(16, -12, 16, 12, -16, 12, -16, -12) + +[node name="PlatformEdge" type="Sprite2D" parent="."] +position = Vector2(32, 128) +texture = ExtResource( 1 ) +region_rect = Rect2(96, 0, 32, 32) + +[node name="Collision" type="StaticBody2D" parent="PlatformEdge"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="PlatformEdge/Collision"] +polygon = PackedVector2Array(12, -12, 12, 12, -16, 12, -16, -12) + +[node name="Help" type="Label" parent="."] +offset_left = 1.0 +offset_top = 331.0 +offset_right = 727.0 +offset_bottom = 422.0 +size_flags_horizontal = 2 +text = "This scene serves as a tool for editing the tileset. +Nodes (sprites) and their respective collisionsare edited here. + +To create a tileset from this, a \"TileSet\" resoucre must be created. Use the helper in: Scene -> Convert To -> TileSet. +This will save a tileset. Saving over it will merge your changes. + +Finally, the saved tileset resource (tileset.tres in this case), can be opened to be used into a TileMap node for editing a tile map."