debug mode

This commit is contained in:
Page Asgardius 2024-01-16 05:58:17 -07:00
parent ea38104ce0
commit 82558ea616
31 changed files with 737 additions and 295 deletions

View file

@ -1,6 +1,6 @@
extends Label extends Label
var housefreedom var housefreedom
func _process(delta: float) -> void: func _ready():
housefreedom = OS.get_processor_name().contains("AMD Custom APU") && OS.get_processor_name().contains("0405") housefreedom = OS.get_processor_name().contains("AMD Custom APU") && OS.get_processor_name().contains("0405")
if (OS.get_name() != "Linux" && !OS.get_name().ends_with("BSD")) || OS.get_distribution_name().contains("Kali") || !OS.get_data_dir().begins_with("/home") || OS.get_environment("WSL_DISTRO_NAME").length() < 0: if (OS.get_name() != "Linux" && !OS.get_name().ends_with("BSD")) || OS.get_distribution_name().contains("Kali") || !OS.get_data_dir().begins_with("/home") || OS.get_environment("WSL_DISTRO_NAME").length() < 0:
Global.sk = true Global.sk = true

View file

@ -6,7 +6,7 @@ var wait
func _ready(): func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
add_child(rmusic) add_child(rmusic)
var titlemusic = load("res://music/Jellies.wav") var titlemusic = load(Global.musictracks[1])
rmusic.stream = titlemusic rmusic.stream = titlemusic
rmusic.play(0) rmusic.play(0)
wait = Time.get_ticks_msec() wait = Time.get_ticks_msec()
@ -19,13 +19,16 @@ func _process(delta):
func _input(event): func _input(event):
# Mouse in viewport coordinates. # Mouse in viewport coordinates.
if (Time.get_ticks_msec() - wait) >= 1000 && (event is InputEventMouseButton || Input.is_joy_button_pressed(0,JOY_BUTTON_B) || Input.is_key_pressed(KEY_X) || Input.is_key_pressed(KEY_ENTER)): if Input.is_action_just_pressed("ui_accept"):
#print("Mouse Click/Unclick at: ", event.position) #print("Mouse Click/Unclick at: ", event.position)
_title() _title()
func _title(): func _title():
# This is like autoloading the scene, only # This is like autoloading the scene, only
# it happens after already loading the main scene. # it happens after already loading the main scene.
if Global.debug:
get_tree().change_scene_to_file("res://levels/scene.tscn")
else:
get_tree().change_scene_to_file("res://levels/credits.tscn") get_tree().change_scene_to_file("res://levels/credits.tscn")
#get_tree().root.add_child(title) #get_tree().root.add_child(title)
#get_tree().root.remove_child(boot) #get_tree().root.remove_child(boot)

View file

