diff --git a/backgounds/abstract.gd b/backgounds/abstract.gd index 3d3e2db..1609c4d 100644 --- a/backgounds/abstract.gd +++ b/backgounds/abstract.gd @@ -14,7 +14,7 @@ func _ready(): func _process(delta): if Time.get_ticks_msec() - Global.wait > Global.timelimit: Global.live = 2 - if (Time.get_ticks_msec() - Global.wait) >= 1000 && (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_B)): + if Global.live == 1 && (Time.get_ticks_msec() - Global.wait) >= 1000 && (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_B)): #print("Mouse Click/Unclick at: ", event.position) _title() if Global.live == 0: @@ -39,7 +39,7 @@ func _crash(): # it happens after already loading the main scene. Global.time = Time.get_ticks_msec() - Global.wait await get_tree().create_timer(1.0).timeout - queue_free() + #queue_free() get_tree().root.remove_child(abstract) get_tree().change_scene_to_file("res://backgounds/supernova.tscn") #get_tree().root.add_child(title) diff --git a/backgounds/galaxy.gd b/backgounds/galaxy.gd index 880f5b4..0f309b3 100644 --- a/backgounds/galaxy.gd +++ b/backgounds/galaxy.gd @@ -14,7 +14,7 @@ func _ready(): func _process(delta): if Time.get_ticks_msec() - Global.wait > Global.timelimit: Global.live = 2 - if (Time.get_ticks_msec() - Global.wait) >= 1000 && (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_B)): + if Global.live == 1 && (Time.get_ticks_msec() - Global.wait) >= 1000 && (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_B)): #print("Mouse Click/Unclick at: ", event.position) _title() if Global.live == 0: @@ -39,7 +39,7 @@ func _crash(): # it happens after already loading the main scene. Global.time = Time.get_ticks_msec() - Global.wait await get_tree().create_timer(1.0).timeout - queue_free() + #queue_free() get_tree().root.remove_child(galaxy) get_tree().change_scene_to_file("res://backgounds/supernova.tscn") #get_tree().root.add_child(title) diff --git a/backgounds/radio.tscn b/backgounds/radio.tscn index 479c26f..4bbab68 100644 --- a/backgounds/radio.tscn +++ b/backgounds/radio.tscn @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://backgounds/radio.gd" id="1_hxbaj"] [ext_resource type="Texture2D" uid="uid://bows52y4q3suo" path="res://sprites/antenna.png" id="2_26tjs"] [ext_resource type="Script" path="res://backgounds/Label3.gd" id="3_765rj"] -[ext_resource type="Script" path="res://fps.gd" id="4_5mydr"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_51td0"] [node name="radio" type="Node2D"] script = ExtResource("1_hxbaj") @@ -39,7 +39,4 @@ offset_right = 198.0 offset_bottom = 616.0 script = ExtResource("3_765rj") -[node name="fps" type="Label" parent="."] -offset_right = 40.0 -offset_bottom = 23.0 -script = ExtResource("4_5mydr") +[node name="Bottomhud" parent="." instance=ExtResource("4_51td0")] diff --git a/backgounds/supernova.tscn b/backgounds/supernova.tscn index 94c4cf7..bef8e3e 100644 --- a/backgounds/supernova.tscn +++ b/backgounds/supernova.tscn @@ -4,7 +4,7 @@ [ext_resource type="Script" path="res://backgounds/supernova.gd" id="1_3jmy0"] [ext_resource type="Script" path="res://backgounds/Label.gd" id="3_24urm"] [ext_resource type="Script" path="res://backgounds/Label3.gd" id="3_h0a4u"] -[ext_resource type="Script" path="res://fps.gd" id="3_tbeol"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="5_knfj0"] [node name="supernova" type="Node2D"] script = ExtResource("1_3jmy0") @@ -39,7 +39,4 @@ offset_right = 198.0 offset_bottom = 616.0 script = ExtResource("3_h0a4u") -[node name="fps" type="Label" parent="."] -offset_right = 40.0 -offset_bottom = 23.0 -script = ExtResource("3_tbeol") +[node name="Bottomhud" parent="." instance=ExtResource("5_knfj0")] diff --git a/backgounds/wormhole.gd b/backgounds/wormhole.gd index 064dc69..b12275a 100644 --- a/backgounds/wormhole.gd +++ b/backgounds/wormhole.gd @@ -14,7 +14,7 @@ func _ready(): func _process(delta): if Time.get_ticks_msec() - Global.wait > Global.timelimit: Global.live = 2 - if (Time.get_ticks_msec() - Global.wait) >= 1000 && (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_B)): + if Global.live == 1 && (Time.get_ticks_msec() - Global.wait) >= 1000 && (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_B)): #print("Mouse Click/Unclick at: ", event.position) _title() if Global.live == 0: @@ -39,7 +39,7 @@ func _crash(): # it happens after already loading the main scene. Global.time = Time.get_ticks_msec() - Global.wait await get_tree().create_timer(1.0).timeout - queue_free() + #queue_free() get_tree().root.remove_child(wormhole) get_tree().change_scene_to_file("res://backgounds/supernova.tscn") #get_tree().root.add_child(title) diff --git a/bootclick.gd b/bootclick.gd index 96b4c40..cab8c1f 100644 --- a/bootclick.gd +++ b/bootclick.gd @@ -9,7 +9,7 @@ const savegame = preload("res://save.gd") func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) - OS.get_data_dir().rsplit("/", true, 7)[2] + #OS.get_data_dir().rsplit("/", true, 7)[2] loadgame.new() print(OS.get_processor_name()) #pass # Replace with function body. diff --git a/bootclick.tscn b/bootclick.tscn index dbae01b..db70a8d 100644 --- a/bootclick.tscn +++ b/bootclick.tscn @@ -1,8 +1,8 @@ -[gd_scene load_steps=4 format=3 uid="uid://cepo18bj0mns4"] +[gd_scene load_steps=4 format=3 uid="uid://dp6xt67ch512j"] [ext_resource type="Script" path="res://bootclick.gd" id="1_52bti"] -[ext_resource type="Script" path="res://fps.gd" id="2_gnh1w"] [ext_resource type="PackedScene" uid="uid://dblfov80ngodu" path="res://selftest.tscn" id="3_jtnh5"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_lnkl4"] [node name="bootclick" type="Control"] layout_mode = 3 @@ -22,15 +22,12 @@ text = "Press enter or a gamepad button to continue" horizontal_alignment = 1 vertical_alignment = 1 -[node name="fps" type="Label" parent="."] -layout_mode = 0 -offset_right = 40.0 -offset_bottom = 23.0 -script = ExtResource("2_gnh1w") - [node name="Selftest" parent="." instance=ExtResource("3_jtnh5")] layout_mode = 0 offset_left = 57.0 offset_top = 112.0 offset_right = 97.0 offset_bottom = 135.0 + +[node name="Bottomhud" parent="." instance=ExtResource("3_lnkl4")] +layout_mode = 1 diff --git a/levels/abstract.tscn b/levels/abstract.tscn index 99666e8..cb97ee7 100644 --- a/levels/abstract.tscn +++ b/levels/abstract.tscn @@ -16,7 +16,7 @@ [ext_resource type="Script" path="res://levels/wall2.gd" id="16_el0w3"] [ext_resource type="Script" path="res://levels/wall3.gd" id="17_pl58r"] [ext_resource type="Script" path="res://levels/wall4.gd" id="18_ptooy"] -[ext_resource type="Script" path="res://fps.gd" id="20_li4sv"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="18_q6ccy"] [ext_resource type="Script" path="res://levels/timelimit.gd" id="21_tw1es"] [sub_resource type="Gradient" id="Gradient_3wb6i"] @@ -154,13 +154,10 @@ scale = Vector2(15.707, 111) texture = SubResource("GradientTexture1D_8jpuy") script = ExtResource("18_ptooy") -[node name="fps" type="Label" parent="."] -offset_right = 40.0 -offset_bottom = 23.0 -script = ExtResource("20_li4sv") - [node name="timelimit" type="Label" parent="."] offset_left = 204.0 offset_right = 244.0 offset_bottom = 23.0 script = ExtResource("21_tw1es") + +[node name="Bottomhud" parent="." instance=ExtResource("18_q6ccy")] diff --git a/levels/ast1.gd b/levels/ast1.gd index ec8fd54..8c6e021 100644 --- a/levels/ast1.gd +++ b/levels/ast1.gd @@ -36,8 +36,8 @@ func _process(delta): Global.ym = 1 velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta ctime = Time.get_ticks_msec() - elif !Global.sk && Global.live == null: - _sk() + #elif !Global.sk && Global.live == null: + # _sk() #if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0: # velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) diff --git a/levels/bottomhud.tscn b/levels/bottomhud.tscn new file mode 100644 index 0000000..ee00465 --- /dev/null +++ b/levels/bottomhud.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=2 format=3 uid="uid://d31udhuuwrajn"] + +[ext_resource type="Script" path="res://fps.gd" id="1_15gcj"] + +[node name="Bottomhud" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="fps" type="Label" parent="."] +offset_left = 5.0 +offset_top = 697.0 +offset_right = 45.0 +offset_bottom = 720.0 +script = ExtResource("1_15gcj") + +[node name="Label" type="Label" parent="."] +layout_mode = 0 +offset_left = 1191.0 +offset_top = 691.0 +offset_right = 1271.0 +offset_bottom = 714.0 +text = "R0.1.2-beta" diff --git a/levels/credits.gd b/levels/credits.gd index 8538e85..b0ee948 100644 --- a/levels/credits.gd +++ b/levels/credits.gd @@ -37,7 +37,7 @@ func _process(delta): bgsound.play(0) else: _complete() - elif bgsound.has_stream_playback(): + elif bgsound.get_playback_position() > 10: playstart = true #pass @@ -51,6 +51,6 @@ func _complete(): func _input(event): # Mouse in viewport coordinates. - if event is InputEventMouseButton || Input.is_joy_button_pressed(0,JOY_BUTTON_A) || Input.is_key_pressed(KEY_ENTER): + if bgsound.get_playback_position() > 1 && event is InputEventMouseButton || Input.is_joy_button_pressed(0,JOY_BUTTON_A) || Input.is_key_pressed(KEY_ENTER): #print("Mouse Click/Unclick at: ", event.position) _complete() diff --git a/levels/credits.tscn b/levels/credits.tscn index 483068f..c991b98 100644 --- a/levels/credits.tscn +++ b/levels/credits.tscn @@ -6,7 +6,7 @@ [ext_resource type="Texture2D" uid="uid://cpd31c6o18rmh" path="res://sprites/ss.png" id="4_pmxuj"] [ext_resource type="Script" path="res://player.gd" id="5_c2k4x"] [ext_resource type="Script" path="res://levels/roll.gd" id="6_3q8sp"] -[ext_resource type="Script" path="res://fps.gd" id="7_jok2t"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="7_7k1wd"] [node name="credits" type="Node2D"] script = ExtResource("1_y6orl") @@ -464,9 +464,6 @@ Special Thanks for Unity Technologies for make me choosing Godot Godot does what Unitydnt -I'm looking for developers, artists and japanese voice actors who want to help on my next videogame -from Asgardius Virtualx series and the next Genshin Killer: Midori in The Magic School - Contact info Email @@ -481,13 +478,12 @@ Matrix Chat You are free to distribute this game and make modifications, but remember sharing your modifications with source code -You are free to create guides, but i suggest avoiding cheat codes" +You are free to create guides, but i suggest avoiding cheat codes + +You can reuse assets for non-commercial purposes only" horizontal_alignment = 1 script = ExtResource("6_3q8sp") -[node name="fps" type="Label" parent="."] -offset_right = 40.0 -offset_bottom = 23.0 -script = ExtResource("7_jok2t") +[node name="Bottomhud" parent="." instance=ExtResource("7_7k1wd")] [connection signal="finished" from="nebula" to="nebula" method="_on_finished"] diff --git a/levels/galaxy.tscn b/levels/galaxy.tscn index ed97610..b246798 100644 --- a/levels/galaxy.tscn +++ b/levels/galaxy.tscn @@ -19,7 +19,7 @@ [ext_resource type="Script" path="res://levels/wall2.gd" id="16_dnhp8"] [ext_resource type="Script" path="res://levels/wall3.gd" id="17_jrw7x"] [ext_resource type="Script" path="res://levels/wall4.gd" id="18_fasi1"] -[ext_resource type="Script" path="res://fps.gd" id="20_wbfof"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="21_0dqfd"] [ext_resource type="Script" path="res://levels/timelimit.gd" id="21_4jblw"] [sub_resource type="Gradient" id="Gradient_raqpb"] @@ -175,13 +175,10 @@ scale = Vector2(15.707, 111) texture = SubResource("GradientTexture1D_4c28c") script = ExtResource("18_fasi1") -[node name="fps" type="Label" parent="."] -offset_right = 40.0 -offset_bottom = 23.0 -script = ExtResource("20_wbfof") - [node name="timelimit" type="Label" parent="."] offset_left = 204.0 offset_right = 244.0 offset_bottom = 23.0 script = ExtResource("21_4jblw") + +[node name="Bottomhud" parent="." instance=ExtResource("21_0dqfd")] diff --git a/levels/timelimit.gd b/levels/timelimit.gd index b4178c4..6c888ba 100644 --- a/levels/timelimit.gd +++ b/levels/timelimit.gd @@ -1,7 +1,7 @@ extends Label func _process(delta: float) -> void: - if Global.wait != null: + if Global.wait != null && Global.live == 1: if (Global.timelimit - (Time.get_ticks_msec() - Global.wait)) > 0: set_text("Time: " + str((Global.timelimit - (Time.get_ticks_msec() - Global.wait))/1000)); else: diff --git a/levels/wormhole.tscn b/levels/wormhole.tscn index c85df4e..8a704f7 100644 --- a/levels/wormhole.tscn +++ b/levels/wormhole.tscn @@ -19,7 +19,7 @@ [ext_resource type="Script" path="res://levels/wall2.gd" id="16_el0w3"] [ext_resource type="Script" path="res://levels/wall3.gd" id="17_pl58r"] [ext_resource type="Script" path="res://levels/wall4.gd" id="18_ptooy"] -[ext_resource type="Script" path="res://fps.gd" id="20_li4sv"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="21_4jdrh"] [ext_resource type="Script" path="res://levels/timelimit.gd" id="21_tw1es"] [sub_resource type="Gradient" id="Gradient_3wb6i"] @@ -175,13 +175,10 @@ scale = Vector2(15.707, 111) texture = SubResource("GradientTexture1D_8jpuy") script = ExtResource("18_ptooy") -[node name="fps" type="Label" parent="."] -offset_right = 40.0 -offset_bottom = 23.0 -script = ExtResource("20_li4sv") - [node name="timelimit" type="Label" parent="."] offset_left = 204.0 offset_right = 244.0 offset_bottom = 23.0 script = ExtResource("21_tw1es") + +[node name="Bottomhud" parent="." instance=ExtResource("21_4jdrh")] diff --git a/sfx/title.wav.import b/sfx/title.wav.import new file mode 100644 index 0000000..f6d2e82 --- /dev/null +++ b/sfx/title.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://c0bfrdoajy2if" +path="res://.godot/imported/title.wav-50daaedcfc0f868fd49d8ccc454658d8.sample" + +[deps] + +source_file="res://sfx/title.wav" +dest_files=["res://.godot/imported/title.wav-50daaedcfc0f868fd49d8ccc454658d8.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/title.gd b/title.gd index 4192ed6..100ce67 100644 --- a/title.gd +++ b/title.gd @@ -3,6 +3,7 @@ extends Control # Called when the node enters the scene tree for the first time. var bgsound := AudioStreamPlayer.new() +var frank := AudioStreamPlayer.new() var wait #var galaxy = preload("res://backgounds/galaxy.tscn").instantiate() #var wormhole = preload("res://backgounds/wormhole.tscn").instantiate() @@ -13,9 +14,13 @@ func _ready(): Global.sk = true Global.gamelevel = null add_child(bgsound) + add_child(frank) var titlemusic = load("res://music/x-force.wav") + var r3jingle = load("res://sfx/title.wav") bgsound.stream = titlemusic bgsound.play(0) + frank.stream = r3jingle + frank.play(0) wait = Time.get_ticks_msec() #pass # Replace with function body. diff --git a/title.tscn b/title.tscn index 8c25fc9..43b5db7 100644 --- a/title.tscn +++ b/title.tscn @@ -4,11 +4,11 @@ [ext_resource type="Script" path="res://Game name.gd" id="2_bbb0f"] [ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_dxhuu"] [ext_resource type="Script" path="res://nebula.gd" id="3_bn1r3"] -[ext_resource type="Script" path="res://fps.gd" id="3_tsoef"] [ext_resource type="Script" path="res://start.gd" id="4_cc41w"] [ext_resource type="Script" path="res://exit.gd" id="5_scoec"] [ext_resource type="Texture2D" uid="uid://cpd31c6o18rmh" path="res://sprites/ss.png" id="8_tne35"] [ext_resource type="Script" path="res://player.gd" id="9_7e625"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="9_xo53u"] [node name="title" type="Control"] layout_mode = 3 @@ -34,12 +34,6 @@ scale = Vector2(0.3, 0.3) texture = ExtResource("8_tne35") script = ExtResource("9_7e625") -[node name="fps" type="Label" parent="."] -layout_mode = 0 -offset_right = 40.0 -offset_bottom = 23.0 -script = ExtResource("3_tsoef") - [node name="Game name" type="Label" parent="."] layout_mode = 0 offset_left = 108.0 @@ -72,11 +66,14 @@ script = ExtResource("5_scoec") [node name="Label" type="Label" parent="."] layout_mode = 0 -offset_left = 36.0 -offset_top = 653.0 -offset_right = 76.0 -offset_bottom = 676.0 -text = "R0.1.1-dev 2020-2023 Page Asgardius GNU General Public License 3 -2016-2023 Asgardius Virtualx Project" +offset_left = 378.0 +offset_top = 656.0 +offset_right = 809.0 +offset_bottom = 705.0 +text = "2020-2024 Page Asgardius GNU General Public License 3 +2016-2024 Asgardius Virtualx Project" + +[node name="Bottomhud" parent="." instance=ExtResource("9_xo53u")] +layout_mode = 1 [connection signal="finished" from="nebula" to="nebula" method="_on_finished"]