Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dodge the Creeps to 4.0 #726

Merged
merged 1 commit into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 14 additions & 26 deletions 2d/dodge_the_creeps/HUD.tscn
Original file line number Diff line number Diff line change
@@ -1,42 +1,32 @@
[gd_scene load_steps=7 format=2]
[gd_scene load_steps=4 format=3 uid="uid://ccqoreueuxdb7"]

[ext_resource path="res://HUD.gd" type="Script" id=1]
[ext_resource path="res://fonts/Xolonium-Regular.ttf" type="FontData" id=2]
[ext_resource type="Script" path="res://HUD.gd" id="1"]
[ext_resource type="Font" uid="uid://dyjc58f6sdms0" path="res://fonts/Xolonium-Regular.tres" id="2_3dmm8"]

[sub_resource type="Font" id=1]
size = 64
font_data = ExtResource( 2 )

[sub_resource type="Font" id=2]
size = 64
font_data = ExtResource( 2 )

[sub_resource type="InputEventAction" id=3]
action = "start_game"

[sub_resource type="Shortcut" id=4]
shortcut = SubResource( 3 )
[sub_resource type="Shortcut" id="4"]

[node name="HUD" type="CanvasLayer"]
script = ExtResource( 1 )
script = ExtResource( "1" )

[node name="ScoreLabel" type="Label" parent="."]
anchor_right = 1.0
offset_bottom = 78.0
custom_fonts/font = SubResource( 1 )
theme_override_fonts/font = ExtResource( "2_3dmm8" )
theme_override_font_sizes/font_size = 60
text = "0"
align = 1
horizontal_alignment = 1

[node name="MessageLabel" type="Label" parent="."]
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_top = -79.5
offset_bottom = 79.5
custom_fonts/font = SubResource( 1 )
theme_override_fonts/font = ExtResource( "2_3dmm8" )
theme_override_font_sizes/font_size = 60
text = "Dodge the
Creeps"
align = 1
horizontal_alignment = 1

[node name="StartButton" type="Button" parent="."]
anchor_left = 0.5
Expand All @@ -47,12 +37,10 @@ offset_left = -90.0
offset_top = -200.0
offset_right = 90.0
offset_bottom = -100.0
custom_fonts/font = SubResource( 2 )
shortcut = SubResource( 4 )
theme_override_fonts/font = ExtResource( "2_3dmm8" )
theme_override_font_sizes/font_size = 60
shortcut = SubResource( "4" )
text = "Start"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="MessageTimer" type="Timer" parent="."]
one_shot = true
Expand Down
33 changes: 15 additions & 18 deletions 2d/dodge_the_creeps/Main.tscn
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
[gd_scene load_steps=8 format=2]
[gd_scene load_steps=8 format=3 uid="uid://cyfwty2q3rdse"]

[ext_resource path="res://Main.gd" type="Script" id=1]
[ext_resource path="res://Mob.tscn" type="PackedScene" id=2]
[ext_resource path="res://Player.tscn" type="PackedScene" id=3]
[ext_resource path="res://HUD.tscn" type="PackedScene" id=4]
[ext_resource path="res://art/House In a Forest Loop.ogg" type="AudioStream" id=5]
[ext_resource path="res://art/gameover.wav" type="AudioStream" id=6]
[ext_resource type="Script" path="res://Main.gd" id="1"]
[ext_resource type="PackedScene" uid="uid://rkdnhqgf2hpj" path="res://Mob.tscn" id="2"]
[ext_resource type="PackedScene" uid="uid://4vwrqjegqwpj" path="res://Player.tscn" id="3"]
[ext_resource type="PackedScene" uid="uid://ccqoreueuxdb7" path="res://HUD.tscn" id="4"]
[ext_resource type="AudioStream" uid="uid://q2pf4fr8d0ks" path="res://art/House In a Forest Loop.ogg" id="5"]
[ext_resource type="AudioStream" uid="uid://dw26fpygeag8o" path="res://art/gameover.wav" id="6"]

[sub_resource type="Curve2D" id=1]
[sub_resource type="Curve2D" id="1"]
_data = {
"points": PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 480, 0, 0, 0, 0, 0, 480, 720, 0, 0, 0, 0, 0, 720, 0, 0, 0, 0, 0, 0)
}

[node name="Main" type="Node"]
script = ExtResource( 1 )
mob_scene = ExtResource( 2 )
script = ExtResource( "1" )
mob_scene = ExtResource( "2" )

