Skip to content

Commit 9c59c80

Browse files
Port demos with remade art assets to Godot 4
This re-ports the following demos to Godot 4 following their latest `3.x` versions: - 2D Navigation with AStarGrid2D - 2D JRPG Demo (todo) - 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 <[email protected]>
1 parent 0e83ebc commit 9c59c80

File tree

343 files changed

+13305
-2337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+13305
-2337
lines changed

2d/isometric/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ as well as be occluded when standing in front or behind them.
77

88
Language: GDScript
99

10-
Renderer: GLES 2
10+
Renderer: Compatibility
1111

1212
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/112
1313

@@ -21,6 +21,10 @@ and [`CollisionPolygon2D`](https://docs.godotengine.org/en/latest/classes/class_
2121
at their base. The player also has a collider at its base,
2222
which makes the player collide with the level.
2323

24+
2D lighting effects are achieved using a mixture of PointLight2D nodes (which provide real-time shadows)
25+
and pre-placed Polygon2Ds with sprites. To provide additional ambient shading, the goblin also has a blob
26+
shadow below its feet (a Sprite2D with a texture).
27+
2428
## Screenshots
2529

26-
![Screenshot](screenshots/isometric.png)
30+
![Screenshot](screenshots/isometric.webp)

2d/isometric/decorations/banner.png

11.5 KB
Loading

2d/platformer/level/cloud_1.webp.import renamed to 2d/isometric/decorations/banner.png.import

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
importer="texture"
44
type="CompressedTexture2D"
5-
uid="uid://b4n7s65t0qoep"
6-
path="res://.godot/imported/cloud_1.webp-d4440f8a56714fd63d83c7074d20ace3.ctex"
5+
uid="uid://bycat883fu7q2"
6+
path="res://.godot/imported/banner.png-45264389ab2131df9b78c5ec3b246773.ctex"
77
metadata={
88
"vram_texture": false
99
}
1010

1111
[deps]
1212

13-
source_file="res://level/cloud_1.webp"
14-
dest_files=["res://.godot/imported/cloud_1.webp-d4440f8a56714fd63d83c7074d20ace3.ctex"]
13+
source_file="res://decorations/banner.png"
14+
dest_files=["res://.godot/imported/banner.png-45264389ab2131df9b78c5ec3b246773.ctex"]
1515

1616
[params]
1717

4.51 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://dpxv7d5d7hm33"
6+
path="res://.godot/imported/bone_pile_1.png-72c582c4f31012bb8009120719983b0c.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://decorations/bone_pile_1.png"
14+
dest_files=["res://.godot/imported/bone_pile_1.png-72c582c4f31012bb8009120719983b0c.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[gd_scene load_steps=3 format=2]
2+
3+
[ext_resource path="res://decorations/bone_pile_1.png" type="Texture2D" id=1]
4+
5+
[sub_resource type="CapsuleShape2D" id=1]
6+
radius = 18.0
7+
height = 28.0
8+
9+
[node name="bone_pile" type="Node2D"]
10+
11+
[node name="StaticBody2D" type="StaticBody2D" parent="."]
12+
13+
[node name="Sprite2D" type="Sprite2D" parent="StaticBody2D"]
14+
position = Vector2( 0, -14 )
15+
texture = ExtResource( 1 )
16+
17+
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
18+
position = Vector2( 0, -15 )
19+
rotation = 1.5708
20+
shape = SubResource( 1 )
4.17 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://wxpdcei7yeuk"
6+
path="res://.godot/imported/bone_pile_2.png-f448133711e0ebea56f9e49e956ac902.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://decorations/bone_pile_2.png"
14+
dest_files=["res://.godot/imported/bone_pile_2.png-f448133711e0ebea56f9e49e956ac902.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[gd_scene load_steps=3 format=2]
2+
3+
[ext_resource path="res://decorations/bone_pile_2.png" type="Texture2D" id=1]
4+
5+
[sub_resource type="CapsuleShape2D" id=1]
6+
radius = 13.0
7+
height = 26.0001
8+
9+
[node name="bone_pile" type="Node2D"]
10+
11+
[node name="Sprite2D" type="Sprite2D" parent="."]
12+
position = Vector2( 0, -13 )
13+
texture = ExtResource( 1 )
14+
15+
[node name="StaticBody2D" type="StaticBody2D" parent="."]
16+
17+
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
18+
position = Vector2( 0, -13 )
19+
rotation = 1.5708
20+
shape = SubResource( 1 )

2d/isometric/decorations/candle.png

3.91 KB
Loading

2d/platformer/level/cloud_2.webp.import renamed to 2d/isometric/decorations/candle.png.import

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
importer="texture"
44
type="CompressedTexture2D"
5-
uid="uid://cubkvnu4fdwki"
6-
path="res://.godot/imported/cloud_2.webp-6870de4e2ed6536e37af4c22aa731ad1.ctex"
5+
uid="uid://bkae3n748i0ow"
6+
path="res://.godot/imported/candle.png-223de51ae9e8ec99121079382498836e.ctex"
77
metadata={
88
"vram_texture": false
99
}
1010

1111
[deps]
1212

13-
source_file="res://level/cloud_2.webp"
14-
dest_files=["res://.godot/imported/cloud_2.webp-6870de4e2ed6536e37af4c22aa731ad1.ctex"]
13+
source_file="res://decorations/candle.png"
14+
dest_files=["res://.godot/imported/candle.png-223de51ae9e8ec99121079382498836e.ctex"]
1515

1616
[params]
1717

2d/isometric/decorations/candle.tscn

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
[gd_scene load_steps=14 format=2]
2+
3+
[ext_resource path="res://decorations/sparkle.png" type="Texture2D" id=1]
4+
[ext_resource path="res://decorations/candle.png" type="Texture2D" id=2]
5+
[ext_resource path="res://decorations/fire.png" type="Texture2D" id=3]
6+
[ext_resource path="res://decorations/glow.png" type="Texture2D" id=4]
7+
8+
[sub_resource type="CanvasItemMaterial" id=1]
9+
particles_animation = true
10+
particles_anim_h_frames = 11
11+
particles_anim_v_frames = 1
12+
particles_anim_loop = false
13+
14+
[sub_resource type="Gradient" id=2]
15+
offsets = PackedFloat32Array( 0, 0.625698, 1 )
16+
colors = PackedColorArray( 1, 0.584314, 0, 1, 1, 0.84063, 0.226563, 1, 1, 0.584314, 0, 1 )
17+
18+
[sub_resource type="CanvasItemMaterial" id=3]
19+
blend_mode = 1
20+
particles_animation = true
21+
particles_anim_h_frames = 8
22+
particles_anim_v_frames = 1
23+
particles_anim_loop = false
24+
25+
[sub_resource type="Curve" id=4]
26+
max_value = 0.3
27+
_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 ]
28+
29+
[sub_resource type="Gradient" id=5]
30+
offsets = PackedFloat32Array( 0, 0.435754, 1 )
31+
colors = PackedColorArray( 1, 0.351563, 0, 1, 0.895996, 0.745333, 0.230999, 1, 1, 0.426842, 0.0234375, 1 )
32+
33+
[sub_resource type="Gradient" id=12]
34+
offsets = PackedFloat32Array( 0, 0.100559, 0.234637, 0.480447, 0.603352, 1 )
35+
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 )
36+
37+
[sub_resource type="GradientTexture2D" id=9]
38+
gradient = SubResource( 12 )
39+
width = 128
40+
height = 128
41+
fill = 1
42+
fill_from = Vector2( 0.5, 0.5 )
43+
fill_to = Vector2( 0, 0 )
44+
45+
[sub_resource type="Gradient" id=13]
46+
offsets = PackedFloat32Array( 0.0111732, 0.843575 )
47+
colors = PackedColorArray( 0.648926, 0.648926, 0.648926, 1, 0, 0, 0, 1 )
48+
49+
[sub_resource type="GradientTexture2D" id=10]
50+
gradient = SubResource( 13 )
51+
width = 800
52+
height = 500
53+
fill = 1
54+
fill_from = Vector2( 0.5, 0.5 )
55+
56+
[node name="Node2D" type="Node2D"]
57+
58+
[node name="Sprite2D" type="Sprite2D" parent="."]
59+
light_mask = 128
60+
position = Vector2( 0, -11 )
61+
texture = ExtResource( 2 )
62+
63+
[node name="glow" type="CPUParticles2D" parent="Sprite2D"]
64+
modulate = Color( 1, 0.360784, 0.113725, 1 )
65+
light_mask = 128
66+
position = Vector2( -13, -33.244 )
67+
scale = Vector2( 0.3, 0.5 )
68+
amount = 1
69+
lifetime = 0.8
70+
texture = ExtResource( 4 )
71+
gravity = Vector2( 0, 0 )
72+
73+
[node name="Fire" type="CPUParticles2D" parent="Sprite2D"]
74+
light_mask = 128
75+
material = SubResource( 1 )
76+
position = Vector2( -13, -35 )
77+
scale = Vector2( 0.6, 0.6 )
78+
amount = 1
79+
lifetime = 0.8
80+
texture = ExtResource( 3 )
81+
gravity = Vector2( 0, 0 )
82+
color_ramp = SubResource( 2 )
83+
anim_speed = 1.0
84+
85+
[node name="Sparkle" type="CPUParticles2D" parent="Sprite2D"]
86+
light_mask = 128
87+
material = SubResource( 3 )
88+
position = Vector2( -13, -35 )
89+
scale = Vector2( 0.6, 0.6 )
90+
amount = 3
91+
texture = ExtResource( 1 )
92+
emission_shape = 1
93+
emission_sphere_radius = 8.0
94+
gravity = Vector2( 0, -80 )
95+
angular_velocity = 1.0
96+
tangential_accel = 49.54
97+
scale_amount_curve = SubResource( 4 )
98+
color_ramp = SubResource( 5 )
99+
anim_speed = 1.0
100+
101+
[node name="flow front" type="CPUParticles2D" parent="Sprite2D"]
102+
modulate = Color( 0.94902, 1, 0, 1 )
103+
light_mask = 128
104+
position = Vector2( -13, -28.689 )
105+
scale = Vector2( 0.25, 0.25 )
106+
amount = 1
107+
lifetime = 0.8
108+
texture = ExtResource( 4 )
109+
gravity = Vector2( 0, 0 )
110+
111+
[node name="Light2D2" type="PointLight2D" parent="."]
112+
light_mask = 2
113+
position = Vector2( -15, -49 )
114+
texture = SubResource( 9 )
115+
color = Color( 1, 0.466667, 0.0352941, 1 )
116+
energy = 2.0
117+
range_height = 450.9
118+
range_item_cull_mask = 145
119+
shadow_buffer_size = 512
120+
shadow_gradient_length = 30.0
121+
shadow_item_cull_mask = 145
122+
123+
[node name="PointLight2D" type="PointLight2D" parent="."]
124+
light_mask = 2
125+
texture = SubResource( 10 )
126+
color = Color( 0.709804, 0.388235, 0.313726, 1 )
127+
range_height = 901.9
128+
range_item_cull_mask = 17
129+
shadow_enabled = true
130+
shadow_gradient_length = 20.0
131+
shadow_item_cull_mask = 17
5.01 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://b6sjbdj350qkj"
6+
path="res://.godot/imported/coin_pile.png-e6c4ef8bf22301fe805244aafb152afe.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://decorations/coin_pile.png"
14+
dest_files=["res://.godot/imported/coin_pile.png-e6c4ef8bf22301fe805244aafb152afe.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[gd_scene load_steps=3 format=2]
2+
3+
[ext_resource path="res://decorations/coin_pile.png" type="Texture2D" id=1]
4+
5+
[sub_resource type="CapsuleShape2D" id=1]
6+
radius = 12.0
7+
height = 38.0
8+
9+
[node name="coin_pile" type="Node2D"]
10+
11+
[node name="StaticBody2D" type="StaticBody2D" parent="."]
12+
13+
[node name="Sprite2D" type="Sprite2D" parent="StaticBody2D"]
14+
position = Vector2( 0, -23 )
15+
texture = ExtResource( 1 )
16+
17+
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
18+
position = Vector2( 0, -13 )
19+
rotation = 1.5708
20+
shape = SubResource( 1 )
77.4 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://dami7imxtk2iq"
6+
path="res://.godot/imported/crow_looking.png-21ce662085fe50bb572e6cecb19ea02a.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://decorations/crow_looking.png"
14+
dest_files=["res://.godot/imported/crow_looking.png-21ce662085fe50bb572e6cecb19ea02a.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
50.6 KB
Loading

0 commit comments

Comments
 (0)