Port demos with remade art assets to Godot 4 (#922)

This re-ports the following demos to Godot 4 following their latest `3.x` versions:

- 2D Navigation with AStarGrid2D
- 2D JRPG Demo
- 2D Isometric Game
- 2D Platformer

Some tweaks have also been made in the process, such as split screen players
having different colors in the 2D Platformer demo.

Co-authored-by: Nonparoxysmic <69494951+Nonparoxysmic@users.noreply.github.com>
This commit is contained in:
Hugo Locurcio
2024-02-10 01:40:04 +01:00
committed by GitHub
parent 8fc246a051
commit 4d01a2678f
344 changed files with 13796 additions and 2803 deletions

View File

@@ -7,7 +7,7 @@ as well as be occluded when standing in front or behind them.
Language: GDScript
Renderer: GLES 2
Renderer: Compatibility
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/112
@@ -21,6 +21,10 @@ and [`CollisionPolygon2D`](https://docs.godotengine.org/en/latest/classes/class_
at their base. The player also has a collider at its base,
which makes the player collide with the level.
2D lighting effects are achieved using a mixture of PointLight2D nodes (which provide real-time shadows)
and pre-placed Polygon2Ds with sprites. To provide additional ambient shading, the goblin also has a blob
shadow below its feet (a Sprite2D with a texture).
## Screenshots
![Screenshot](screenshots/isometric.png)
![Screenshot](screenshots/isometric.webp)

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b4n7s65t0qoep"
path="res://.godot/imported/cloud_1.webp-d4440f8a56714fd63d83c7074d20ace3.ctex"
uid="uid://bycat883fu7q2"
path="res://.godot/imported/banner.png-45264389ab2131df9b78c5ec3b246773.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://level/cloud_1.webp"
dest_files=["res://.godot/imported/cloud_1.webp-d4440f8a56714fd63d83c7074d20ace3.ctex"]
source_file="res://decorations/banner.png"
dest_files=["res://.godot/imported/banner.png-45264389ab2131df9b78c5ec3b246773.ctex"]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dpxv7d5d7hm33"
path="res://.godot/imported/bone_pile_1.png-72c582c4f31012bb8009120719983b0c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/bone_pile_1.png"
dest_files=["res://.godot/imported/bone_pile_1.png-72c582c4f31012bb8009120719983b0c.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,20 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://decorations/bone_pile_1.png" type="Texture2D" id=1]
[sub_resource type="CapsuleShape2D" id=1]
radius = 18.0
height = 28.0
[node name="bone_pile" type="Node2D"]
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="StaticBody2D"]
position = Vector2( 0, -14 )
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2( 0, -15 )
rotation = 1.5708
shape = SubResource( 1 )

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://wxpdcei7yeuk"
path="res://.godot/imported/bone_pile_2.png-f448133711e0ebea56f9e49e956ac902.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/bone_pile_2.png"
dest_files=["res://.godot/imported/bone_pile_2.png-f448133711e0ebea56f9e49e956ac902.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,20 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://decorations/bone_pile_2.png" type="Texture2D" id=1]
[sub_resource type="CapsuleShape2D" id=1]
radius = 13.0
height = 26.0001
[node name="bone_pile" type="Node2D"]
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2( 0, -13 )
texture = ExtResource( 1 )
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2( 0, -13 )
rotation = 1.5708
shape = SubResource( 1 )

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cubkvnu4fdwki"
path="res://.godot/imported/cloud_2.webp-6870de4e2ed6536e37af4c22aa731ad1.ctex"
uid="uid://bkae3n748i0ow"
path="res://.godot/imported/candle.png-223de51ae9e8ec99121079382498836e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://level/cloud_2.webp"
dest_files=["res://.godot/imported/cloud_2.webp-6870de4e2ed6536e37af4c22aa731ad1.ctex"]
source_file="res://decorations/candle.png"
dest_files=["res://.godot/imported/candle.png-223de51ae9e8ec99121079382498836e.ctex"]
[params]

View File

@@ -0,0 +1,131 @@
[gd_scene load_steps=14 format=2]
[ext_resource path="res://decorations/sparkle.png" type="Texture2D" id=1]
[ext_resource path="res://decorations/candle.png" type="Texture2D" id=2]
[ext_resource path="res://decorations/fire.png" type="Texture2D" id=3]
[ext_resource path="res://decorations/glow.png" type="Texture2D" id=4]
[sub_resource type="CanvasItemMaterial" id=1]
particles_animation = true
particles_anim_h_frames = 11
particles_anim_v_frames = 1
particles_anim_loop = false
[sub_resource type="Gradient" id=2]
offsets = PackedFloat32Array( 0, 0.625698, 1 )
colors = PackedColorArray( 1, 0.584314, 0, 1, 1, 0.84063, 0.226563, 1, 1, 0.584314, 0, 1 )
[sub_resource type="CanvasItemMaterial" id=3]
blend_mode = 1
particles_animation = true
particles_anim_h_frames = 8
particles_anim_v_frames = 1
particles_anim_loop = false
[sub_resource type="Curve" id=4]
max_value = 0.3
_data = [ Vector2( 0, 0 ), 0.0, 1.36377, 0, 0, Vector2( 0.262376, 0.188182 ), 0.41974, 0.41974, 0, 0, Vector2( 1, 0.0295454 ), -1.06101, 0.0, 0, 0 ]
[sub_resource type="Gradient" id=5]
offsets = PackedFloat32Array( 0, 0.435754, 1 )
colors = PackedColorArray( 1, 0.351563, 0, 1, 0.895996, 0.745333, 0.230999, 1, 1, 0.426842, 0.0234375, 1 )
[sub_resource type="Gradient" id=12]
offsets = PackedFloat32Array( 0, 0.100559, 0.234637, 0.480447, 0.603352, 1 )
colors = PackedColorArray( 0.714844, 0.714844, 0.714844, 1, 0.382813, 0.382813, 0.382813, 1, 0.601563, 0.601563, 0.601563, 1, 0.229687, 0.229687, 0.229687, 1, 0.0197581, 0.0197581, 0.0197581, 1, 0, 0, 0, 1 )
[sub_resource type="GradientTexture2D" id=9]
gradient = SubResource( 12 )
width = 128
height = 128
fill = 1
fill_from = Vector2( 0.5, 0.5 )
fill_to = Vector2( 0, 0 )
[sub_resource type="Gradient" id=13]
offsets = PackedFloat32Array( 0.0111732, 0.843575 )
colors = PackedColorArray( 0.648926, 0.648926, 0.648926, 1, 0, 0, 0, 1 )
[sub_resource type="GradientTexture2D" id=10]
gradient = SubResource( 13 )
width = 800
height = 500
fill = 1
fill_from = Vector2( 0.5, 0.5 )
[node name="Node2D" type="Node2D"]
[node name="Sprite2D" type="Sprite2D" parent="."]
light_mask = 128
position = Vector2( 0, -11 )
texture = ExtResource( 2 )
[node name="glow" type="CPUParticles2D" parent="Sprite2D"]
modulate = Color( 1, 0.360784, 0.113725, 1 )
light_mask = 128
position = Vector2( -13, -33.244 )
scale = Vector2( 0.3, 0.5 )
amount = 1
lifetime = 0.8
texture = ExtResource( 4 )
gravity = Vector2( 0, 0 )
[node name="Fire" type="CPUParticles2D" parent="Sprite2D"]
light_mask = 128
material = SubResource( 1 )
position = Vector2( -13, -35 )
scale = Vector2( 0.6, 0.6 )
amount = 1
lifetime = 0.8
texture = ExtResource( 3 )
gravity = Vector2( 0, 0 )
color_ramp = SubResource( 2 )
anim_speed = 1.0
[node name="Sparkle" type="CPUParticles2D" parent="Sprite2D"]
light_mask = 128
material = SubResource( 3 )
position = Vector2( -13, -35 )
scale = Vector2( 0.6, 0.6 )
amount = 3
texture = ExtResource( 1 )
emission_shape = 1
emission_sphere_radius = 8.0
gravity = Vector2( 0, -80 )
angular_velocity = 1.0
tangential_accel = 49.54
scale_amount_curve = SubResource( 4 )
color_ramp = SubResource( 5 )
anim_speed = 1.0
[node name="flow front" type="CPUParticles2D" parent="Sprite2D"]
modulate = Color( 0.94902, 1, 0, 1 )
light_mask = 128
position = Vector2( -13, -28.689 )
scale = Vector2( 0.25, 0.25 )
amount = 1
lifetime = 0.8
texture = ExtResource( 4 )
gravity = Vector2( 0, 0 )
[node name="Light2D2" type="PointLight2D" parent="."]
light_mask = 2
position = Vector2( -15, -49 )
texture = SubResource( 9 )
color = Color( 1, 0.466667, 0.0352941, 1 )
energy = 2.0
range_height = 450.9
range_item_cull_mask = 145
shadow_buffer_size = 512
shadow_gradient_length = 30.0
shadow_item_cull_mask = 145
[node name="PointLight2D" type="PointLight2D" parent="."]
light_mask = 2
texture = SubResource( 10 )
color = Color( 0.709804, 0.388235, 0.313726, 1 )
range_height = 901.9
range_item_cull_mask = 17
shadow_enabled = true
shadow_gradient_length = 20.0
shadow_item_cull_mask = 17

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b6sjbdj350qkj"
path="res://.godot/imported/coin_pile.png-e6c4ef8bf22301fe805244aafb152afe.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/coin_pile.png"
dest_files=["res://.godot/imported/coin_pile.png-e6c4ef8bf22301fe805244aafb152afe.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,20 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://decorations/coin_pile.png" type="Texture2D" id=1]
[sub_resource type="CapsuleShape2D" id=1]
radius = 12.0
height = 38.0
[node name="coin_pile" type="Node2D"]
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="StaticBody2D"]
position = Vector2( 0, -23 )
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2( 0, -13 )
rotation = 1.5708
shape = SubResource( 1 )

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dami7imxtk2iq"
path="res://.godot/imported/crow_looking.png-21ce662085fe50bb572e6cecb19ea02a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/crow_looking.png"
dest_files=["res://.godot/imported/crow_looking.png-21ce662085fe50bb572e6cecb19ea02a.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: 51 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d3j0qnogdctw4"
path="res://.godot/imported/crow_sleep.png-8118ad8761e95d588250a6deae9ca9c0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/crow_sleep.png"
dest_files=["res://.godot/imported/crow_sleep.png-8118ad8761e95d588250a6deae9ca9c0.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: 9.2 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dahfdmuvra5we"
path="res://.godot/imported/drape_1.png-4cc207f7e61e16248cb4322ecca80e49.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/drape_1.png"
dest_files=["res://.godot/imported/drape_1.png-4cc207f7e61e16248cb4322ecca80e49.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: 5.1 KiB

View File

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b8fv8swublbqq"
path="res://.godot/imported/troll.png-78efc50bfccaa17f54d40cfea3eef5f5.ctex"
uid="uid://bfa7cvk3m65n3"
path="res://.godot/imported/fire.png-3d46874d6317d8fad2d37ee8071d140d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://troll.png"
dest_files=["res://.godot/imported/troll.png-78efc50bfccaa17f54d40cfea3eef5f5.ctex"]
source_file="res://decorations/fire.png"
dest_files=["res://.godot/imported/fire.png-3d46874d6317d8fad2d37ee8071d140d.ctex"]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cnxf4hsvrcgka"
path="res://.godot/imported/sky.webp-378e3d4469ee1943579600be36d5a9f5.ctex"
uid="uid://cginrtmcplrec"
path="res://.godot/imported/glow.png-412cb028114e1a11dcd8adb3e27078d4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://level/sky.webp"
dest_files=["res://.godot/imported/sky.webp-378e3d4469ee1943579600be36d5a9f5.ctex"]
source_file="res://decorations/glow.png"
dest_files=["res://.godot/imported/glow.png-412cb028114e1a11dcd8adb3e27078d4.ctex"]
[params]

View File

@@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://decorations/shadow_gradient.png" type="Texture2D" id=1]
[node name="InternalShadow" type="Polygon2D"]
color = Color( 0.0705882, 0.0705882, 0.266667, 0.85098 )
texture = ExtResource( 1 )
polygon = PackedVector2Array( -92, -289, -94, 1, 128, -1, 121, -295 )
uv = PackedVector2Array( -2, -1, -2, 292, 264, 291, 261, -2 )

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dmqbp4e43sm1t"
path="res://.godot/imported/paw_prints.png-f99788aaeccec00607d299cbda1deba3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/paw_prints.png"
dest_files=["res://.godot/imported/paw_prints.png-f99788aaeccec00607d299cbda1deba3.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: 34 KiB

View File

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://go76jbr7e1px"
path="res://.godot/imported/player.webp-f8efd9c2246a95708b9c4853ed21513e.ctex"
uid="uid://bqugyxfkeyt7x"
path="res://.godot/imported/rug_1.png-73bb18740fb0416ff279c3e2e040e1e3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/player.webp"
dest_files=["res://.godot/imported/player.webp-f8efd9c2246a95708b9c4853ed21513e.ctex"]
source_file="res://decorations/rug_1.png"
dest_files=["res://.godot/imported/rug_1.png-73bb18740fb0416ff279c3e2e040e1e3.ctex"]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmxo4k7h2nl7h"
path="res://.godot/imported/shadow_gradient.png-ada77e271da2569a07ee8c308bf8f891.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/shadow_gradient.png"
dest_files=["res://.godot/imported/shadow_gradient.png-ada77e271da2569a07ee8c308bf8f891.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: 6.6 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bs6uc40vmpmhd"
path="res://.godot/imported/sparkle.png-19a635cf744f1090fe6b7df22aa07aa4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/sparkle.png"
dest_files=["res://.godot/imported/sparkle.png-19a635cf744f1090fe6b7df22aa07aa4.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: 6.1 KiB

View File

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://5tho6j8r4eam"
path="res://.godot/imported/cloud_3.webp-a303ee6af47d3df137be263a98a9fa7d.ctex"
uid="uid://qqvwu82wedp2"
path="res://.godot/imported/vase_1.png-926d438e092a6711354055578c6046bd.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://level/cloud_3.webp"
dest_files=["res://.godot/imported/cloud_3.webp-a303ee6af47d3df137be263a98a9fa7d.ctex"]
source_file="res://decorations/vase_1.png"
dest_files=["res://.godot/imported/vase_1.png-926d438e092a6711354055578c6046bd.ctex"]
[params]

View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://dxxtyefaa4rtn"]
[ext_resource type="Texture2D" uid="uid://qqvwu82wedp2" path="res://decorations/vase_1.png" id="1"]
[sub_resource type="CapsuleShape2D" id="1"]
radius = 9.0
[node name="Vase1" type="Node2D"]
y_sort_enabled = true
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="StaticBody2D"]
position = Vector2(0, -29)
texture = ExtResource("1")
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2(0, -9)
rotation = 1.5708
shape = SubResource("1")

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cfl2km5k5pbgd"
path="res://.godot/imported/vase_2.png-d6cca4a3647dd9b8a230cb201e6f4d32.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/vase_2.png"
dest_files=["res://.godot/imported/vase_2.png-d6cca4a3647dd9b8a230cb201e6f4d32.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,21 @@
[gd_scene load_steps=3 format=3 uid="uid://ccxtgas16pmio"]
[ext_resource type="Texture2D" uid="uid://cfl2km5k5pbgd" path="res://decorations/vase_2.png" id="1"]
[sub_resource type="CapsuleShape2D" id="1"]
radius = 9.0
height = 18.0
[node name="vase2" type="Node2D"]
y_sort_enabled = true
[node name="Area2D" type="StaticBody2D" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="Area2D"]
position = Vector2(0, -20)
texture = ExtResource("1")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(0, -8)
rotation = 1.5708
shape = SubResource("1")

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cy8biel27i5i7"
path="res://.godot/imported/wall_skull.png-b65fc438ee51c09cef1ea57aa5c7d6b2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://decorations/wall_skull.png"
dest_files=["res://.godot/imported/wall_skull.png-b65fc438ee51c09cef1ea57aa5c7d6b2.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

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -2,7 +2,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://brwp8bimc75uu"
uid="uid://dwrfxefhjkitp"
path="res://.godot/imported/icon.webp-e94f9a68b0f625a567a797079e4d325f.ctex"
metadata={
"vram_texture": false

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -0,0 +1,56 @@
extends CharacterBody2D
const MOTION_SPEED = 160 # Pixels/second.
var last_direction = Vector2(1, 0)
var anim_directions = {
"idle": [ # list of [animation name, horizontal flip]
["side_right_idle", false],
["45front_right_idle", false],
["front_idle", false],
["45front_left_idle", false],
["side_left_idle", false],
["45back_left_idle", false],
["back_idle", false],
["45back_right_idle", false],
],
"walk": [
["side_right_walk", false],
["45front_right_walk", false],
["front_walk", false],
["45front_left_walk", false],
["side_left_walk", false],
["45back_left_walk", false],
["back_walk", false],
["45back_right_walk", false],
],
}
func _physics_process(_delta):
var motion = Vector2()
motion.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
motion.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
motion.y /= 2
motion = motion.normalized() * MOTION_SPEED
#warning-ignore:return_value_discarded
set_velocity(motion)
move_and_slide()
var dir = velocity
if dir.length() > 0:
last_direction = dir
update_animation("walk")
else:
update_animation("idle")
func update_animation(anim_set):
var angle = rad_to_deg(last_direction.angle()) + 22.5
var slice_dir = floor(angle / 45)
$Sprite2D.play(anim_directions[anim_set][slice_dir][0])
$Sprite2D.flip_h = anim_directions[anim_set][slice_dir][1]

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dpwpop61vufvt"
path="res://.godot/imported/goblin.png-32452b37152c86975cc3bde34afb02b5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/goblin.png"
dest_files=["res://.godot/imported/goblin.png-32452b37152c86975cc3bde34afb02b5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=1.0
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

File diff suppressed because it is too large Load Diff

View File

@@ -25,38 +25,47 @@ config/icon="res://icon.webp"
window/stretch/mode="canvas_items"
window/stretch/aspect="expand"
[gdnative]
singletons=[]
[image_loader]
filter=false
gen_mipmaps=false
[input]
move_down={
"deadzone": 0.5,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
"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":4194322,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
, 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":83,"key_label":0,"unicode":0,"echo":false,"script":null)
, 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":4194322,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
]
}
move_left={
"deadzone": 0.5,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"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)
"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":4194319,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
, 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":65,"key_label":0,"unicode":0,"echo":false,"script":null)
, 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":4194319,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
]
}
move_right={
"deadzone": 0.5,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"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)
"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":4194321,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
, 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":68,"key_label":0,"unicode":0,"echo":false,"script":null)
, 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":4194321,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
]
}
move_up={
"deadzone": 0.5,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
"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":4194320,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
, 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":87,"key_label":0,"unicode":0,"echo":false,"script":null)
, 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":4194320,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
]
}
@@ -64,6 +73,13 @@ move_up={
common/physics_ticks_per_second=120
[rasterizer]
use_pixel_snap=true
[rendering]
environment/defaults/default_clear_color=Color(0.03, 0.082, 0.15, 1)
renderer/rendering_method="gl_compatibility"
environment/defaults/default_clear_color=Color(0.0784314, 0.105882, 0.145098, 1)
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 KiB

View File

@@ -1,226 +0,0 @@
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://r7h8te85l3bx"]
[ext_resource type="Texture2D" uid="uid://cxppwax2lq3dh" path="res://merged_tiles.png" id="2_6vaqu"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_832dk"]
texture = ExtResource("2_6vaqu")
texture_region_size = Vector2i(140, 140)
0:0/next_alternative_id = 8
0:0/0 = 0
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/0/physics_layer_0/angular_velocity = 0.0
0:0/1 = 1
0:0/1/flip_h = true
0:0/1/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/1/physics_layer_0/angular_velocity = 0.0
0:0/2 = 2
0:0/2/flip_v = true
0:0/2/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/2/physics_layer_0/angular_velocity = 0.0
0:0/3 = 3
0:0/3/flip_h = true
0:0/3/flip_v = true
0:0/3/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/3/physics_layer_0/angular_velocity = 0.0
0:0/4 = 4
0:0/4/transpose = true
0:0/4/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/4/physics_layer_0/angular_velocity = 0.0
0:0/5 = 5
0:0/5/flip_h = true
0:0/5/transpose = true
0:0/5/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/5/physics_layer_0/angular_velocity = 0.0
0:0/6 = 6
0:0/6/flip_v = true
0:0/6/transpose = true
0:0/6/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/6/physics_layer_0/angular_velocity = 0.0
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/linear_velocity = Vector2(0, 0)
0:0/7/physics_layer_0/angular_velocity = 0.0
1:0/next_alternative_id = 8
1:0/0 = 0
1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
1:0/0/physics_layer_0/angular_velocity = 0.0
1:0/1 = 1
1:0/1/flip_h = true
1:0/1/physics_layer_0/linear_velocity = Vector2(0, 0)
1:0/1/physics_layer_0/angular_velocity = 0.0
1:0/2 = 2
1:0/2/flip_v = true
1:0/2/physics_layer_0/linear_velocity = Vector2(0, 0)
1:0/2/physics_layer_0/angular_velocity = 0.0
1:0/3 = 3
1:0/3/flip_h = true
1:0/3/flip_v = true
1:0/3/physics_layer_0/linear_velocity = Vector2(0, 0)
1:0/3/physics_layer_0/angular_velocity = 0.0
1:0/4 = 4
1:0/4/transpose = true
1:0/4/physics_layer_0/linear_velocity = Vector2(0, 0)
1:0/4/physics_layer_0/angular_velocity = 0.0
1:0/5 = 5
1:0/5/flip_h = true
1:0/5/transpose = true
1:0/5/physics_layer_0/linear_velocity = Vector2(0, 0)
1:0/5/physics_layer_0/angular_velocity = 0.0
1:0/6 = 6
1:0/6/flip_v = true
1:0/6/transpose = true
1:0/6/physics_layer_0/linear_velocity = Vector2(0, 0)
1:0/6/physics_layer_0/angular_velocity = 0.0
1:0/7 = 7
1:0/7/flip_h = true
1:0/7/flip_v = true
1:0/7/transpose = true
1:0/7/physics_layer_0/linear_velocity = Vector2(0, 0)
1:0/7/physics_layer_0/angular_velocity = 0.0
2:0/next_alternative_id = 8
2:0/0 = 0
2:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
2:0/0/physics_layer_0/angular_velocity = 0.0
2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-1.5, -2.5, -65, 32, -3, 64.5, 62, 31)
2:0/1 = 1
2:0/1/flip_h = true
2:0/1/physics_layer_0/linear_velocity = Vector2(0, 0)
2:0/1/physics_layer_0/angular_velocity = 0.0
2:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(70, 38, 134, 70, 70, 102, 6, 70)
2:0/2 = 2
2:0/2/flip_v = true
2:0/2/physics_layer_0/linear_velocity = Vector2(0, 0)
2:0/2/physics_layer_0/angular_velocity = 0.0
2:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(70, 38, 134, 70, 70, 102, 6, 70)
2:0/3 = 3
2:0/3/flip_h = true
2:0/3/flip_v = true
2:0/3/physics_layer_0/linear_velocity = Vector2(0, 0)
2:0/3/physics_layer_0/angular_velocity = 0.0
2:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(70, 38, 134, 70, 70, 102, 6, 70)
2:0/4 = 4
2:0/4/transpose = true
2:0/4/physics_layer_0/linear_velocity = Vector2(0, 0)
2:0/4/physics_layer_0/angular_velocity = 0.0
2:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(70, 38, 134, 70, 70, 102, 6, 70)
2:0/5 = 5
2:0/5/flip_h = true
2:0/5/transpose = true
2:0/5/physics_layer_0/linear_velocity = Vector2(0, 0)
2:0/5/physics_layer_0/angular_velocity = 0.0
2:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(70, 38, 134, 70, 70, 102, 6, 70)
2:0/6 = 6
2:0/6/flip_v = true
2:0/6/transpose = true
2:0/6/physics_layer_0/linear_velocity = Vector2(0, 0)
2:0/6/physics_layer_0/angular_velocity = 0.0
2:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(70, 38, 134, 70, 70, 102, 6, 70)
2:0/7 = 7
2:0/7/flip_h = true
2:0/7/flip_v = true
2:0/7/transpose = true
2:0/7/physics_layer_0/linear_velocity = Vector2(0, 0)
2:0/7/physics_layer_0/angular_velocity = 0.0
2:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(70, 38, 134, 70, 70, 102, 6, 70)
3:0/next_alternative_id = 8
3:0/0 = 0
3:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
3:0/0/physics_layer_0/angular_velocity = 0.0
3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, 8.5, -13, 12.5, -22, 25.5, -18, 38.5, 2.5, 44, 23, 40, 27, 26, 19, 13)
3:0/1 = 1
3:0/1/flip_h = true
3:0/1/physics_layer_0/linear_velocity = Vector2(0, 0)
3:0/1/physics_layer_0/angular_velocity = 0.0
3:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(5.5, 35.5, 19.5, 25.5, 39.5, 25.5, 53.5, 35.5, 53.5, 49.5, 39.5, 59.5, 19.5, 59.5, 5.5, 49.5)
3:0/2 = 2
3:0/2/flip_v = true
3:0/2/physics_layer_0/linear_velocity = Vector2(0, 0)
3:0/2/physics_layer_0/angular_velocity = 0.0
3:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(5.5, 35.5, 19.5, 25.5, 39.5, 25.5, 53.5, 35.5, 53.5, 49.5, 39.5, 59.5, 19.5, 59.5, 5.5, 49.5)
3:0/3 = 3
3:0/3/flip_h = true
3:0/3/flip_v = true
3:0/3/physics_layer_0/linear_velocity = Vector2(0, 0)
3:0/3/physics_layer_0/angular_velocity = 0.0
3:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(5.5, 35.5, 19.5, 25.5, 39.5, 25.5, 53.5, 35.5, 53.5, 49.5, 39.5, 59.5, 19.5, 59.5, 5.5, 49.5)
3:0/4 = 4
3:0/4/transpose = true
3:0/4/physics_layer_0/linear_velocity = Vector2(0, 0)
3:0/4/physics_layer_0/angular_velocity = 0.0
3:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(5.5, 35.5, 19.5, 25.5, 39.5, 25.5, 53.5, 35.5, 53.5, 49.5, 39.5, 59.5, 19.5, 59.5, 5.5, 49.5)
3:0/5 = 5
3:0/5/flip_h = true
3:0/5/transpose = true
3:0/5/physics_layer_0/linear_velocity = Vector2(0, 0)
3:0/5/physics_layer_0/angular_velocity = 0.0
3:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(5.5, 35.5, 19.5, 25.5, 39.5, 25.5, 53.5, 35.5, 53.5, 49.5, 39.5, 59.5, 19.5, 59.5, 5.5, 49.5)
3:0/6 = 6
3:0/6/flip_v = true
3:0/6/transpose = true
3:0/6/physics_layer_0/linear_velocity = Vector2(0, 0)
3:0/6/physics_layer_0/angular_velocity = 0.0
3:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(5.5, 35.5, 19.5, 25.5, 39.5, 25.5, 53.5, 35.5, 53.5, 49.5, 39.5, 59.5, 19.5, 59.5, 5.5, 49.5)
3:0/7 = 7
3:0/7/flip_h = true
3:0/7/flip_v = true
3:0/7/transpose = true
3:0/7/physics_layer_0/linear_velocity = Vector2(0, 0)
3:0/7/physics_layer_0/angular_velocity = 0.0
3:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(5.5, 35.5, 19.5, 25.5, 39.5, 25.5, 53.5, 35.5, 53.5, 49.5, 39.5, 59.5, 19.5, 59.5, 5.5, 49.5)
4:0/next_alternative_id = 8
4:0/0 = 0
4:0/0/y_sort_origin = -16
4:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
4:0/0/physics_layer_0/angular_velocity = 0.0
4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(26, 8.5, 42.5, 19.5, -25, 51, -41, 42)
4:0/1 = 1
4:0/1/flip_h = true
4:0/1/y_sort_origin = -16
4:0/1/physics_layer_0/linear_velocity = Vector2(0, 0)
4:0/1/physics_layer_0/angular_velocity = 0.0
4:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(-26, 8.5, -42.5, 19.5, 25, 51, 41, 42)
4:0/2 = 2
4:0/2/flip_v = true
4:0/2/physics_layer_0/linear_velocity = Vector2(0, 0)
4:0/2/physics_layer_0/angular_velocity = 0.0
4:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(2.5, 71, 66.5, 39, 82.5, 47, 18.5, 79)
4:0/3 = 3
4:0/3/flip_h = true
4:0/3/flip_v = true
4:0/3/physics_layer_0/linear_velocity = Vector2(0, 0)
4:0/3/physics_layer_0/angular_velocity = 0.0
4:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(2.5, 71, 66.5, 39, 82.5, 47, 18.5, 79)
4:0/4 = 4
4:0/4/transpose = true
4:0/4/physics_layer_0/linear_velocity = Vector2(0, 0)
4:0/4/physics_layer_0/angular_velocity = 0.0
4:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(2.5, 71, 66.5, 39, 82.5, 47, 18.5, 79)
4:0/5 = 5
4:0/5/flip_h = true
4:0/5/transpose = true
4:0/5/physics_layer_0/linear_velocity = Vector2(0, 0)
4:0/5/physics_layer_0/angular_velocity = 0.0
4:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(2.5, 71, 66.5, 39, 82.5, 47, 18.5, 79)
4:0/6 = 6
4:0/6/flip_v = true
4:0/6/transpose = true
4:0/6/physics_layer_0/linear_velocity = Vector2(0, 0)
4:0/6/physics_layer_0/angular_velocity = 0.0
4:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(2.5, 71, 66.5, 39, 82.5, 47, 18.5, 79)
4:0/7 = 7
4:0/7/flip_h = true
4:0/7/flip_v = true
4:0/7/transpose = true
4:0/7/physics_layer_0/linear_velocity = Vector2(0, 0)
4:0/7/physics_layer_0/angular_velocity = 0.0
4:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(2.5, 71, 66.5, 39, 82.5, 47, 18.5, 79)
[resource]
tile_shape = 1
tile_layout = 5
tile_size = Vector2i(128, 64)
physics_layer_0/collision_layer = 1
sources/5 = SubResource("TileSetAtlasSource_832dk")
tile_proxies/coords_level = [[5, Vector2i(1, 0)], [5, Vector2i(1, 1)], [5, Vector2i(2, 0)], [5, Vector2i(1, 0)]]

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

View File

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bo5d4p1el52ir"
path="res://.godot/imported/obstacle.png-0258c5f5ce65bfa0dd8610adeb784f54.ctex"
uid="uid://dup8jrb6ajapx"
path="res://.godot/imported/isotiles.png-525cf6639aba62989bb423b9cdb9e1f3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/obstacle.png"
dest_files=["res://.godot/imported/obstacle.png-0258c5f5ce65bfa0dd8610adeb784f54.ctex"]
source_file="res://tileset/isotiles.png"
dest_files=["res://.godot/imported/isotiles.png-525cf6639aba62989bb423b9cdb9e1f3.ctex"]
[params]

View File

@@ -0,0 +1,248 @@
[gd_resource type="TileSet" load_steps=7 format=3 uid="uid://ceswxvl27cesm"]
[ext_resource type="Texture2D" uid="uid://dup8jrb6ajapx" path="res://tileset/isotiles.png" id="1"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_s3w07"]
texture = ExtResource("1")
margins = Vector2i(28, 75)
texture_region_size = Vector2i(135, 105)
0:0/next_alternative_id = 8
0:0/0 = 0
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/0/physics_layer_0/angular_velocity = 0.0
0:0/1 = 1
0:0/1/flip_h = true
0:0/1/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/1/physics_layer_0/angular_velocity = 0.0
0:0/2 = 2
0:0/2/flip_v = true
0:0/2/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/2/physics_layer_0/angular_velocity = 0.0
0:0/3 = 3
0:0/3/flip_h = true
0:0/3/flip_v = true
0:0/3/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/3/physics_layer_0/angular_velocity = 0.0
0:0/4 = 4
0:0/4/transpose = true
0:0/4/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/4/physics_layer_0/angular_velocity = 0.0
0:0/5 = 5
0:0/5/flip_h = true
0:0/5/transpose = true
0:0/5/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/5/physics_layer_0/angular_velocity = 0.0
0:0/6 = 6
0:0/6/flip_v = true
0:0/6/transpose = true
0:0/6/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/6/physics_layer_0/angular_velocity = 0.0
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/linear_velocity = Vector2(0, 0)
0:0/7/physics_layer_0/angular_velocity = 0.0
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_fa1vh"]
texture = ExtResource("1")
margins = Vector2i(221, 75)
texture_region_size = Vector2i(135, 105)
0:0/next_alternative_id = 8
0:0/0 = 0
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/0/physics_layer_0/angular_velocity = 0.0
0:0/1 = 1
0:0/1/flip_h = true
0:0/1/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/1/physics_layer_0/angular_velocity = 0.0
0:0/2 = 2
0:0/2/flip_v = true
0:0/2/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/2/physics_layer_0/angular_velocity = 0.0
0:0/3 = 3
0:0/3/flip_h = true
0:0/3/flip_v = true
0:0/3/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/3/physics_layer_0/angular_velocity = 0.0
0:0/4 = 4
0:0/4/transpose = true
0:0/4/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/4/physics_layer_0/angular_velocity = 0.0
0:0/5 = 5
0:0/5/flip_h = true
0:0/5/transpose = true
0:0/5/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/5/physics_layer_0/angular_velocity = 0.0
0:0/6 = 6
0:0/6/flip_v = true
0:0/6/transpose = true
0:0/6/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/6/physics_layer_0/angular_velocity = 0.0
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/linear_velocity = Vector2(0, 0)
0:0/7/physics_layer_0/angular_velocity = 0.0
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_xpb3e"]
texture = ExtResource("1")
margins = Vector2i(28, 220)
texture_region_size = Vector2i(140, 140)
0:0/next_alternative_id = 8
0:0/0 = 0
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/0/physics_layer_0/angular_velocity = 0.0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-2, -2, 62, 30, -2, 62, -66, 30)
0:0/1 = 1
0:0/1/flip_h = true
0:0/1/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/1/physics_layer_0/angular_velocity = 0.0
0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(2, -2, -62, 30, 2, 62, 66, 30)
0:0/2 = 2
0:0/2/flip_v = true
0:0/2/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/2/physics_layer_0/angular_velocity = 0.0
0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-2, 2, 62, -30, -2, -62, -66, -30)
0:0/3 = 3
0:0/3/flip_h = true
0:0/3/flip_v = true
0:0/3/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/3/physics_layer_0/angular_velocity = 0.0
0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(2, 2, -62, -30, 2, -62, 66, -30)
0:0/4 = 4
0:0/4/transpose = true
0:0/4/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/4/physics_layer_0/angular_velocity = 0.0
0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-2, -2, 62, 30, -2.00001, 62, -66, 30)
0:0/5 = 5
0:0/5/flip_h = true
0:0/5/transpose = true
0:0/5/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/5/physics_layer_0/angular_velocity = 0.0
0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(2, -2, -62, 30, 1.99999, 62, 66, 30)
0:0/6 = 6
0:0/6/flip_v = true
0:0/6/transpose = true
0:0/6/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/6/physics_layer_0/angular_velocity = 0.0
0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-2, 2, 62, -30, -1.99999, -62, -66, -30)
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/linear_velocity = Vector2(0, 0)
0:0/7/physics_layer_0/angular_velocity = 0.0
0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(2, 2, -62, -30, 2.00001, -62, 66, -30)
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_aki5c"]
texture = ExtResource("1")
margins = Vector2i(259, 241)
texture_region_size = Vector2i(55, 95)
0:0/next_alternative_id = 8
0:0/0 = 0
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/0/physics_layer_0/angular_velocity = 0.0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-22.5, 19.5, -10.5, 11.5, 13.5, 11.5, 25.5, 19.5, 25.5, 35.5, 13.5, 43.5, -6.5, 43.5, -22.5, 35.5)
0:0/1 = 1
0:0/1/flip_h = true
0:0/1/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/1/physics_layer_0/angular_velocity = 0.0
0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(22.5, 19.5, 10.5, 11.5, -13.5, 11.5, -25.5, 19.5, -25.5, 35.5, -13.5, 43.5, 6.5, 43.5, 22.5, 35.5)
0:0/2 = 2
0:0/2/flip_v = true
0:0/2/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/2/physics_layer_0/angular_velocity = 0.0
0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-22.5, -19.5, -10.5, -11.5, 13.5, -11.5, 25.5, -19.5, 25.5, -35.5, 13.5, -43.5, -6.5, -43.5, -22.5, -35.5)
0:0/3 = 3
0:0/3/flip_h = true
0:0/3/flip_v = true
0:0/3/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/3/physics_layer_0/angular_velocity = 0.0
0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(22.5, -19.5, 10.5, -11.5, -13.5, -11.5, -25.5, -19.5, -25.5, -35.5, -13.5, -43.5, 6.5, -43.5, 22.5, -35.5)
0:0/4 = 4
0:0/4/transpose = true
0:0/4/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/4/physics_layer_0/angular_velocity = 0.0
0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-22.5, 19.5, -10.5, 11.5, 13.5, 11.5, 25.5, 19.5, 25.5, 35.5, 13.5, 43.5, -6.5, 43.5, -22.5, 35.5)
0:0/5 = 5
0:0/5/flip_h = true
0:0/5/transpose = true
0:0/5/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/5/physics_layer_0/angular_velocity = 0.0
0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(22.5, 19.5, 10.5, 11.5, -13.5, 11.5, -25.5, 19.5, -25.5, 35.5, -13.5, 43.5, 6.5, 43.5, 22.5, 35.5)
0:0/6 = 6
0:0/6/flip_v = true
0:0/6/transpose = true
0:0/6/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/6/physics_layer_0/angular_velocity = 0.0
0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-22.5, -19.5, -10.5, -11.5, 13.5, -11.5, 25.5, -19.5, 25.5, -35.5, 13.5, -43.5, -6.5, -43.5, -22.5, -35.5)
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/linear_velocity = Vector2(0, 0)
0:0/7/physics_layer_0/angular_velocity = 0.0
0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(22.5, -19.5, 10.5, -11.5, -13.5, -11.5, -25.5, -19.5, -25.5, -35.5, -13.5, -43.5, 6.5, -43.5, 22.5, -35.5)
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ec70s"]
texture = ExtResource("1")
margins = Vector2i(54, 426)
texture_region_size = Vector2i(85, 110)
0:0/next_alternative_id = 8
0:0/0 = 0
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/0/physics_layer_0/angular_velocity = 0.0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-40.5, 31, 39.5, -9, 39.5, 15, -40.5, 55)
0:0/1 = 1
0:0/1/flip_h = true
0:0/1/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/1/physics_layer_0/angular_velocity = 0.0
0:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(40.5, 31, -39.5, -9, -39.5, 15, 40.5, 55)
0:0/2 = 2
0:0/2/flip_v = true
0:0/2/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/2/physics_layer_0/angular_velocity = 0.0
0:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-40.5, -31, 39.5, 9, 39.5, -15, -40.5, -55)
0:0/3 = 3
0:0/3/flip_h = true
0:0/3/flip_v = true
0:0/3/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/3/physics_layer_0/angular_velocity = 0.0
0:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(40.5, -31, -39.5, 9, -39.5, -15, 40.5, -55)
0:0/4 = 4
0:0/4/transpose = true
0:0/4/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/4/physics_layer_0/angular_velocity = 0.0
0:0/4/physics_layer_0/polygon_0/points = PackedVector2Array(-40.5, 31, 39.5, -9, 39.5, 15, -40.5, 55)
0:0/5 = 5
0:0/5/flip_h = true
0:0/5/transpose = true
0:0/5/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/5/physics_layer_0/angular_velocity = 0.0
0:0/5/physics_layer_0/polygon_0/points = PackedVector2Array(40.5, 31, -39.5, -9, -39.5, 15, 40.5, 55)
0:0/6 = 6
0:0/6/flip_v = true
0:0/6/transpose = true
0:0/6/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/6/physics_layer_0/angular_velocity = 0.0
0:0/6/physics_layer_0/polygon_0/points = PackedVector2Array(-40.5, -31, 39.5, 9, 39.5, -15, -40.5, -55)
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/linear_velocity = Vector2(0, 0)
0:0/7/physics_layer_0/angular_velocity = 0.0
0:0/7/physics_layer_0/polygon_0/points = PackedVector2Array(40.5, -31, -39.5, 9, -39.5, -15, 40.5, -55)
[resource]
tile_shape = 1
tile_layout = 5
tile_size = Vector2i(128, 64)
physics_layer_0/collision_layer = 1
sources/0 = SubResource("TileSetAtlasSource_s3w07")
sources/1 = SubResource("TileSetAtlasSource_fa1vh")
sources/2 = SubResource("TileSetAtlasSource_xpb3e")
sources/3 = SubResource("TileSetAtlasSource_aki5c")
sources/4 = SubResource("TileSetAtlasSource_ec70s")

