Browse Source

Main title music, in game flatfish control indicator, tileset update, remove start tiles

a
Alice Gaudon 10 months ago
parent
commit
6ce7d1ef92
11 changed files with 84 additions and 4 deletions
  1. +9
    -0
      fonts/dialog_default_font_bold.tres
  2. BIN
      images/game1/game1_tileset.png
  3. +25
    -2
      scenes/campfire2.tscn
  4. +4
    -0
      scenes/game1.tscn
  5. +7
    -1
      scenes/main_menu.tscn
  6. +1
    -1
      scripts/ControlIndicator.gd
  7. +1
    -0
      scripts/Globals.gd
  8. +17
    -0
      scripts/game1/Game1Script.gd
  9. +5
    -0
      scripts/main_menu.gd
  10. BIN
      sounds/main_title.ogg
  11. +15
    -0
      sounds/main_title.ogg.import

+ 9
- 0
fonts/dialog_default_font_bold.tres View File

@ -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 )

BIN
images/game1/game1_tileset.png View File

Before After
Width: 400  |  Height: 400  |  Size: 15 KiB Width: 400  |  Height: 400  |  Size: 15 KiB

+ 25
- 2
scenes/campfire2.tscn View File

@ -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
}

+ 4
- 0
scenes/game1.tscn View File

@ -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"]


+ 7
- 1
scenes/main_menu.tscn View File

@ -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"]

+ 1
- 1
scripts/ControlIndicator.gd View File

@ -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


+ 1
- 0
scripts/Globals.gd View File

@ -1,3 +1,4 @@
extends Node
var ui_accept_tip = false
var ui_interact_flatfish_tip = false

+ 17
- 0
scripts/game1/Game1Script.gd View File

@ -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")


+ 5
- 0
scripts/main_menu.gd View File

@ -0,0 +1,5 @@
extends Node2D
func _ready():
$MainMusic.play()

BIN
sounds/main_title.ogg View File


+ 15
- 0
sounds/main_title.ogg.import View File

@ -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

Loading…
Cancel
Save