diff --git a/fonts/dialog_default_font_bold.tres b/fonts/dialog_default_font_bold.tres new file mode 100644 index 0000000..137b7e7 --- /dev/null +++ b/fonts/dialog_default_font_bold.tres @@ -0,0 +1,9 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://fonts/EnterCommand-Bold.ttf" type="DynamicFontData" id=1] + +[resource] +size = 32 +outline_color = Color( 0, 0, 0, 1 ) +extra_spacing_bottom = -6 +font_data = ExtResource( 1 ) diff --git a/images/game1/game1_tileset.png b/images/game1/game1_tileset.png index 08daf4d..3876148 100644 Binary files a/images/game1/game1_tileset.png and b/images/game1/game1_tileset.png differ diff --git a/scenes/campfire2.tscn b/scenes/campfire2.tscn index a8805bb..5b5cbaf 100644 --- a/scenes/campfire2.tscn +++ b/scenes/campfire2.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://scripts/campfire2.gd" type="Script" id=1] [ext_resource path="res://scenes/campfire/Herbert.tscn" type="PackedScene" id=2] [ext_resource path="res://scenes/campfire/CampfireBackground.tscn" type="PackedScene" id=3] [ext_resource path="res://scenes/dialogue.tscn" type="PackedScene" id=4] [ext_resource path="res://images/campfire/thechoice.tres" type="SpriteFrames" id=5] +[ext_resource path="res://fonts/dialog_default_font_bold.tres" type="DynamicFont" id=6] [node name="Node2D" type="Node2D"] script = ExtResource( 1 ) @@ -28,7 +29,29 @@ __meta__ = { [node name="Dialogue" parent="UI" instance=ExtResource( 4 )] [node name="TheChoice" type="AnimatedSprite" parent="."] -visible = false frames = ExtResource( 5 ) animation = "lie" centered = false + +[node name="Lie" type="Label" parent="TheChoice"] +margin_left = 127.633 +margin_top = 75.0 +margin_right = 167.633 +margin_bottom = 97.0 +custom_fonts/font = ExtResource( 6 ) +text = "Lie" +align = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Tell the truth" type="Label" parent="TheChoice"] +margin_top = 3.71011 +margin_right = 84.0 +margin_bottom = 25.7101 +custom_fonts/font = ExtResource( 6 ) +text = "Truth" +align = 1 +__meta__ = { +"_edit_use_anchors_": false +} diff --git a/scenes/game1.tscn b/scenes/game1.tscn index 3483f84..c3d7605 100644 --- a/scenes/game1.tscn +++ b/scenes/game1.tscn @@ -109,6 +109,10 @@ dialogue = "res://dialogues/game1.json" [node name="Game" type="Node2D" parent="."] +[node name="GameControlIndicator" type="AnimatedSprite" parent="."] +position = Vector2( 96, 70 ) +script = ExtResource( 8 ) + [node name="Opening2" type="Node2D" parent="."] [node name="Opening2Bg" type="AnimatedSprite" parent="Opening2"] diff --git a/scenes/main_menu.tscn b/scenes/main_menu.tscn index b3350ad..3f61d9d 100644 --- a/scenes/main_menu.tscn +++ b/scenes/main_menu.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=12 format=2] [ext_resource path="res://scripts/menu/title_background.gd" type="Script" id=1] [ext_resource path="res://fonts/dialog_default_font.tres" type="DynamicFont" id=2] @@ -7,12 +7,15 @@ [ext_resource path="res://scripts/menu/MainMenu.gd" type="Script" id=5] [ext_resource path="res://images/main_menu/title_background_campfire.tres" type="SpriteFrames" id=6] [ext_resource path="res://images/main_menu/titleWithoutEly_loop.tres" type="SpriteFrames" id=7] +[ext_resource path="res://sounds/main_title.ogg" type="AudioStream" id=8] +[ext_resource path="res://scripts/main_menu.gd" type="Script" id=9] [sub_resource type="StyleBoxEmpty" id=1] [sub_resource type="StyleBoxEmpty" id=2] [node name="Node2D" type="Node2D"] +script = ExtResource( 9 ) [node name="background" type="AnimatedSprite" parent="."] frames = ExtResource( 7 ) @@ -90,5 +93,8 @@ script = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": false } + +[node name="MainMusic" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 8 ) [connection signal="animation_finished" from="ely" to="ely" method="_on_background_animation_finished"] [connection signal="animation_finished" from="fire" to="fire" method="_on_background_animation_finished"] diff --git a/scripts/ControlIndicator.gd b/scripts/ControlIndicator.gd index 6b230f6..d1a301e 100644 --- a/scripts/ControlIndicator.gd +++ b/scripts/ControlIndicator.gd @@ -11,7 +11,7 @@ const press_right = preload("res://images/Controls/PressRight.tres") var last_is_joy = false func show_press(action : String): - if action == 'ui_accept': + if action == 'ui_accept' || action == 'interact': frames = press_a if last_is_joy else press_space if action == 'right': frames = press_right diff --git a/scripts/Globals.gd b/scripts/Globals.gd index 2c05a00..781111d 100644 --- a/scripts/Globals.gd +++ b/scripts/Globals.gd @@ -1,3 +1,4 @@ extends Node var ui_accept_tip = false +var ui_interact_flatfish_tip = false diff --git a/scripts/game1/Game1Script.gd b/scripts/game1/Game1Script.gd index 54aa96c..c56587d 100644 --- a/scripts/game1/Game1Script.gd +++ b/scripts/game1/Game1Script.gd @@ -110,6 +110,7 @@ func spawn_entities(level : Node): # Spawn point for cell in tm.get_used_cells_by_id(tileset.find_tile_by_name('start')): spawn_pos = cell + tm.set_cell(cell.x, cell.y, -1) # Exit points for cell in tm.get_used_cells_by_id(tileset.find_tile_by_name('finish')): @@ -217,6 +218,19 @@ func move_left(): func check_exit() -> bool: var player_pos = (player.position - Vector2(8, 8)) / 16 + + if !Globals.ui_interact_flatfish_tip: + var level = $Game.get_node(levels[current_level]) + var shown = false + for e in level.get_node('Entities').get_children(): + if e is Flatfish && e.position == player.position: + $GameControlIndicator.show_press('interact') + $GameControlIndicator.position = player.position + Vector2(0, 8 + 16) + shown = true + break + if !shown: + $GameControlIndicator.hide() + print(player_pos) for exit in exit_points: if player_pos == exit: @@ -255,6 +269,9 @@ func interact(): break if fish != null: + Globals.ui_interact_flatfish_tip = true + $GameControlIndicator.hide() + fish.appear() yield(get_tree().create_timer(0.2), "timeout") diff --git a/scripts/main_menu.gd b/scripts/main_menu.gd new file mode 100644 index 0000000..ae5d0a7 --- /dev/null +++ b/scripts/main_menu.gd @@ -0,0 +1,5 @@ +extends Node2D + + +func _ready(): + $MainMusic.play() diff --git a/sounds/main_title.ogg b/sounds/main_title.ogg new file mode 100644 index 0000000..dc7adb7 Binary files /dev/null and b/sounds/main_title.ogg differ diff --git a/sounds/main_title.ogg.import b/sounds/main_title.ogg.import new file mode 100644 index 0000000..6c2a9e1 --- /dev/null +++ b/sounds/main_title.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/main_title.ogg-ccd8b7af008d3af3848694e6df920f8a.oggstr" + +[deps] + +source_file="res://sounds/main_title.ogg" +dest_files=[ "res://.import/main_title.ogg-ccd8b7af008d3af3848694e6df920f8a.oggstr" ] + +[params] + +loop=true +loop_offset=0