View File

@@ -0,0 +1,60 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://tileset/isotiles.png" type="Texture2D" id=1]
[sub_resource type="OccluderPolygon2D" id=2]
polygon = PackedVector2Array( 0, -100, -67, -68, -66, 0, -1, 33, 66, -2, 64, -67 )
[node name="TilesetEdit" type="Node2D"]
[node name="Base" type="Sprite2D" parent="."]
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2( 28, 75, 135, 105 )
[node name="Base2" type="Sprite2D" parent="."]
position = Vector2( 200, 0 )
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2( 221, 75, 135, 105 )
[node name="Wall" type="Sprite2D" parent="."]
position = Vector2( 400, 0 )
texture = ExtResource( 1 )
offset = Vector2( 0, -32 )
region_enabled = true
region_rect = Rect2( 28, 220, 140, 140 )
[node name="StaticBody2D" type="StaticBody2D" parent="Wall"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Wall/StaticBody2D"]
polygon = PackedVector2Array( -64, 0, 0, 32, 64, 0, 0, -32 )
[node name="LightOccluder2D" type="LightOccluder2D" parent="Wall"]
visible = false
occluder = SubResource( 2 )
[node name="Column" type="Sprite2D" parent="."]
position = Vector2( 600, 0 )
texture = ExtResource( 1 )
offset = Vector2( 0, -32 )
region_enabled = true
region_rect = Rect2( 259, 241, 55, 95 )
[node name="StaticBody2D" type="StaticBody2D" parent="Column"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Column/StaticBody2D"]
position = Vector2( 2, 0 )
polygon = PackedVector2Array( -27, 7, -14, 20, 16, 20, 28, 4, 24, -12, 10, -22, -10, -22, -24, -12 )
[node name="Door1" type="Sprite2D" parent="."]
position = Vector2( 800, 0 )
texture = ExtResource( 1 )
offset = Vector2( 0, -25 )
region_enabled = true
region_rect = Rect2( 54, 426, 85, 110 )
[node name="StaticBody2D" type="StaticBody2D" parent="Door1"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Door1/StaticBody2D"]
polygon = PackedVector2Array( -24, 24, 40, -8, 24, -16, -40, 16 )

View File

@@ -1,53 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://isotiles.png" type="Texture2D" id=1]
[node name="TilesetEdit" type="Node2D"]
[node name="Base" type="Sprite2D" parent="."]
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2(28, 75, 135, 105)
[node name="Base2" type="Sprite2D" parent="."]
position = Vector2(200, 0)
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2(221, 75, 135, 105)
[node name="Wall" type="Sprite2D" parent="."]
position = Vector2(400, 0)
texture = ExtResource( 1 )
offset = Vector2(0, -32)
region_enabled = true
region_rect = Rect2(28, 220, 140, 140)
[node name="StaticBody2D" type="StaticBody2D" parent="Wall"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Wall/StaticBody2D"]
polygon = PackedVector2Array(-64, 0, 0, 32, 64, 0, 0, -32)
[node name="Column" type="Sprite2D" parent="."]
position = Vector2(600, 0)
texture = ExtResource( 1 )
offset = Vector2(0, -32)
region_enabled = true
region_rect = Rect2(259, 241, 55, 95)
[node name="StaticBody2D" type="StaticBody2D" parent="Column"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Column/StaticBody2D"]
position = Vector2(2, 0)
polygon = PackedVector2Array(-24, 2, -10, 12, 10, 12, 24, 2, 24, -12, 10, -22, -10, -22, -24, -12)
[node name="Door1" type="Sprite2D" parent="."]
position = Vector2(800, 0)
texture = ExtResource( 1 )
offset = Vector2(0, -25)
region_enabled = true
region_rect = Rect2(54, 426, 85, 110)
[node name="StaticBody2D" type="StaticBody2D" parent="Door1"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Door1/StaticBody2D"]
polygon = PackedVector2Array(-24, 24, 40, -8, 24, -16, -40, 16)

View File

@@ -1,13 +0,0 @@
extends CharacterBody2D
const MOTION_SPEED = 30 # Pixels/second.
const FRICTION_FACTOR = 0.89
func _physics_process(_delta):
var motion = Input.get_vector("move_left", "move_right", "move_up", "move_down")
# Make diagonal movement fit isometric tiles.
motion.y /= 2
velocity += motion.normalized() * MOTION_SPEED
# Apply friction.
velocity *= FRICTION_FACTOR
move_and_slide()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

View File

@@ -1,27 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://cvs6nhy4ydg0u"]
[ext_resource type="Script" path="res://troll.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://b8fv8swublbqq" path="res://troll.png" id="2"]
[sub_resource type="CircleShape2D" id="1"]
radius = 16.0
[node name="Troll" type="CharacterBody2D"]
script = ExtResource("1")
[node name="Shadow" type="Sprite2D" parent="."]
modulate = Color(0, 0, 0, 0.501961)
position = Vector2(-2, -30)
scale = Vector2(1, 1)
skew = 0.139626
texture = ExtResource("2")
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(-6, -30)
texture = ExtResource("2")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -7.5)
shape = SubResource("1")
[node name="Camera2D" type="Camera2D" parent="."]

View File

@@ -11,4 +11,4 @@ Check out this demo on the asset library: https://godotengine.org/asset-library/
## Screenshots
![Screenshot](screenshots/nav_astar.png)
![Screenshot](screenshots/navigation_astar.webp)

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -2,7 +2,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://brwp8bimc75uu"
uid="uid://cbh2ojuhwt3se"
path="res://.godot/imported/icon.webp-e94f9a68b0f625a567a797079e4d325f.ctex"
metadata={
"vram_texture": false

View File

@@ -2,9 +2,9 @@ extends TileMap
enum Tile { OBSTACLE, START_POINT, END_POINT }
const CELL_SIZE = Vector2(64, 64)
const CELL_SIZE = Vector2i(64, 64)
const BASE_LINE_WIDTH = 3.0
const DRAW_COLOR = Color.WHITE
const DRAW_COLOR = Color.WHITE * Color(1, 1, 1, 0.5)
# The object for pathfinding on 2D grids.
var _astar = AStarGrid2D.new()
@@ -14,7 +14,9 @@ var _end_point = Vector2i()
var _path = PackedVector2Array()
func _ready():
_astar.region = get_used_rect()
# Region should match the size of the playable area plus one (in tiles).
# In this demo, the playable area is 17×9 tiles, so the rect size is 18×10.
_astar.region = Rect2i(0, 0, 18, 10)
_astar.cell_size = CELL_SIZE
_astar.offset = CELL_SIZE * 0.5
_astar.default_compute_heuristic = AStarGrid2D.HEURISTIC_MANHATTAN
@@ -69,8 +71,8 @@ func find_path(local_start_point, local_end_point):
_path = _astar.get_point_path(_start_point, _end_point)
if not _path.is_empty():
set_cell(0, _start_point, Tile.START_POINT, Vector2i())
set_cell(0, _end_point, Tile.END_POINT, Vector2i())
set_cell(0, _start_point, 0, Vector2i(Tile.START_POINT, 0))
set_cell(0, _end_point, 0, Vector2i(Tile.END_POINT, 0))
# Redraw the lines and circles from the start to the end point.
queue_redraw()

View File

@@ -25,17 +25,20 @@ window/stretch/aspect="expand"
[input]
move_to={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null)
]
}
teleport_to={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null)
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"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":2,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
move_to={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"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)
]
}
[rendering]
renderer/rendering_method="gl_compatibility"
environment/defaults/default_clear_color=Color(0, 0.0627451, 0.247059, 1)
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -2,7 +2,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bfedhloqga3jl"
uid="uid://vsempfpeu7wr"
path="res://.godot/imported/character.png-eb70ac48a5acf508c4b7740ea4ac4fae.ctex"
metadata={
"vram_texture": false

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c57g2ow4p5dl3"
path="res://.godot/imported/path_start.png-475bd0b469629aa8779d506c5134e5c2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/path_start.png"
dest_files=["res://.godot/imported/path_start.png-475bd0b469629aa8779d506c5134e5c2.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: 162 KiB

View File

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://brwp8bimc75uu"
path="res://.godot/imported/icon.webp-e94f9a68b0f625a567a797079e4d325f.ctex"
uid="uid://baj4xukvf568b"
path="res://.godot/imported/space.png-97c58c64ad84df3792f6a98aa7f4b875.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.webp"
dest_files=["res://.godot/imported/icon.webp-e94f9a68b0f625a567a797079e4d325f.ctex"]
source_file="res://sprites/space.png"
dest_files=["res://.godot/imported/space.png-97c58c64ad84df3792f6a98aa7f4b875.ctex"]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bjsmfha28ro00"
path="res://.godot/imported/sparkle.png-3b8036349814d91f8265031bd47464fc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/sparkle.png"
dest_files=["res://.godot/imported/sparkle.png-3b8036349814d91f8265031bd47464fc.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

@@ -1,26 +0,0 @@
[gd_resource type="TileSet" load_steps=7 format=3 uid="uid://y111l4w24pml"]
[ext_resource type="Texture2D" uid="uid://bo5d4p1el52ir" path="res://sprites/obstacle.png" id="1"]
[ext_resource type="Texture2D" uid="uid://c57g2ow4p5dl3" path="res://sprites/path_start.png" id="2"]
[ext_resource type="Texture2D" uid="uid://cy1dwnkhyigme" path="res://sprites/path_end.png" id="3"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_tol7a"]
texture = ExtResource("1")
texture_region_size = Vector2i(64, 64)
0:0/0 = 0
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gx51g"]
texture = ExtResource("2")
texture_region_size = Vector2i(64, 64)
0:0/0 = 0
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_2sont"]
texture = ExtResource("3")
texture_region_size = Vector2i(64, 64)
0:0/0 = 0
[resource]
tile_size = Vector2i(64, 64)
sources/0 = SubResource("TileSetAtlasSource_tol7a")
sources/1 = SubResource("TileSetAtlasSource_gx51g")
sources/2 = SubResource("TileSetAtlasSource_2sont")

View File

@@ -0,0 +1,15 @@
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://f3wmg8detyai"]
[ext_resource type="Texture2D" uid="uid://c11typow28mkc" path="res://tileset/tilesheet.png" id="1_th3tw"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_btc3f"]
texture = ExtResource("1_th3tw")
texture_region_size = Vector2i(64, 64)
0:0/0 = 0
1:0/0 = 0
2:0/0 = 0
[resource]
tile_size = Vector2i(64, 64)
sources/0 = SubResource("TileSetAtlasSource_btc3f")
tile_proxies/coords_level = [[0, Vector2i(0, 0)], [4, Vector2i(0, 0)], [2, Vector2i(0, 0)], [4, Vector2i(1, 0)], [3, Vector2i(0, 0)], [4, Vector2i(2, 0)]]

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c11typow28mkc"
path="res://.godot/imported/tilesheet.png-da5dd43877b555026e31608aeb142d6c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tileset/tilesheet.png"
dest_files=["res://.godot/imported/tilesheet.png-da5dd43877b555026e31608aeb142d6c.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

@@ -1,42 +1,45 @@
# 2D Platformer
This demo is a pixel art 2D platformer with single-player
and two player splitscreen multiplayer.
This demo is a pixel art 2D platformer with graphics and sound.
It demonstrates how to code characters and physics-based objects
It shows you how to code characters and physics-based objects
in a real game context. This is a relatively complete demo
where the player can jump, walk on slopes, fire bullets,
interact with enemies, and collect items. It contains one
level. The player is invincible, unlike the enemies.
interact with enemies, and more. It contains one closed
level, and the player is invincible, unlike the enemies.
You will find most of the demos content in the `level.tscn` scene.
You can open it from the default `game.tscn` scene, or double
click on `level.tscn` in the `src/level/` directory.
We invite you to open the demo's GDScript files in the editor as
they contain a lot of comments that explain how each class works.
Language: GDScript
Renderer: Forward Plus
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/120
## Features
- Side-scrolling player controller using [`CharacterBody2D`](https://docs.godotengine.org/en/latest/classes/class_characterbody2d.html).
- Can walk smoothly up and down slopes.
- Can shoot, including while jumping.
- Has a double jump that provides a horizontal momentum boost.
- Side-scrolling player controller using [`KinematicBody2D`](https://docs.godotengine.org/en/latest/classes/class_kinematicbody2d.html).
- Can walk on and snap to slopes.
- Can shoot, including while jumping.
- Enemies that crawl on the floor and change direction when they encounter an obstacle.
- Camera that stays within the levels bounds.
- Keyboard and gamepad control support.
- Supports keyboard and gamepad controls.
- Platforms that can move in any direction.
- Gun that shoots bullets with rigid body (natural) physics.
- Collectible coins.
- Pausing and a pause menu.
- Pause and pause menu.
- Pixel art visuals.
- Sound effects and music.
## Screenshots
![Player shooting in the direction of an enemy](screenshots/shoot.webp)
![The entire level layout viewed in the editor](screenshots/layout.webp)
![2D Platformer](screenshots/platformer.webp)
## Music
"Pompy" by Hubert Lamontagne (madbr) https://soundcloud.com/madbr/pompy
[*Pompy*](https://soundcloud.com/madbr/pompy) by Hubert Lamontagne (madbr)

View File

@@ -0,0 +1,4 @@
[gd_resource type="AudioBusLayout" format=3 uid="uid://cxpxlqmmdcbk2"]
[resource]
bus/0/volume_db = -11.9576

View File

@@ -6,7 +6,7 @@ enum State {
DEAD,
}
const WALK_SPEED = 100.0
const WALK_SPEED = 22.0
var _state := State.WALKING
@@ -33,9 +33,9 @@ func _physics_process(delta: float) -> void:
move_and_slide()
if velocity.x > 0.0:
sprite.scale.x = 1.0
sprite.scale.x = 0.8
elif velocity.x < 0.0:
sprite.scale.x = -1.0
sprite.scale.x = -0.8
var animation := get_new_animation()
if animation != animation_player.current_animation:

View File

@@ -1,26 +1,26 @@
[gd_scene load_steps=15 format=3 uid="uid://bd478yrtijbfn"]
[gd_scene load_steps=15 format=3 uid="uid://6mtip3ruyn"]
[ext_resource type="Texture2D" uid="uid://c2aisfmq85suf" path="res://player/bullet.webp" id="1"]
[ext_resource type="AudioStream" uid="uid://bbxjxs8sms61b" path="res://enemy/explode.wav" id="2"]
[ext_resource type="AudioStream" uid="uid://brtn51vs7jaet" path="res://enemy/hit.wav" id="3"]
[ext_resource type="Texture2D" uid="uid://cdy6gikv8wka7" path="res://enemy/enemy.webp" id="4"]
[ext_resource type="Texture2D" uid="uid://coj0d33vyyqx1" path="res://player/bullet.webp" id="1"]
[ext_resource type="AudioStream" uid="uid://duwm7i44o75o2" path="res://enemy/explode.wav" id="2"]
[ext_resource type="AudioStream" uid="uid://dm7wsawmylc7b" path="res://enemy/hit.wav" id="3"]
[ext_resource type="Texture2D" uid="uid://bjjywmvba0sve" path="res://enemy/enemy.webp" id="4"]
[ext_resource type="Script" path="res://enemy/enemy.gd" id="5"]
[sub_resource type="CanvasItemMaterial" id="1"]
[sub_resource type="Animation" id="Animation_67t2c"]
[sub_resource type="Animation" id="8"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:collision_layer")
tracks/0/path = NodePath("Explosion:scale_amount")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [2]
"update": 0,
"values": [4.0]
}
tracks/1/type = "value"
tracks/1/imported = false
@@ -31,44 +31,32 @@ tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"update": 0,
"values": [0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:position")
tracks/2/path = NodePath("Explosion:scale_amount_max")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
"values": [1.0]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite2D:rotation")
tracks/3/path = NodePath(".:collision_layer")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
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),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
"update": 1,
"values": [2]
}
[sub_resource type="Animation" id="2"]
@@ -105,7 +93,7 @@ tracks/2/path = NodePath("Sprite2D:self_modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.9, 1.3),
"times": PackedFloat32Array(0, 0.5, 1.1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
@@ -117,7 +105,7 @@ tracks/3/path = NodePath("Explosion:emitting")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 1),
"times": PackedFloat32Array(0, 0.6),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
@@ -141,7 +129,7 @@ tracks/5/path = NodePath("Explode:playing")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0.8),
"times": PackedFloat32Array(0.6),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
@@ -184,9 +172,34 @@ tracks/8/keys = {
"update": 0,
"values": [Vector2(0, 0), Vector2(0, -32), Vector2(0, 0)]
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("Explosion:scale_amount_min")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(0.6, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [1.0, 4.0]
}
tracks/10/type = "value"
tracks/10/imported = false
tracks/10/enabled = true
tracks/10/path = NodePath("Explosion:scale_amount_max")
tracks/10/interp = 1
tracks/10/loop_wrap = true
tracks/10/keys = {
"times": PackedFloat32Array(0.6, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [1.0, 4.0]
}
[sub_resource type="Animation" id="3"]
length = 6.75
length = 3.0
loop_mode = 1
step = 0.25
tracks/0/type = "value"
tracks/0/imported = false
@@ -195,15 +208,14 @@ 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),
"times": PackedFloat32Array(0, 0.333, 0.666, 0.999, 1.332, 1.665, 1.998, 2.331, 2.664, 2.997),
"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 = 1.25
step = 0.25
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
@@ -211,23 +223,23 @@ 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, 0.75, 1, 1.25),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"times": PackedFloat32Array(0, 0.062475, 0.12495, 0.187425, 0.2499, 0.312375, 0.37485, 0.437325, 0.4998, 0.562275, 0.62475, 0.687225, 0.7497, 0.812175, 0.87465, 0.937125),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 0]
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_nnb1f"]
[sub_resource type="AnimationLibrary" id="AnimationLibrary_0kjfc"]
_data = {
"RESET": SubResource("Animation_67t2c"),
"RESET": SubResource("8"),
"destroy": SubResource("2"),
"idle": SubResource("3"),
"walk": SubResource("4")
}
[sub_resource type="CapsuleShape2D" id="5"]
radius = 8.0
height = 22.0
radius = 18.0
height = 50.0
[sub_resource type="CanvasItemMaterial" id="6"]
blend_mode = 1
@@ -238,31 +250,35 @@ colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1)
[node name="Enemy" type="CharacterBody2D"]
collision_layer = 2
collision_mask = 26
collision_priority = 2.0
collision_mask = 24
script = ExtResource("5")
[node name="PlatformDetector" type="RayCast2D" parent="."]
position = Vector2(0, 6)
target_position = Vector2(0, 8)
collision_mask = 8
[node name="FloorDetectorLeft" type="RayCast2D" parent="."]
position = Vector2(-15, -4)
target_position = Vector2(0, 35)
collision_mask = 24
[node name="FloorDetectorRight" type="RayCast2D" parent="."]
position = Vector2(15.5, -3)
target_position = Vector2(0, 35)
collision_mask = 24
[node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("1")
scale = Vector2(0.8, 0.8)
texture = ExtResource("4")
flip_h = true
hframes = 8
vframes = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_nnb1f")
"": SubResource("AnimationLibrary_0kjfc")
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
@@ -277,17 +293,13 @@ amount = 32
lifetime = 0.5
one_shot = true
speed_scale = 1.2
explosiveness = 0.76
explosiveness = 0.7
draw_order = 215832976
texture = ExtResource("1")
emission_shape = 1
emission_sphere_radius = 8.0
emission_sphere_radius = 16.0
spread = 180.0
gravity = Vector2(0, 250)
initial_velocity_min = 25.0
initial_velocity_max = 80.0
angular_velocity_max = 45.0
scale_amount_max = 1.2
gravity = Vector2(0, -250)
color_ramp = SubResource("7")
[node name="Hit" type="AudioStreamPlayer2D" parent="."]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 786 B

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@@ -2,7 +2,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cdy6gikv8wka7"
uid="uid://bjjywmvba0sve"
path="res://.godot/imported/enemy.webp-c5e00d5c5f64233c41f70dc392999636.ctex"
metadata={
"vram_texture": false

View File

@@ -2,7 +2,7 @@
importer="wav"
type="AudioStreamWAV"
uid="uid://bbxjxs8sms61b"
uid="uid://duwm7i44o75o2"
path="res://.godot/imported/explode.wav-2389d0cf62710ef336bf397194eae82e.sample"
[deps]

View File

@@ -2,7 +2,7 @@
importer="wav"
type="AudioStreamWAV"
uid="uid://brtn51vs7jaet"
uid="uid://dm7wsawmylc7b"
path="res://.godot/imported/hit.wav-02ea2b331eef4f150ed1e5cb9477122b.sample"
[deps]

View File

@@ -1,10 +1,9 @@
[gd_scene load_steps=6 format=3 uid="uid://bf3wnwihk7ymg"]
[gd_scene load_steps=5 format=3 uid="uid://bf3wnwihk7ymg"]
[ext_resource type="Script" path="res://game.gd" id="2"]
[ext_resource type="PackedScene" uid="uid://dr2p70jo7e4kn" path="res://level/level.tscn" id="3"]
[ext_resource type="PackedScene" uid="uid://d0ni64ucb3ym2" path="res://player/player.tscn" id="4"]
[ext_resource type="PackedScene" uid="uid://ctgumjaytuoch" path="res://level/level.tscn" id="3"]
[ext_resource type="PackedScene" uid="uid://vh7pmputa7r3" path="res://player/player.tscn" id="4"]
[ext_resource type="PackedScene" uid="uid://c7ai4bigaryci" path="res://gui/pause_menu_singleplayer.tscn" id="4_x6l06"]
[ext_resource type="PackedScene" uid="uid://do7htx4sqmcnh" path="res://music.tscn" id="5_rkna2"]
[node name="Game" type="Node"]
process_mode = 3
@@ -20,6 +19,4 @@ layer = 100
[node name="PauseMenu" parent="InterfaceLayer" instance=ExtResource("4_x6l06")]
[node name="Music" parent="." instance=ExtResource("5_rkna2")]
[connection signal="coin_collected" from="Level/Player" to="InterfaceLayer/PauseMenu" method="_on_coin_collected"]

View File

@@ -1,11 +1,16 @@
[gd_scene load_steps=7 format=3 uid="uid://2elur2m0il32"]
[gd_scene load_steps=8 format=3 uid="uid://2elur2m0il32"]
[ext_resource type="Script" path="res://game_splitscreen.gd" id="1_60qgt"]
[ext_resource type="PackedScene" uid="uid://dggactv0aho4p" path="res://gui/pause_menu_splitscreen.tscn" id="2_xkexm"]
[ext_resource type="PackedScene" uid="uid://dr2p70jo7e4kn" path="res://level/level.tscn" id="3_e0nyr"]
[ext_resource type="PackedScene" uid="uid://d0ni64ucb3ym2" path="res://player/player.tscn" id="4_8j0va"]
[ext_resource type="PackedScene" uid="uid://bkyw3e13rupar" path="res://level/parallax_background.tscn" id="5_47vt4"]
[ext_resource type="PackedScene" uid="uid://do7htx4sqmcnh" path="res://music.tscn" id="6_q2yet"]
[ext_resource type="PackedScene" uid="uid://ctgumjaytuoch" path="res://level/level.tscn" id="3_e0nyr"]
[ext_resource type="PackedScene" uid="uid://vh7pmputa7r3" path="res://player/player.tscn" id="4_8j0va"]
[ext_resource type="PackedScene" uid="uid://cw6nldo3rjyyq" path="res://level/background/parallax_background.tscn" id="5_47vt4"]
[sub_resource type="Gradient" id="Gradient_77njx"]
[sub_resource type="GradientTexture1D" id="GradientTexture1D_5sxld"]
gradient = SubResource("Gradient_77njx")
width = 2
[node name="GameSplitscreen" type="Node"]
process_mode = 3
@@ -27,6 +32,8 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 0
theme_override_icons/grabber = SubResource("GradientTexture1D_5sxld")
dragger_visibility = 1
[node name="ViewportContainer1" type="SubViewportContainer" parent="Black/SplitContainer"]
@@ -40,18 +47,20 @@ unique_name_in_owner = true
handle_input_locally = false
canvas_item_default_texture_filter = 0
audio_listener_enable_2d = true
size = Vector2i(394, 480)
size = Vector2i(399, 480)
render_target_update_mode = 4
[node name="Level" parent="Black/SplitContainer/ViewportContainer1/Viewport1" instance=ExtResource("3_e0nyr")]
[node name="Player1" parent="Black/SplitContainer/ViewportContainer1/Viewport1" instance=ExtResource("4_8j0va")]
unique_name_in_owner = true
modulate = Color(1, 1.5, 2.5, 1)
position = Vector2(90, 546)
action_suffix = "_p1"
[node name="Player2" parent="Black/SplitContainer/ViewportContainer1/Viewport1" instance=ExtResource("4_8j0va")]
unique_name_in_owner = true
modulate = Color(3, 1, 1, 1)
position = Vector2(120, 546)
action_suffix = "_p2"
@@ -66,7 +75,7 @@ unique_name_in_owner = true
handle_input_locally = false
canvas_item_default_texture_filter = 0
audio_listener_enable_2d = true
size = Vector2i(394, 480)
size = Vector2i(399, 480)
render_target_update_mode = 4
[node name="ParallaxBackground" parent="Black/SplitContainer/ViewportContainer2/Viewport2" instance=ExtResource("5_47vt4")]
@@ -76,7 +85,5 @@ layer = 100
[node name="PauseMenu" parent="InterfaceLayer" instance=ExtResource("2_xkexm")]
[node name="Music" parent="." instance=ExtResource("6_q2yet")]
[connection signal="coin_collected" from="Black/SplitContainer/ViewportContainer1/Viewport1/Player1" to="InterfaceLayer/PauseMenu" method="_on_coin_collected"]
[connection signal="coin_collected" from="Black/SplitContainer/ViewportContainer1/Viewport1/Player2" to="InterfaceLayer/PauseMenu" method="_on_coin_collected"]

View File

@@ -1,49 +1,99 @@
[gd_scene load_steps=9 format=3 uid="uid://bsyqg6eh3wl5i"]
[gd_scene load_steps=17 format=3 uid="uid://bsyqg6eh3wl5i"]
[ext_resource type="Theme" uid="uid://da4noqsij73it" path="res://gui/theme.tres" id="1"]
[ext_resource type="Texture2D" uid="uid://l42us5qso8v4" path="res://level/coin.webp" id="2"]
[ext_resource type="Theme" uid="uid://da4noqsij73it" path="res://gui/theme.tres" id="1_mctnl"]
[ext_resource type="Texture2D" uid="uid://cj2absxg54f75" path="res://level/coin.webp" id="2"]
[ext_resource type="Script" path="res://gui/coins_counter.gd" id="3"]
[sub_resource type="AtlasTexture" id="2"]
[sub_resource type="AtlasTexture" id="AtlasTexture_0ik14"]
atlas = ExtResource("2")
region = Rect2(0, 0, 8, 8)
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="3"]
[sub_resource type="AtlasTexture" id="AtlasTexture_yoomt"]
atlas = ExtResource("2")
region = Rect2(8, 0, 8, 8)
region = Rect2(32, 0, 32, 32)
[sub_resource type="AtlasTexture" id="4"]
[sub_resource type="AtlasTexture" id="AtlasTexture_8eq38"]
atlas = ExtResource("2")
region = Rect2(16, 0, 8, 8)
region = Rect2(64, 0, 32, 32)
[sub_resource type="AtlasTexture" id="5"]
[sub_resource type="AtlasTexture" id="AtlasTexture_2j420"]
atlas = ExtResource("2")
region = Rect2(24, 0, 8, 8)
region = Rect2(96, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_5fk3k"]
atlas = ExtResource("2")
region = Rect2(128, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_7u8xx"]
atlas = ExtResource("2")
region = Rect2(160, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_8cxbx"]
atlas = ExtResource("2")
region = Rect2(192, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_0rdkm"]
atlas = ExtResource("2")
region = Rect2(224, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_6q04a"]
atlas = ExtResource("2")
region = Rect2(0, 32, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_tbg33"]
atlas = ExtResource("2")
region = Rect2(32, 32, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_tpmon"]
atlas = ExtResource("2")
region = Rect2(64, 32, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_hsrt4"]
atlas = ExtResource("2")
region = Rect2(96, 32, 32, 32)
[sub_resource type="SpriteFrames" id="6"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("2")
"texture": SubResource("AtlasTexture_0ik14")
}, {
"duration": 1.0,
"texture": SubResource("3")
"texture": SubResource("AtlasTexture_yoomt")
}, {
"duration": 1.0,
"texture": SubResource("4")
"texture": SubResource("AtlasTexture_8eq38")
}, {
"duration": 1.0,
"texture": SubResource("5")
"texture": SubResource("AtlasTexture_2j420")
}, {
"duration": 1.0,
"texture": SubResource("4")
"texture": SubResource("AtlasTexture_5fk3k")
}, {
"duration": 1.0,
"texture": SubResource("3")
"texture": SubResource("AtlasTexture_7u8xx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8cxbx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0rdkm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6q04a")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tbg33")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tpmon")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hsrt4")
}],
"loop": true,
"name": &"coin_spinning",
"speed": 6.5
"speed": 12.0
}]
[node name="CoinsCounter" type="Panel"]
@@ -51,20 +101,27 @@ offset_left = 5.0
offset_top = 5.0
offset_right = 100.0
offset_bottom = 45.0
theme = ExtResource("1")
theme = ExtResource("1_mctnl")
script = ExtResource("3")
[node name="Label" type="Label" parent="."]
layout_mode = 0
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -8.0
text = "100"
offset_left = -1.0
offset_top = -3.0
offset_right = -9.0
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 8
theme_override_font_sizes/font_size = 32
text = "99"
horizontal_alignment = 2
vertical_alignment = 1
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(21.5, 22.5)
scale = Vector2(4.375, 4.375)
position = Vector2(23.5, 24.5)
sprite_frames = SubResource("6")
animation = &"coin_spinning"

View File

@@ -0,0 +1,5 @@
[gd_resource type="FontFile" format=2]
[resource]
antialiased = false
font_path = "res://assets/theme/fonts/kenney_mini_square.ttf"

View File

@@ -2,7 +2,7 @@
importer="font_data_dynamic"
type="FontFile"
uid="uid://bk80b6owsrioj"
uid="uid://wqrno8lackrm"
path="res://.godot/imported/kenney_mini_square.ttf-14b0a28a89225c31efd7626f5228f467.fontdata"
[deps]

View File

@@ -1,6 +1,6 @@
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://da4noqsij73it"]
[ext_resource type="FontFile" uid="uid://bk80b6owsrioj" path="res://gui/kenney_mini_square.ttf" id="1_f0sjs"]
[ext_resource type="FontFile" uid="uid://wqrno8lackrm" path="res://gui/kenney_mini_square.ttf" id="1_f0sjs"]
[sub_resource type="StyleBoxFlat" id="1"]
content_margin_left = 6.0

Some files were not shown because too many files have changed in this diff Show More