[node name="ColorRect" type="ColorRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color(0.219608, 0.372549, 0.380392, 1)
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Player" parent="." instance=ExtResource( 3 )]
[node name="Player" parent="." instance=ExtResource( "3" )]

[node name="MobTimer" type="Timer" parent="."]
wait_time = 0.5
Expand All @@ -39,17 +36,17 @@ one_shot = true
position = Vector2(240, 450)

[node name="MobPath" type="Path2D" parent="."]
curve = SubResource( 1 )
curve = SubResource( "1" )

[node name="MobSpawnLocation" type="PathFollow2D" parent="MobPath"]

[node name="HUD" parent="." instance=ExtResource( 4 )]
[node name="HUD" parent="." instance=ExtResource( "4" )]

[node name="Music" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 )
stream = ExtResource( "5" )

[node name="DeathSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )
stream = ExtResource( "6" )

[connection signal="hit" from="Player" to="." method="game_over"]
[connection signal="timeout" from="MobTimer" to="." method="_on_MobTimer_timeout"]
Expand Down
51 changes: 24 additions & 27 deletions 2d/dodge_the_creeps/Mob.tscn
Original file line number Diff line number Diff line change
@@ -1,51 +1,48 @@
[gd_scene load_steps=10 format=2]
[gd_scene load_steps=10 format=3 uid="uid://rkdnhqgf2hpj"]

[ext_resource path="res://Mob.gd" type="Script" id=1]
[ext_resource path="res://art/enemyFlyingAlt_1.png" type="Texture2D" id=2]
[ext_resource path="res://art/enemyFlyingAlt_2.png" type="Texture2D" id=3]
[ext_resource path="res://art/enemyWalking_1.png" type="Texture2D" id=4]
[ext_resource path="res://art/enemyWalking_2.png" type="Texture2D" id=5]
[ext_resource path="res://art/enemySwimming_1.png" type="Texture2D" id=6]
[ext_resource path="res://art/enemySwimming_2.png" type="Texture2D" id=7]
[ext_resource type="Script" path="res://Mob.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://yqglrrsx7j1f" path="res://art/enemyFlyingAlt_1.png" id="2"]
[ext_resource type="Texture2D" uid="uid://bpot8awhdn6ph" path="res://art/enemyFlyingAlt_2.png" id="3"]
[ext_resource type="Texture2D" uid="uid://bu4221t7qpa7d" path="res://art/enemyWalking_1.png" id="4"]
[ext_resource type="Texture2D" uid="uid://booij5t7h4efb" path="res://art/enemyWalking_2.png" id="5"]
[ext_resource type="Texture2D" uid="uid://5lvm88ij4jqn" path="res://art/enemySwimming_1.png" id="6"]
[ext_resource type="Texture2D" uid="uid://bng45cvsgufqc" path="res://art/enemySwimming_2.png" id="7"]

[sub_resource type="SpriteFrames" id=1]
[sub_resource type="SpriteFrames" id="1"]
animations = [{
"frames": [ExtResource( 2 ), ExtResource( 3 )],
"frames": [ExtResource( "6" ), ExtResource( "7" )],
"loop": true,
"name": "fly",
"speed": 3.0
"name": &"swim",
"speed": 4.0
}, {
"frames": [ExtResource( 6 ), ExtResource( 7 )],
"frames": [ExtResource( "2" ), ExtResource( "3" )],
"loop": true,
"name": "swim",
"speed": 4.0
"name": &"fly",
"speed": 3.0
}, {
"frames": [ExtResource( 4 ), ExtResource( 5 )],
"frames": [ExtResource( "4" ), ExtResource( "5" )],
"loop": true,
"name": "walk",
"name": &"walk",
"speed": 4.0
}]

[sub_resource type="CapsuleShape2D" id=2]
radius = 35.2706
height = 23.3281
[sub_resource type="CapsuleShape2D" id="2"]
radius = 37.0
height = 100.0

[node name="Mob" type="RigidDynamicBody2D" groups=["mobs"]]
collision_mask = 0
gravity_scale = 0.0
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
script = ExtResource( "1" )

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.75, 0.75)
frames = SubResource( 1 )
animation = "walk"
frames = SubResource( "1" )
animation = &"walk"

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.5708
shape = SubResource( 2 )
shape = SubResource( "2" )

[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]

Expand Down
66 changes: 29 additions & 37 deletions 2d/dodge_the_creeps/Player.tscn
Original file line number Diff line number Diff line change
@@ -1,71 +1,63 @@
[gd_scene load_steps=13 format=2]
[gd_scene load_steps=13 format=3 uid="uid://4vwrqjegqwpj"]

[ext_resource path="res://Player.gd" type="Script" id=1]
[ext_resource path="res://art/playerGrey_walk1.png" type="Texture2D" id=2]
[ext_resource path="res://art/playerGrey_walk2.png" type="Texture2D" id=3]
[ext_resource path="res://art/playerGrey_up1.png" type="Texture2D" id=4]
[ext_resource path="res://art/playerGrey_up2.png" type="Texture2D" id=5]
[ext_resource type="Script" path="res://Player.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://ftkxr8r4qghp" path="res://art/playerGrey_walk1.png" id="2"]
[ext_resource type="Texture2D" uid="uid://couyhcegeihme" path="res://art/playerGrey_walk2.png" id="3"]
[ext_resource type="Texture2D" uid="uid://b4yyoafu8bi0q" path="res://art/playerGrey_up1.png" id="4"]
[ext_resource type="Texture2D" uid="uid://bko65a0nd66st" path="res://art/playerGrey_up2.png" id="5"]

[sub_resource type="SpriteFrames" id=1]
[sub_resource type="SpriteFrames" id="1"]
animations = [{
"frames": [ExtResource( 2 ), ExtResource( 3 )],
"frames": [ExtResource( "2" ), ExtResource( "3" )],
"loop": true,
"name": "right",
"name": &"right",
"speed": 5.0
}, {
"frames": [ExtResource( 4 ), ExtResource( 5 )],
"frames": [ExtResource( "4" ), ExtResource( "5" )],
"loop": true,
"name": "up",
"name": &"up",
"speed": 5.0
}]

[sub_resource type="CapsuleShape2D" id=2]
radius = 26.1701
height = 14.822
[sub_resource type="CapsuleShape2D" id="2"]
radius = 27.0
height = 68.0

[sub_resource type="Gradient" id=3]
[sub_resource type="Gradient" id="3"]
colors = PackedColorArray(1, 1, 1, 0.501961, 1, 1, 1, 0)

[sub_resource type="GradientTexture" id=4]
gradient = SubResource( 3 )
[sub_resource type="GradientTexture1D" id="4"]
gradient = SubResource( "3" )

[sub_resource type="Curve" id=5]
[sub_resource type="Curve" id="5"]
_data = [Vector2(0.00501098, 0.5), 0.0, 0.0, 0, 0, Vector2(0.994989, 0.324), 0.0, 0.0, 0, 0]

[sub_resource type="CurveTexture" id=6]
curve = SubResource( 5 )
[sub_resource type="CurveTexture" id="6"]
curve = SubResource( "5" )

[sub_resource type="ParticlesMaterial" id=7]
flag_disable_z = true
[sub_resource type="ParticlesMaterial" id="7"]
gravity = Vector3(0, 0, 0)
initial_velocity = 1.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
scale = 0.75
scale_curve = SubResource( 6 )
color_ramp = SubResource( 4 )
scale_curve = SubResource( "6" )
color_ramp = SubResource( "4" )

[node name="Player" type="Area2D"]
z_index = 10
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
script = ExtResource( "1" )

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.5, 0.5)
frames = SubResource( 1 )
animation = "right"
frames = SubResource( "1" )
animation = &"right"

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
shape = SubResource( "2" )

