From d48c9b3c23200eab8e92fa3db3a959ca59abba2b Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Mon, 2 Oct 2023 21:40:21 +0400 Subject: [PATCH 1/4] small fix --- res/shaders/colorize.tres | 4 ++-- res/themes/default.tres | 1 + src/scenes/game/Game.tscn | 16 ++++++++-------- src/scenes/game/spell_holder.gd | 3 +-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/res/shaders/colorize.tres b/res/shaders/colorize.tres index dcdce01..f7d36b5 100644 --- a/res/shaders/colorize.tres +++ b/res/shaders/colorize.tres @@ -15,5 +15,5 @@ void fragment(){ [resource] shader = SubResource( 3 ) -shader_param/active = true -shader_param/color = Color( 1, 1, 1, 0 ) +shader_param/active = false +shader_param/color = Color( 1, 1, 1, 1 ) diff --git a/res/themes/default.tres b/res/themes/default.tres index f806a20..41f81a2 100644 --- a/res/themes/default.tres +++ b/res/themes/default.tres @@ -3,6 +3,7 @@ [ext_resource path="res://res/fonts/silkscreen/Silkscreen-Regular.ttf" type="DynamicFontData" id=1] [sub_resource type="DynamicFont" id=1] +size = 8 font_data = ExtResource( 1 ) [resource] diff --git a/src/scenes/game/Game.tscn b/src/scenes/game/Game.tscn index 230dede..a93d4a0 100644 --- a/src/scenes/game/Game.tscn +++ b/src/scenes/game/Game.tscn @@ -32,14 +32,14 @@ extents = Vector2( 140, 10.125 ) atlas = ExtResource( 6 ) region = Rect2( 155, 0, 31, 11 ) -[sub_resource type="AtlasTexture" id=8] -atlas = ExtResource( 6 ) -region = Rect2( 124, 0, 31, 11 ) - [sub_resource type="AtlasTexture" id=9] atlas = ExtResource( 6 ) region = Rect2( 93, 0, 31, 11 ) +[sub_resource type="AtlasTexture" id=8] +atlas = ExtResource( 6 ) +region = Rect2( 124, 0, 31, 11 ) + [sub_resource type="AtlasTexture" id=10] atlas = ExtResource( 6 ) region = Rect2( 62, 0, 31, 11 ) @@ -54,10 +54,10 @@ region = Rect2( 0, 0, 31, 11 ) [sub_resource type="SpriteFrames" id=4] animations = [ { -"frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ], -"loop": true, -"name": "default", -"speed": 5.0 +"frames": [ SubResource( 7 ), SubResource( 9 ), SubResource( 8 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ], +"loop": false, +"name": "idle", +"speed": 0.0 } ] [sub_resource type="Animation" id=5] diff --git a/src/scenes/game/spell_holder.gd b/src/scenes/game/spell_holder.gd index 6491336..da8f287 100644 --- a/src/scenes/game/spell_holder.gd +++ b/src/scenes/game/spell_holder.gd @@ -14,7 +14,6 @@ func add_modifier(spell_name, selected_modifier): modifiers.append(spell_name) var spell_icon = icon_preload.instance() spell_icon.frame = selected_modifier + self.add_child(spell_icon) spell_icon.global_position.x += 7 + (modifiers.size() - 1) * (14 + 2) spell_icon.global_position.y += 7 - self.add_child(spell_icon) - From 685f27fea620af2d252dfa75ba774fb84e2dbc11 Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Mon, 2 Oct 2023 21:47:23 +0400 Subject: [PATCH 2/4] fix bat sound --- res/sounds/bat/damaged.ogg.import | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/sounds/bat/damaged.ogg.import b/res/sounds/bat/damaged.ogg.import index e914e41..7d3d52a 100644 --- a/res/sounds/bat/damaged.ogg.import +++ b/res/sounds/bat/damaged.ogg.import @@ -11,5 +11,5 @@ dest_files=[ "res://.import/damaged.ogg-ef3864fff26832b4277374ecefd47594.oggstr" [params] -loop=true +loop=false loop_offset=0 From 7ef466397a8d67f92ce768ac0e66ed99f200a458 Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Mon, 2 Oct 2023 21:53:29 +0400 Subject: [PATCH 3/4] fix hearts (maybe) --- src/scenes/game/Game.tscn | 39 ++----------------- .../sprites/health/health_spriteframes.tres | 35 +++++++++++++++++ 2 files changed, 39 insertions(+), 35 deletions(-) create mode 100644 src/scenes/game/sprites/health/health_spriteframes.tres diff --git a/src/scenes/game/Game.tscn b/src/scenes/game/Game.tscn index a93d4a0..2104da0 100644 --- a/src/scenes/game/Game.tscn +++ b/src/scenes/game/Game.tscn @@ -1,11 +1,11 @@ -[gd_scene load_steps=33 format=2] +[gd_scene load_steps=26 format=2] [ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=1] [ext_resource path="res://src/scenes/game/sprites/background_houses.png" type="Texture" id=2] [ext_resource path="res://src/scenes/game/spell_holder.gd" type="Script" id=3] [ext_resource path="res://res/themes/8px.tres" type="Theme" id=4] [ext_resource path="res://src/models/player/Player.tscn" type="PackedScene" id=5] -[ext_resource path="res://src/scenes/game/sprites/health/health.png" type="Texture" id=6] +[ext_resource path="res://src/scenes/game/sprites/health/health_spriteframes.tres" type="SpriteFrames" id=6] [ext_resource path="res://src/scenes/game/sprites/cast_time.png" type="Texture" id=7] [ext_resource path="res://src/scenes/game/card_placeholder.gd" type="Script" id=8] [ext_resource path="res://res/sounds/card_select/card_select.ogg" type="AudioStream" id=9] @@ -28,38 +28,6 @@ extents = Vector2( 10, 60 ) [sub_resource type="RectangleShape2D" id=3] extents = Vector2( 140, 10.125 ) -[sub_resource type="AtlasTexture" id=7] -atlas = ExtResource( 6 ) -region = Rect2( 155, 0, 31, 11 ) - -[sub_resource type="AtlasTexture" id=9] -atlas = ExtResource( 6 ) -region = Rect2( 93, 0, 31, 11 ) - -[sub_resource type="AtlasTexture" id=8] -atlas = ExtResource( 6 ) -region = Rect2( 124, 0, 31, 11 ) - -[sub_resource type="AtlasTexture" id=10] -atlas = ExtResource( 6 ) -region = Rect2( 62, 0, 31, 11 ) - -[sub_resource type="AtlasTexture" id=11] -atlas = ExtResource( 6 ) -region = Rect2( 31, 0, 31, 11 ) - -[sub_resource type="AtlasTexture" id=12] -atlas = ExtResource( 6 ) -region = Rect2( 0, 0, 31, 11 ) - -[sub_resource type="SpriteFrames" id=4] -animations = [ { -"frames": [ SubResource( 7 ), SubResource( 9 ), SubResource( 8 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ], -"loop": false, -"name": "idle", -"speed": 0.0 -} ] - [sub_resource type="Animation" id=5] length = 0.001 tracks/0/type = "value" @@ -228,7 +196,8 @@ margin_bottom = 40.0 [node name="HealthSprite" type="AnimatedSprite" parent="UIWrapper/UI/Left/Health"] position = Vector2( 52, 156 ) -frames = SubResource( 4 ) +frames = ExtResource( 6 ) +animation = "idle" centered = false [node name="PlayerIcon" type="Sprite" parent="UIWrapper/UI/Left"] diff --git a/src/scenes/game/sprites/health/health_spriteframes.tres b/src/scenes/game/sprites/health/health_spriteframes.tres new file mode 100644 index 0000000..025b9cc --- /dev/null +++ b/src/scenes/game/sprites/health/health_spriteframes.tres @@ -0,0 +1,35 @@ +[gd_resource type="SpriteFrames" load_steps=8 format=2] + +[ext_resource path="res://src/scenes/game/sprites/health/health.png" type="Texture" id=1] + +[sub_resource type="AtlasTexture" id=6] +atlas = ExtResource( 1 ) +region = Rect2( 155, 0, 31, 11 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 1 ) +region = Rect2( 93, 0, 31, 11 ) + +[sub_resource type="AtlasTexture" id=5] +atlas = ExtResource( 1 ) +region = Rect2( 124, 0, 31, 11 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 1 ) +region = Rect2( 62, 0, 31, 11 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 1 ) +region = Rect2( 31, 0, 31, 11 ) + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 31, 11 ) + +[resource] +animations = [ { +"frames": [ SubResource( 6 ), SubResource( 4 ), SubResource( 5 ), SubResource( 3 ), SubResource( 2 ), SubResource( 1 ) ], +"loop": false, +"name": "idle", +"speed": 0.0 +} ] From d11bfe5d223d0bd059e35a30e3996ecbfd311f83 Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Mon, 2 Oct 2023 22:02:06 +0400 Subject: [PATCH 4/4] small ui update --- project.godot | 3 ++- src/scenes/game/Game.tscn | 28 +++++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/project.godot b/project.godot index 369f336..68c107c 100644 --- a/project.godot +++ b/project.godot @@ -10,7 +10,8 @@ config_version=4 [application] -config/name="LD54" +config/name="Long Night" +config/description="Game made for Ludum Dare 54 by iLunaiLuna, Manskage and JustDzhi" run/main_scene="res://src/scenes/menu/Menu.tscn" boot_splash/show_image=false boot_splash/bg_color=Color( 0, 0, 0, 1 ) diff --git a/src/scenes/game/Game.tscn b/src/scenes/game/Game.tscn index 2104da0..35236a6 100644 --- a/src/scenes/game/Game.tscn +++ b/src/scenes/game/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=26 format=2] +[gd_scene load_steps=27 format=2] [ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=1] [ext_resource path="res://src/scenes/game/sprites/background_houses.png" type="Texture" id=2] @@ -21,6 +21,7 @@ [ext_resource path="res://src/scenes/game/sprites/stun/stun_placeholder_spriteframes.tres" type="SpriteFrames" id=19] [ext_resource path="res://src/scenes/game/camera.gd" type="Script" id=20] [ext_resource path="res://src/scenes/game/sprites/shake_border.png" type="Texture" id=21] +[ext_resource path="res://src/scenes/game/sprites/damage.png" type="Texture" id=22] [sub_resource type="RectangleShape2D" id=2] extents = Vector2( 10, 60 ) @@ -245,19 +246,40 @@ margin_right = 40.0 margin_bottom = 40.0 [node name="CastTime" type="Control" parent="UIWrapper/UI/Right"] +margin_top = 4.0 margin_right = 40.0 -margin_bottom = 40.0 +margin_bottom = 44.0 [node name="CastTime" type="Sprite" parent="UIWrapper/UI/Right/CastTime"] position = Vector2( 256, 140 ) texture = ExtResource( 7 ) +[node name="CastTimeLabel" type="Label" parent="UIWrapper/UI/Right/CastTime"] +modulate = Color( 1, 0.870588, 0, 1 ) +margin_left = 266.0 +margin_top = 133.0 +margin_right = 306.0 +margin_bottom = 147.0 +theme = ExtResource( 4 ) +text = "0.8" + [node name="Damage" type="Control" parent="UIWrapper/UI/Right"] +margin_top = 1.0 margin_right = 40.0 -margin_bottom = 40.0 +margin_bottom = 41.0 [node name="Damage" type="Sprite" parent="UIWrapper/UI/Right/Damage"] position = Vector2( 256, 160 ) +texture = ExtResource( 22 ) + +[node name="DamageLabel" type="Label" parent="UIWrapper/UI/Right/Damage"] +modulate = Color( 1, 0.870588, 0, 1 ) +margin_left = 266.0 +margin_top = 153.0 +margin_right = 306.0 +margin_bottom = 167.0 +theme = ExtResource( 4 ) +text = "15" [node name="Cards" type="Control" parent="UIWrapper/UI"] visible = false