Skip to content

Commit

Permalink
Port demos with remade art assets to Godot 4 (#922)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Calinou and Nonparoxysmic authored Feb 10, 2024
1 parent 8fc246a commit 4d01a26
Show file tree
Hide file tree
Showing 344 changed files with 13,398 additions and 2,405 deletions.
8 changes: 6 additions & 2 deletions 2d/isometric/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 added 2d/isometric/decorations/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
Binary file added 2d/isometric/decorations/bone_pile_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions 2d/isometric/decorations/bone_pile_1.png.import
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions 2d/isometric/decorations/bone_pile_1.tscn
Original file line number Diff line number Diff line change
@@ -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 added 2d/isometric/decorations/bone_pile_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions 2d/isometric/decorations/bone_pile_2.png.import
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions 2d/isometric/decorations/bone_pile_2.tscn
Original file line number Diff line number Diff line change
@@ -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 added 2d/isometric/decorations/candle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
131 changes: 131 additions & 0 deletions 2d/isometric/decorations/candle.tscn
Original file line number Diff line number Diff line change
@@ -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 added 2d/isometric/decorations/coin_pile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions 2d/isometric/decorations/coin_pile.png.import
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions 2d/isometric/decorations/coin_pile.tscn
Original file line number Diff line number Diff line change
@@ -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 added 2d/isometric/decorations/crow_looking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions 2d/isometric/decorations/crow_looking.png.import
Original file line number Diff line number Diff line change
@@ -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 added 2d/isometric/decorations/crow_sleep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4d01a26

Please sign in to comment.