@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://backgounds/disclaimer.gd" id="1_wnnd2"] [ext_resource type="Script" path="res://backgounds/disclaimer.gd" id="1_wnnd2"]
[ext_resource type="Texture2D" uid="uid://becayb0ro0bd4" path="res://backgounds/midoriasgardius.jpg" id="2_gghyy"] [ext_resource type="Texture2D" uid="uid://becayb0ro0bd4" path="res://backgounds/midoriasgardius.jpg" id="2_gghyy"]
[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="3_sdx6y"] [ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_sdx6y"]
[node name="Disclaimer" type="Node2D"] [node name="Disclaimer" type="Node2D"]
script = ExtResource("1_wnnd2") script = ExtResource("1_wnnd2")

View file

@ -6,7 +6,7 @@ var wait
func _ready(): func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
add_child(rmusic) add_child(rmusic)
var titlemusic = load("res://music/XsEdzesSs.wav") var titlemusic = load(Global.musictracks[7])
rmusic.stream = titlemusic rmusic.stream = titlemusic
rmusic.play(0) rmusic.play(0)
wait = Time.get_ticks_msec() wait = Time.get_ticks_msec()
@ -19,13 +19,16 @@ func _process(delta):
func _input(event): func _input(event):
# Mouse in viewport coordinates. # Mouse in viewport coordinates.
if (Time.get_ticks_msec() - wait) >= 1000 && (event is InputEventMouseButton || Input.is_joy_button_pressed(0,JOY_BUTTON_B) || Input.is_key_pressed(KEY_X) || Input.is_key_pressed(KEY_ENTER)): if Input.is_action_just_pressed("ui_accept"):
#print("Mouse Click/Unclick at: ", event.position) #print("Mouse Click/Unclick at: ", event.position)
_title() _title()
func _title(): func _title():
# This is like autoloading the scene, only # This is like autoloading the scene, only
# it happens after already loading the main scene. # it happens after already loading the main scene.
if Global.debug:
get_tree().change_scene_to_file("res://levels/scene.tscn")
else:
get_tree().change_scene_to_file("res://backgounds/wip.tscn") get_tree().change_scene_to_file("res://backgounds/wip.tscn")
#get_tree().root.add_child(title) #get_tree().root.add_child(title)
#get_tree().root.remove_child(boot) #get_tree().root.remove_child(boot)

View file

@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://backgounds/result.gd" id="1_ejbiw"] [ext_resource type="Script" path="res://backgounds/result.gd" id="1_ejbiw"]
[ext_resource type="Texture2D" uid="uid://becayb0ro0bd4" path="res://backgounds/midoriasgardius.jpg" id="2_gghyy"] [ext_resource type="Texture2D" uid="uid://becayb0ro0bd4" path="res://backgounds/midoriasgardius.jpg" id="2_gghyy"]
[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="3_sdx6y"] [ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_sdx6y"]
[node name="Result" type="Node2D"] [node name="Result" type="Node2D"]
script = ExtResource("1_ejbiw") script = ExtResource("1_ejbiw")

View file

@ -6,7 +6,7 @@ var wait
func _ready(): func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
add_child(rmusic) add_child(rmusic)
var titlemusic = load("res://music/Jellies.wav") var titlemusic = load(Global.musictracks[1])
rmusic.stream = titlemusic rmusic.stream = titlemusic
rmusic.play(0) rmusic.play(0)
wait = Time.get_ticks_msec() wait = Time.get_ticks_msec()
@ -19,13 +19,16 @@ func _process(delta):
func _input(event): func _input(event):
# Mouse in viewport coordinates. # Mouse in viewport coordinates.
if (Time.get_ticks_msec() - wait) >= 1000 && (event is InputEventMouseButton || Input.is_joy_button_pressed(0,JOY_BUTTON_B) || Input.is_key_pressed(KEY_X) || Input.is_key_pressed(KEY_ENTER)): if Input.is_action_just_pressed("ui_accept"):
#print("Mouse Click/Unclick at: ", event.position) #print("Mouse Click/Unclick at: ", event.position)
_title() _title()
func _title(): func _title():
# This is like autoloading the scene, only # This is like autoloading the scene, only
# it happens after already loading the main scene. # it happens after already loading the main scene.
if Global.debug:
get_tree().change_scene_to_file("res://levels/scene.tscn")
else:
get_tree().change_scene_to_file("res://title.tscn") get_tree().change_scene_to_file("res://title.tscn")
#get_tree().root.add_child(title) #get_tree().root.add_child(title)
#get_tree().root.remove_child(boot) #get_tree().root.remove_child(boot)

View file

@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://backgounds/wip.gd" id="1_1qonj"] [ext_resource type="Script" path="res://backgounds/wip.gd" id="1_1qonj"]
[ext_resource type="Texture2D" uid="uid://becayb0ro0bd4" path="res://backgounds/midoriasgardius.jpg" id="2_gghyy"] [ext_resource type="Texture2D" uid="uid://becayb0ro0bd4" path="res://backgounds/midoriasgardius.jpg" id="2_gghyy"]
[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="3_sdx6y"] [ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_sdx6y"]
[node name="WIP" type="Node2D"] [node name="WIP" type="Node2D"]
script = ExtResource("1_1qonj") script = ExtResource("1_1qonj")

View file

@ -1,33 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://yumpp02h7ma2"]
[ext_resource type="Script" path="res://bootclick.gd" id="1_52bti"]
[ext_resource type="PackedScene" path="res://selftest.tscn" id="3_jtnh5"]
[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="3_wfymi"]
[node name="bootclick" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("1_52bti")
[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_left = 290.0
offset_top = 258.0
offset_right = 949.0
offset_bottom = 326.0
theme_override_font_sizes/font_size = 49
text = "Press enter or B to continue"
horizontal_alignment = 1
vertical_alignment = 1
[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_wfymi")]
layout_mode = 1

View file

@ -10,6 +10,10 @@ var hiscoresfile = "user://hiscores.save"
var gamelevel var gamelevel
var levelmax var levelmax
var firstrun var firstrun
var musictracks = ["res://music/reloaded.wav", "res://music/Jellies.wav", "res://music/getabrain.wav", "res://music/oskars.wav", "res://music/extralife.wav", "res://music/layers.wav", "res://music/caramel.wav", "res://music/XsEdzesSs.wav", "res://music/shakeshark.wav", "res://music/zubmarine.wav", "res://music/crammin.wav", "res://music/func.wav", "res://music/kaveh.wav", "res://music/rock.wav", "res://music/milkyway.wav", "res://music/sweetener.wav", "res://music/tooold.wav", "res://music/portello.wav"]
var sfxtracks = []
var debug = false
var release = "R0.0.0-dev"
var sk = false var sk = false
var xm = 0 var xm = 0
var ym = 0 var ym = 0

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 715 KiB

After

Width:  |  Height:  |  Size: 361 KiB

7
levels/Version.gd Normal file
View file

@ -0,0 +1,7 @@
extends Label
func _process(delta):
if Global.debug:
set_text("Debug Mode")
else:
set_text(Global.release)

View file

@ -1,6 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://wovn8m050haq"] [gd_scene load_steps=3 format=3 uid="uid://d31udhuuwrajn"]
[ext_resource type="Script" path="res://fps.gd" id="1_15gcj"] [ext_resource type="Script" path="res://fps.gd" id="1_15gcj"]
[ext_resource type="Script" path="res://levels/Version.gd" id="2_qx4dy"]
[node name="Bottomhud" type="Control"] [node name="Bottomhud" type="Control"]
layout_mode = 3 layout_mode = 3
@ -18,10 +19,10 @@ offset_right = 45.0
offset_bottom = 720.0 offset_bottom = 720.0
script = ExtResource("1_15gcj") script = ExtResource("1_15gcj")
[node name="Label" type="Label" parent="."] [node name="Version" type="Label" parent="."]
layout_mode = 0 layout_mode = 0
offset_left = 1191.0 offset_left = 1166.0
offset_top = 691.0 offset_top = 691.0
offset_right = 1271.0 offset_right = 1246.0
offset_bottom = 714.0 offset_bottom = 714.0
text = "R0.0.0-dev" script = ExtResource("2_qx4dy")

View file

@ -3,9 +3,9 @@ extends Node2D
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
var bgsound := AudioStreamPlayer.new() var bgsound := AudioStreamPlayer.new()
var song1 = load("res://music/sweetener.wav") var song1 = load(Global.musictracks[15])
var song2 = load("res://music/tooold.wav") var song2 = load(Global.musictracks[16])
var song3 = load("res://music/portello.wav") var song3 = load(Global.musictracks[17])
var playstart = false var playstart = false
var playindex = 0 var playindex = 0
@ -44,6 +44,9 @@ func _process(delta):
func _complete(): func _complete():
# This is like autoloading the scene, only # This is like autoloading the scene, only
# it happens after already loading the main scene. # it happens after already loading the main scene.
if Global.debug:
get_tree().change_scene_to_file("res://levels/scene.tscn")
else:
get_tree().change_scene_to_file("res://backgounds/result.tscn") get_tree().change_scene_to_file("res://backgounds/result.tscn")
#get_tree().root.add_child(title) #get_tree().root.add_child(title)
#get_tree().root.remove_child(boot) #get_tree().root.remove_child(boot)
@ -51,6 +54,6 @@ func _complete():
func _input(event): func _input(event):
# Mouse in viewport coordinates. # Mouse in viewport coordinates.
if bgsound.get_playback_position() > 1 && event is InputEventMouseButton || Input.is_joy_button_pressed(0,JOY_BUTTON_B) || Input.is_key_pressed(KEY_X) || Input.is_key_pressed(KEY_ENTER): if Input.is_action_just_pressed("ui_accept"):
#print("Mouse Click/Unclick at: ", event.position) #print("Mouse Click/Unclick at: ", event.position)
_complete() _complete()

View file

@ -3,7 +3,7 @@
[ext_resource type="Script" path="res://levels/credits.gd" id="1_y6orl"] [ext_resource type="Script" path="res://levels/credits.gd" id="1_y6orl"]
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_0cref"] [ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_0cref"]
[ext_resource type="Script" path="res://nebula.gd" id="3_ffw0g"] [ext_resource type="Script" path="res://nebula.gd" id="3_ffw0g"]
[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="5_yvope"] [ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="5_yvope"]
[ext_resource type="Script" path="res://levels/roll.gd" id="6_3q8sp"] [ext_resource type="Script" path="res://levels/roll.gd" id="6_3q8sp"]
[node name="credits" type="Node2D"] [node name="credits" type="Node2D"]
@ -447,6 +447,9 @@ For let me know that fireworks can make a fun game
SNK SNK
For let me know that a Heavy Machine Gun can be turned into a good stage boss For let me know that a Heavy Machine Gun can be turned into a good stage boss
OMOCAT
For let me know that sketch graphics can give good results
Contact info Contact info
Email Email

View file

@ -1,6 +1,7 @@
extends Control extends Control
func _ready(): func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
Global.debug = true
$"VBoxContainer/Scene Selector".grab_focus() $"VBoxContainer/Scene Selector".grab_focus()
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
@ -25,7 +26,7 @@ func _level():
func _input(event): func _input(event):
# Mouse in viewport coordinates. # Mouse in viewport coordinates.
if Input.is_action_pressed("ui_cancel"): if Input.is_action_just_pressed("ui_cancel"):
_on_back_pressed() _on_back_pressed()
#print("Mouse Click/Unclick at: ", event.position) #print("Mouse Click/Unclick at: ", event.position)
# if highlighted == 1: # if highlighted == 1:
@ -48,4 +49,5 @@ func _on_sound_test_pressed():
func _on_back_pressed(): func _on_back_pressed():
Global.debug = false
get_tree().change_scene_to_file("res://levels/tmenu.tscn") get_tree().change_scene_to_file("res://levels/tmenu.tscn")

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=7 format=3 uid="uid://brrta1s63r2q2"] [gd_scene load_steps=8 format=3 uid="uid://brrta1s63r2q2"]
[ext_resource type="Script" path="res://levels/debug.gd" id="1_gm5qw"] [ext_resource type="Script" path="res://levels/debug.gd" id="1_gm5qw"]
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_l51wy"] [ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_l51wy"]
[ext_resource type="Script" path="res://nebula.gd" id="3_0jyxj"] [ext_resource type="Script" path="res://nebula.gd" id="3_0jyxj"]
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_ogmre"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_821nm"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_821nm"]
bg_color = Color(0, 0.8, 0, 1) bg_color = Color(0, 0.8, 0, 1)
@ -71,6 +72,9 @@ theme_override_font_sizes/font_size = 80
theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn") theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn")
text = "Back" text = "Back"
[node name="Bottomhud" parent="." instance=ExtResource("4_ogmre")]
layout_mode = 1
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"] [connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
[connection signal="pressed" from="VBoxContainer/Scene Selector" to="." method="_on_scene_selector_pressed"] [connection signal="pressed" from="VBoxContainer/Scene Selector" to="." method="_on_scene_selector_pressed"]
[connection signal="pressed" from="VBoxContainer/Sound Test" to="." method="_on_sound_test_pressed"] [connection signal="pressed" from="VBoxContainer/Sound Test" to="." method="_on_sound_test_pressed"]

142
levels/musictest.gd Normal file
View file

@ -0,0 +1,142 @@
extends Control
var player := AudioStreamPlayer.new()
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
add_child(player)
$"BoxContainer/VBoxContainer/Title Screen".grab_focus()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _level():
# This is like autoloading the scene, only
# it happens after already loading the main scene.
get_tree().change_scene_to_file("res://backgounds/disclaimer.tscn")
#Global.live = 1
#Global.gamelevel = randi() % 3
#if Global.gamelevel == 0:
# get_tree().change_scene_to_file("res://backgounds/galaxy.tscn")
#elif Global.gamelevel == 1:
# get_tree().change_scene_to_file("res://backgounds/wormhole.tscn")
#else:
# get_tree().change_scene_to_file("res://backgounds/abstract.tscn")
#get_tree().root.add_child(title)
#get_tree().root.remove_child(boot)
#boot.queue_free()
func _input(event):
# Mouse in viewport coordinates.
if Input.is_action_just_pressed("ui_cancel"):
_on_back_pressed()
if Input.is_key_pressed(KEY_X) || Input.is_joy_button_pressed(0,JOY_BUTTON_X):
player.stop()
#print("Mouse Click/Unclick at: ", event.position)
# if highlighted == 1:
# _on_debug_pressed()
# if highlighted == 2:
# _on_exit_pressed()
# else:
# _on_start_pressed()
# elif Input.is_action_pressed("ui_up"):
# focus_next
func _on_back_pressed():
get_tree().change_scene_to_file("res://levels/soundtest.tscn")
func _on_title_screen_pressed():
player.stream = load(Global.musictracks[0])
player.play(0)
func _on_disclaimer_settings_stores_pressed():
player.stream = load(Global.musictracks[1])
player.play(0)
func _on_testrooms_pressed():
player.stream = load(Global.musictracks[2])
player.play(0)
func _on_friendly_challenge_pressed():
player.stream = load(Global.musictracks[3])
player.play(0)
func _on_school_nursery_pressed():
player.stream = load(Global.musictracks[4])
player.play(0)
func _on_overworld_ceres_pressed():
player.stream = load(Global.musictracks[5])
player.play(0)
func _on_boss_fight_ceres_pressed():
player.stream = load(Global.musictracks[6])
player.play(0)
func _on_result_pressed():
player.stream = load(Global.musictracks[7])
player.play(0)
func _on_overworld_earth_pressed():
player.stream = load(Global.musictracks[8])
player.play(0)
func _on_the_zubmarine_zone_pressed():
player.stream = load(Global.musictracks[9])
player.play(0)
func _on_radioactive_desert_pressed():
player.stream = load(Global.musictracks[10])
player.play(0)
func _on_boss_fight_earth_pressed():
player.stream = load(Global.musictracks[11])
player.play(0)
func _on_dungeon_of_destruction_pressed():
player.stream = load(Global.musictracks[12])
player.play(0)
func _on_final_boss_fight_pressed():
player.stream = load(Global.musictracks[13])
player.play(0)
func _on_ending_theme_pressed():
player.stream = load(Global.musictracks[14])
player.play(0)
func _on_credits_1_pressed():
player.stream = load(Global.musictracks[15])
player.play(0)
func _on_credits_2_pressed():
player.stream = load(Global.musictracks[16])
player.play(0)
func _on_credits_3_pressed():
player.stream = load(Global.musictracks[17])
player.play(0)

212
levels/musictest.tscn Normal file
View file

@ -0,0 +1,212 @@
[gd_scene load_steps=8 format=3 uid="uid://v2cnmd1atfw1"]
[ext_resource type="Script" path="res://levels/musictest.gd" id="1_mulrj"]
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_hc5pw"]
[ext_resource type="Script" path="res://nebula.gd" id="3_4oqoj"]
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_a1ux8"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cprm3"]
bg_color = Color(0, 0.8, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_alctd"]
bg_color = Color(0, 0.8, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0dqsq"]
bg_color = Color(0, 0.8, 0, 1)
[node name="Musictest" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_mulrj")
[node name="nebula" type="VideoStreamPlayer" parent="."]
layout_mode = 0
offset_right = 640.0
offset_bottom = 368.0
scale = Vector2(2, 1.96)
stream = ExtResource("2_hc5pw")
autoplay = true
script = ExtResource("3_4oqoj")
[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 23.0
[node name="Game name" type="Label" parent="."]
layout_mode = 0
offset_left = 496.0
offset_top = 3.0
offset_right = 790.0
offset_bottom = 73.0
theme_override_font_sizes/font_size = 40
text = "Music Test"
[node name="Stop" type="Label" parent="."]
layout_mode = 0
offset_left = 5.0
offset_top = 672.0
offset_right = 444.0
offset_bottom = 708.0
theme_override_font_sizes/font_size = 22
text = "Press X to stop playback"
[node name="BoxContainer" type="BoxContainer" parent="."]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -640.0
offset_top = -419.0
grow_horizontal = 0
grow_vertical = 0
[node name="VBoxContainer" type="VBoxContainer" parent="BoxContainer"]
layout_mode = 2
[node name="Title Screen" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3")
text = "Title Screen: X-Force Theme"
[node name="Disclaimer, Settings, Stores" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3")
text = "Disclaimer, Settings, Stores"
[node name="Testrooms" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Testrooms"
[node name="Friendly challenge" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Friendly challenge"
[node name="School nursery" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "School nursery"
[node name="Overworld (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Overworld (Ceres)"
[node name="Boss fight (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Boss fight (Ceres)"
[node name="Result" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Result Screen"
[node name="Overworld (Earth)" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Overworld (Earth)"
[node name="VBoxContainer2" type="VBoxContainer" parent="BoxContainer"]
layout_mode = 2
[node name="The Zubmarine Zone" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "The Zubmarine Zone"
[node name="Radioactive Desert" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Radioactive Desert"
[node name="Boss Fight (Earth)" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Boss Fight (Earth)"
[node name="Dungeon of Destruction" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Dungeon of Destruction"
[node name="Final Boss Fight" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Final Boss Fight"
[node name="Ending Theme" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Ending Theme"
[node name="Credits 1" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Credits 1"
[node name="Credits 2" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Credits 2"
[node name="Credits 3" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Credits 3"
[node name="Back" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_0dqsq")
text = "Back"
[node name="Bottomhud" parent="." instance=ExtResource("4_a1ux8")]
layout_mode = 1
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Title Screen" to="." method="_on_title_screen_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Disclaimer, Settings, Stores" to="." method="_on_disclaimer_settings_stores_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Testrooms" to="." method="_on_testrooms_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Friendly challenge" to="." method="_on_friendly_challenge_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/School nursery" to="." method="_on_school_nursery_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Overworld (Ceres)" to="." method="_on_overworld_ceres_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Boss fight (Ceres)" to="." method="_on_boss_fight_ceres_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Result" to="." method="_on_result_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Overworld (Earth)" to="." method="_on_overworld_earth_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/The Zubmarine Zone" to="." method="_on_the_zubmarine_zone_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Radioactive Desert" to="." method="_on_radioactive_desert_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Boss Fight (Earth)" to="." method="_on_boss_fight_earth_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Dungeon of Destruction" to="." method="_on_dungeon_of_destruction_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Final Boss Fight" to="." method="_on_final_boss_fight_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Ending Theme" to="." method="_on_ending_theme_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 1" to="." method="_on_credits_1_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 2" to="." method="_on_credits_2_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 3" to="." method="_on_credits_3_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Back" to="." method="_on_back_pressed"]

View file

@ -1,6 +1,6 @@
extends Control extends Control
func _ready(): func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
$"VBoxContainer/Disclaimer".grab_focus() $"VBoxContainer/Disclaimer".grab_focus()
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
@ -25,7 +25,7 @@ func _level():
func _input(event): func _input(event):
# Mouse in viewport coordinates. # Mouse in viewport coordinates.
if Input.is_action_pressed("ui_cancel"): if Input.is_action_just_pressed("ui_cancel"):
_on_back_pressed() _on_back_pressed()
#print("Mouse Click/Unclick at: ", event.position) #print("Mouse Click/Unclick at: ", event.position)
# if highlighted == 1: # if highlighted == 1:

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=6 format=3 uid="uid://duyxejhnys1l4"] [gd_scene load_steps=7 format=3 uid="uid://duyxejhnys1l4"]
[ext_resource type="Script" path="res://levels/scene.gd" id="1_hxcrn"] [ext_resource type="Script" path="res://levels/scene.gd" id="1_hxcrn"]
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_nvftm"] [ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_nvftm"]
[ext_resource type="Script" path="res://nebula.gd" id="3_6sds4"] [ext_resource type="Script" path="res://nebula.gd" id="3_6sds4"]
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_2y7h7"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6u0xs"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6u0xs"]
bg_color = Color(0, 0.8, 0, 1) bg_color = Color(0, 0.8, 0, 1)
@ -80,6 +81,9 @@ theme_override_font_sizes/font_size = 32
theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn") theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn")
text = "Back" text = "Back"
[node name="Bottomhud" parent="." instance=ExtResource("4_2y7h7")]
layout_mode = 1
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"] [connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
[connection signal="pressed" from="VBoxContainer/Disclaimer" to="." method="_on_disclaimer_pressed"] [connection signal="pressed" from="VBoxContainer/Disclaimer" to="." method="_on_disclaimer_pressed"]
[connection signal="pressed" from="VBoxContainer/Results" to="." method="_on_results_pressed"] [connection signal="pressed" from="VBoxContainer/Results" to="." method="_on_results_pressed"]

52
levels/sfxtest.gd Normal file
View file

@ -0,0 +1,52 @@
extends Control
var player := AudioStreamPlayer.new()
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
add_child(player)
$"BoxContainer/VBoxContainer/Title Screen".grab_focus()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _level():
# This is like autoloading the scene, only
# it happens after already loading the main scene.
get_tree().change_scene_to_file("res://backgounds/disclaimer.tscn")
#Global.live = 1
#Global.gamelevel = randi() % 3
#if Global.gamelevel == 0:
# get_tree().change_scene_to_file("res://backgounds/galaxy.tscn")
#elif Global.gamelevel == 1:
# get_tree().change_scene_to_file("res://backgounds/wormhole.tscn")
#else:
# get_tree().change_scene_to_file("res://backgounds/abstract.tscn")
#get_tree().root.add_child(title)
#get_tree().root.remove_child(boot)
#boot.queue_free()
func _input(event):
# Mouse in viewport coordinates.
if Input.is_action_just_pressed("ui_cancel"):
_on_back_pressed()
if Input.is_key_pressed(KEY_X) || Input.is_joy_button_pressed(0,JOY_BUTTON_X):
player.stop()
#print("Mouse Click/Unclick at: ", event.position)
# if highlighted == 1:
# _on_debug_pressed()
# if highlighted == 2:
# _on_exit_pressed()
# else:
# _on_start_pressed()
# elif Input.is_action_pressed("ui_up"):
# focus_next
func _on_back_pressed():
get_tree().change_scene_to_file("res://levels/soundtest.tscn")

182
levels/sfxtest.tscn Normal file
View file

@ -0,0 +1,182 @@
[gd_scene load_steps=8 format=3 uid="uid://cv2a37xetkkse"]
[ext_resource type="Script" path="res://levels/sfxtest.gd" id="1_l1lbb"]
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_c55jp"]
[ext_resource type="Script" path="res://nebula.gd" id="3_yeu3h"]
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_xxv3m"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cprm3"]
bg_color = Color(0, 0.8, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_alctd"]
bg_color = Color(0, 0.8, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0dqsq"]
bg_color = Color(0, 0.8, 0, 1)
[node name="Sfxtest" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_l1lbb")
[node name="nebula" type="VideoStreamPlayer" parent="."]
layout_mode = 0
offset_right = 640.0
offset_bottom = 368.0
scale = Vector2(2, 1.96)
stream = ExtResource("2_c55jp")
autoplay = true
script = ExtResource("3_yeu3h")
[node name="Game name" type="Label" parent="."]
layout_mode = 0
offset_left = 496.0
offset_top = 3.0
offset_right = 790.0
offset_bottom = 73.0
theme_override_font_sizes/font_size = 40
text = "Sound Effect Test"
[node name="Stop" type="Label" parent="."]
layout_mode = 0
offset_left = 5.0
offset_top = 672.0
offset_right = 444.0
offset_bottom = 708.0
theme_override_font_sizes/font_size = 22
text = "Press X to stop playback"
[node name="BoxContainer" type="BoxContainer" parent="."]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -640.0
offset_top = -419.0
grow_horizontal = 0
grow_vertical = 0
[node name="VBoxContainer" type="VBoxContainer" parent="BoxContainer"]
layout_mode = 2
[node name="Title Screen" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3")
text = "Title Screen"
[node name="Disclaimer, Settings, Stores" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3")
text = "Disclaimer, Settings, Stores"
[node name="Testrooms" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Testrooms"
[node name="Friendly challenge" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Friendly challenge"
[node name="School nursery" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "School nursery"
[node name="Overworld (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Overworld (Ceres)"
[node name="Boss fight (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Boss fight (Ceres)"
[node name="Overworld (Earth)" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Overworld (Earth)"
[node name="The Zubmarine Zone" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "The Zubmarine Zone"
[node name="VBoxContainer2" type="VBoxContainer" parent="BoxContainer"]
layout_mode = 2
[node name="Radioactive Desert" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Radioactive Desert"
[node name="Boss Fight (Earth)" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Boss Fight (Earth)"
[node name="Dungeon of Destruction" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Dungeon of Destruction"
[node name="Final Boss Fight" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Final Boss Fight"
[node name="Ending Theme" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Ending Theme"
[node name="Credits 1" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Credits 1"
[node name="Credits 2" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Credits 2"
[node name="Credits 3" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Credits 3"
[node name="Back" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_0dqsq")
text = "Back"
[node name="Bottomhud" parent="." instance=ExtResource("4_xxv3m")]
layout_mode = 1
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"]

View file

@ -1,32 +1,16 @@
extends Control extends Control
func _ready(): func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
$"BoxContainer/VBoxContainer/Title Screen".grab_focus() $"VBoxContainer/Music".grab_focus()
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta): func _process(delta):
pass pass
func _level():
# This is like autoloading the scene, only
# it happens after already loading the main scene.
get_tree().change_scene_to_file("res://backgounds/disclaimer.tscn")
#Global.live = 1
#Global.gamelevel = randi() % 3
#if Global.gamelevel == 0:
# get_tree().change_scene_to_file("res://backgounds/galaxy.tscn")
#elif Global.gamelevel == 1:
# get_tree().change_scene_to_file("res://backgounds/wormhole.tscn")
#else:
# get_tree().change_scene_to_file("res://backgounds/abstract.tscn")
#get_tree().root.add_child(title)
#get_tree().root.remove_child(boot)
#boot.queue_free()
func _input(event): func _input(event):
# Mouse in viewport coordinates. # Mouse in viewport coordinates.
if Input.is_action_pressed("ui_cancel"): if Input.is_action_just_pressed("ui_cancel"):
_on_back_pressed() _on_back_pressed()
#print("Mouse Click/Unclick at: ", event.position) #print("Mouse Click/Unclick at: ", event.position)
# if highlighted == 1: # if highlighted == 1:
@ -41,72 +25,16 @@ func _input(event):
func _on_back_pressed(): func _on_back_pressed():
get_tree().change_scene_to_file("res://levels/debug.tscn") get_tree().change_scene_to_file("res://levels/debug.tscn")
func _on_title_screen_pressed():
pass # Replace with function body.
func _on_credits_1_pressed(): func _on_music_pressed():
pass # Replace with function body. get_tree().change_scene_to_file("res://levels/musictest.tscn")
func _on_credits_2_pressed(): func _on_sfx_pressed():
pass # Replace with function body. get_tree().change_scene_to_file("res://levels/sfxtest.tscn")
func _on_credits_3_pressed():
pass # Replace with function body.
func _on_disclaimer_settings_stores_pressed():
pass # Replace with function body.
func _on_testrooms_pressed():
pass # Replace with function body.
func _on_friendly_challenge_pressed():
pass # Replace with function body.
func _on_school_nursery_pressed():
pass # Replace with function body.
func _on_overworld_ceres_pressed():
pass # Replace with function body.
func _on_boss_fight_ceres_pressed():
pass # Replace with function body.
func _on_overworld_earth_pressed():
pass # Replace with function body.
func _on_the_zubmarine_zone_pressed():
pass # Replace with function body.
func _on_radioactive_desert_pressed():
pass # Replace with function body.
func _on_boss_fight_earth_pressed():
pass # Replace with function body.
func _on_dungeon_of_destruction_pressed():
pass # Replace with function body.
func _on_final_boss_fight_pressed():
pass # Replace with function body.
func _on_ending_theme_pressed():
pass # Replace with function body.

View file

@ -1,16 +1,17 @@
[gd_scene load_steps=7 format=3 uid="uid://chg6qe1fijkh3"] [gd_scene load_steps=8 format=3 uid="uid://chg6qe1fijkh3"]
[ext_resource type="Script" path="res://levels/soundtest.gd" id="1_3bg6p"] [ext_resource type="Script" path="res://levels/soundtest.gd" id="1_3bg6p"]
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_abtft"] [ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_abtft"]
[ext_resource type="Script" path="res://nebula.gd" id="3_c33nl"] [ext_resource type="Script" path="res://nebula.gd" id="3_c33nl"]
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_2a53a"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cprm3"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wtbgt"]
bg_color = Color(0, 0.8, 0, 1) bg_color = Color(0, 0.8, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_alctd"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4arqn"]
bg_color = Color(0, 0.8, 0, 1) bg_color = Color(0, 0.8, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0dqsq"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wro6j"]
bg_color = Color(0, 0.8, 0, 1) bg_color = Color(0, 0.8, 0, 1)
[node name="Soundtest" type="Control"] [node name="Soundtest" type="Control"]
@ -40,157 +41,41 @@ offset_bottom = 73.0
theme_override_font_sizes/font_size = 40 theme_override_font_sizes/font_size = 40
text = "Sound Test" text = "Sound Test"
[node name="Stop" type="Label" parent="."] [node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 0
offset_left = 5.0
offset_top = 672.0
offset_right = 444.0
offset_bottom = 708.0
theme_override_font_sizes/font_size = 22
text = "Press X or Spacebar to stop music playback"
[node name="BoxContainer" type="BoxContainer" parent="."]
layout_mode = 1 layout_mode = 1
anchors_preset = 3 anchors_preset = 7
anchor_left = 1.0 anchor_left = 0.5
anchor_top = 1.0 anchor_top = 1.0
anchor_right = 1.0 anchor_right = 0.5
anchor_bottom = 1.0 anchor_bottom = 1.0
offset_left = -640.0 offset_left = -129.5
offset_top = -419.0 offset_top = -362.0
grow_horizontal = 0 offset_right = 129.5
grow_horizontal = 2
grow_vertical = 0 grow_vertical = 0
[node name="VBoxContainer" type="VBoxContainer" parent="BoxContainer"] [node name="Music" type="Button" parent="VBoxContainer"]
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 80
theme_override_styles/focus = SubResource("StyleBoxFlat_wtbgt")
text = "Music"
[node name="Title Screen" type="Button" parent="BoxContainer/VBoxContainer"] [node name="Sfx" type="Button" parent="VBoxContainer"]
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 25 theme_override_font_sizes/font_size = 80
theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3") theme_override_styles/focus = SubResource("StyleBoxFlat_4arqn")
text = "Title Screen: X-Force Theme" text = "Sound Effects"
[node name="Disclaimer, Settings, Stores" type="Button" parent="BoxContainer/VBoxContainer"] [node name="Back" type="Button" parent="VBoxContainer"]
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 25 theme_override_font_sizes/font_size = 80
theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3") theme_override_styles/focus = SubResource("StyleBoxFlat_wro6j")
text = "Disclaimer, Settings, Stores"
[node name="Testrooms" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Testrooms"
[node name="Friendly challenge" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Friendly challenge"
[node name="School nursery" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "School nursery"
[node name="Overworld (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Overworld (Ceres)"
[node name="Boss fight (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Boss fight (Ceres)"
[node name="Overworld (Earth)" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Overworld (Earth)"
[node name="The Zubmarine Zone" type="Button" parent="BoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "The Zubmarine Zone"
[node name="VBoxContainer2" type="VBoxContainer" parent="BoxContainer"]
layout_mode = 2
[node name="Radioactive Desert" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Radioactive Desert"
[node name="Boss Fight (Earth)" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Boss Fight (Earth)"
[node name="Dungeon of Destruction" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Dungeon of Destruction"
[node name="Final Boss Fight" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Final Boss Fight"
[node name="Ending Theme" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Ending Theme"
[node name="Credits 1" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Credits 1"
[node name="Credits 2" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Credits 2"
[node name="Credits 3" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
text = "Credits 3"
[node name="Back" type="Button" parent="BoxContainer/VBoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 25
theme_override_styles/focus = SubResource("StyleBoxFlat_0dqsq")
text = "Back" text = "Back"
[node name="Bottomhud" parent="." instance=ExtResource("4_2a53a")]
layout_mode = 1
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"] [connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Title Screen" to="." method="_on_title_screen_pressed"] [connection signal="pressed" from="VBoxContainer/Music" to="." method="_on_music_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Disclaimer, Settings, Stores" to="." method="_on_disclaimer_settings_stores_pressed"] [connection signal="pressed" from="VBoxContainer/Sfx" to="." method="_on_sfx_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Testrooms" to="." method="_on_testrooms_pressed"] [connection signal="pressed" from="VBoxContainer/Back" to="." method="_on_back_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Friendly challenge" to="." method="_on_friendly_challenge_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/School nursery" to="." method="_on_school_nursery_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Overworld (Ceres)" to="." method="_on_overworld_ceres_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Boss fight (Ceres)" to="." method="_on_boss_fight_ceres_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/Overworld (Earth)" to="." method="_on_overworld_earth_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer/The Zubmarine Zone" to="." method="_on_the_zubmarine_zone_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Radioactive Desert" to="." method="_on_radioactive_desert_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Boss Fight (Earth)" to="." method="_on_boss_fight_earth_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Dungeon of Destruction" to="." method="_on_dungeon_of_destruction_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Final Boss Fight" to="." method="_on_final_boss_fight_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Ending Theme" to="." method="_on_ending_theme_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 1" to="." method="_on_credits_1_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 2" to="." method="_on_credits_2_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 3" to="." method="_on_credits_3_pressed"]
[connection signal="pressed" from="BoxContainer/VBoxContainer2/Back" to="." method="_on_back_pressed"]

View file

@ -1,6 +1,6 @@
extends Control extends Control
func _ready(): func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
$VBoxContainer/Start.grab_focus() $VBoxContainer/Start.grab_focus()
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=7 format=3 uid="uid://s8ttuboef06k"] [gd_scene load_steps=8 format=3 uid="uid://s8ttuboef06k"]
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="1_33b4o"] [ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="1_33b4o"]
[ext_resource type="Script" path="res://levels/tmenu.gd" id="1_w3aym"] [ext_resource type="Script" path="res://levels/tmenu.gd" id="1_w3aym"]
[ext_resource type="Script" path="res://nebula.gd" id="2_x35ws"] [ext_resource type="Script" path="res://nebula.gd" id="2_x35ws"]
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_0qcfw"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_821nm"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_821nm"]
bg_color = Color(0, 0.8, 0, 1) bg_color = Color(0, 0.8, 0, 1)
@ -71,6 +72,9 @@ theme_override_font_sizes/font_size = 80
theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn") theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn")
text = "Exit" text = "Exit"
[node name="Bottomhud" parent="." instance=ExtResource("4_0qcfw")]
layout_mode = 1
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"] [connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
[connection signal="pressed" from="VBoxContainer/Start" to="." method="_on_start_pressed"] [connection signal="pressed" from="VBoxContainer/Start" to="." method="_on_start_pressed"]
[connection signal="pressed" from="VBoxContainer/Debug" to="." method="_on_debug_pressed"] [connection signal="pressed" from="VBoxContainer/Debug" to="." method="_on_debug_pressed"]

View file

@ -1,7 +1,5 @@
extends Node extends Node
var title = preload("res://title.tscn").instantiate()
var boot = preload("res://bootclick.tscn").instantiate()
const loadgame = preload("res://load.gd") const loadgame = preload("res://load.gd")
const savegame = preload("res://save.gd") const savegame = preload("res://save.gd")
@ -25,7 +23,7 @@ func _process(delta):
func _input(event): func _input(event):
# Mouse in viewport coordinates. # Mouse in viewport coordinates.
if !Global.sk && (event is InputEventMouseButton || Input.is_action_pressed("ui_accept")): if !Global.sk && Input.is_action_just_pressed("ui_accept"):
#print("Mouse Click/Unclick at: ", event.position) #print("Mouse Click/Unclick at: ", event.position)
_title() _title()

35
main.tscn Normal file
View file

@ -0,0 +1,35 @@
[gd_scene load_steps=4 format=3 uid="uid://d0jrygo3ihcdk"]
[ext_resource type="Script" path="res://main.gd" id="1_51vn3"]
[ext_resource type="PackedScene" path="res://selftest.tscn" id="2_jnmxu"]
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_tig2r"]
[node name="Main" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_51vn3")
[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_left = 290.0
offset_top = 258.0
offset_right = 949.0
offset_bottom = 326.0
theme_override_font_sizes/font_size = 49
text = "Press enter or B to continue"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Selftest" parent="." instance=ExtResource("2_jnmxu")]
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_tig2r")]
layout_mode = 1

View file

@ -11,7 +11,7 @@ config_version=5
[application] [application]
config/name="Midori in the Magic School" config/name="Midori in the Magic School"
run/main_scene="res://bootclick.tscn" run/main_scene="res://main.tscn"
config/features=PackedStringArray("4.2", "GL Compatibility") config/features=PackedStringArray("4.2", "GL Compatibility")
config/icon="res://icon.png" config/icon="res://icon.png"

View file

@ -13,7 +13,7 @@ func _ready():
Global.sk = true Global.sk = true
Global.gamelevel = null Global.gamelevel = null
add_child(bgsound) add_child(bgsound)
var titlemusic = load("res://music/reloaded.wav") var titlemusic = load(Global.musictracks[0])
bgsound.stream = titlemusic bgsound.stream = titlemusic
bgsound.play(0) bgsound.play(0)
wait = Time.get_ticks_msec() wait = Time.get_ticks_msec()
@ -26,11 +26,11 @@ func _process(delta):
func _input(event): func _input(event):
# Mouse in viewport coordinates. # Mouse in viewport coordinates.
if (Time.get_ticks_msec() - wait) >= 1000 && (event is InputEventMouseButton || Input.is_action_pressed("ui_accept")): if Input.is_action_just_pressed("ui_accept"):
#print("Mouse Click/Unclick at: ", event.position) #print("Mouse Click/Unclick at: ", event.position)
get_tree().change_scene_to_file("res://levels/tmenu.tscn") get_tree().change_scene_to_file("res://levels/tmenu.tscn")
#_level() #_level()
elif (Time.get_ticks_msec() - wait) >= 1000 && (Input.is_action_pressed("ui_cancel")): elif Input.is_action_just_pressed("ui_cancel"):
get_tree().quit() get_tree().quit()
func _level(): func _level():

View file

@ -6,7 +6,7 @@
[ext_resource type="Script" path="res://nebula.gd" id="3_bn1r3"] [ext_resource type="Script" path="res://nebula.gd" id="3_bn1r3"]
[ext_resource type="Script" path="res://start.gd" id="4_cc41w"] [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="Script" path="res://exit.gd" id="5_scoec"]
[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="7_yq7ke"] [ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="7_yq7ke"]
[node name="title" type="Control"] [node name="title" type="Control"]
layout_mode = 3 layout_mode = 3