[node name="Trail" type="GPUParticles2D" parent="."]
z_index = -1
amount = 10
speed_scale = 2.0
local_coords = false
process_material = SubResource( 7 )
texture = ExtResource( 2 )
process_material = SubResource( "7" )
texture = ExtResource( "2" )

[connection signal="body_entered" from="." to="." method="_on_Player_body_entered"]
7 changes: 4 additions & 3 deletions 2d/dodge_the_creeps/art/House In a Forest Loop.ogg.import
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[remap]

importer="ogg_vorbis"
importer="oggvorbisstr"
type="AudioStreamOGGVorbis"
path="res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr"
uid="uid://q2pf4fr8d0ks"
path="res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggvorbisstr"

[deps]

source_file="res://art/House In a Forest Loop.ogg"
dest_files=["res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr"]
dest_files=["res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggvorbisstr"]

[params]

Expand Down
28 changes: 13 additions & 15 deletions 2d/dodge_the_creeps/art/enemyFlyingAlt_1.png.import
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
[remap]

importer="texture"
type="StreamTexture2D"
path="res://.godot/imported/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.stex"
type="CompressedTexture2D"
uid="uid://yqglrrsx7j1f"
path="res://.godot/imported/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://art/enemyFlyingAlt_1.png"
dest_files=["res://.godot/imported/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.stex"]
dest_files=["res://.godot/imported/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.ctex"]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
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/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
process/hdr_as_srgb=false
process/size_limit=0
detect_3d/compress_to=1
Loading