2d template pushed

This commit is contained in:
Jan van der Weide 2025-03-13 10:06:36 +01:00
parent aa8cc49f4d
commit 4da7e28cb5
73 changed files with 3120 additions and 11 deletions

34
project/README.md Normal file
View file

@ -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

BIN
project/audio/music.ogg Normal file

Binary file not shown.

View file

@ -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

Binary file not shown.

View file

@ -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

Binary file not shown.

View file

@ -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

BIN
project/audio/sound_hit.wav Normal file

Binary file not shown.

View file

@ -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

Binary file not shown.

View file

@ -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

Binary file not shown.

View file

@ -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

View file

@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B

View file

@ -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

View file

@ -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")

8
project/coin/coin.gd Normal file
View file

@ -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")

BIN
project/coin/coin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

View file

@ -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

143
project/coin/coin.tscn Normal file
View file

@ -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"]

87
project/enemy/enemy.gd Normal file
View file

@ -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()

BIN
project/enemy/enemy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

View file

@ -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

202
project/enemy/enemy.tscn Normal file
View file

@ -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")

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

Before

Width:  |  Height:  |  Size: 994 B

BIN
project/icon.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

34
project/icon.webp.import Normal file
View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

View file

@ -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

View file

@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

View file

@ -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

View file

@ -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

15
project/player/bullet.gd Normal file
View file

@ -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

BIN
project/player/bullet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

View file

@ -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

View file

@ -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"]

BIN
project/player/osb_fire.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -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

BIN
project/player/osb_jump.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

View file

@ -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

BIN
project/player/osb_left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

View file

@ -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

208
project/player/player.gd Normal file
View file

@ -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)

278
project/player/player.tscn Normal file
View file

@ -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")

BIN
project/player/player.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -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

View file

@ -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"

View file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

344
project/stage.tscn Normal file

File diff suppressed because one or more lines are too long

BIN
project/tiles_demo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -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

542
project/tileset.tres Normal file
View file

@ -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")

158
project/tileset_edit.tscn Normal file
View file

@ -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."