From 362771da2240cdddf673b5753d0203fe606bc4c3 Mon Sep 17 00:00:00 2001 From: Page Asgardius Date: Sun, 12 Nov 2023 10:20:59 -0700 Subject: [PATCH] new release --- README.md | 8 +++++ backgounds/Label3.gd | 16 +++++++--- bootclick.gd | 1 - export_presets.cfg | 70 +++----------------------------------------- global.gd | 9 ++---- levels/credits.tscn | 8 ++--- load.gd | 19 ++---------- project.godot | 1 + save.gd | 2 +- title.gd | 7 +++-- 10 files changed, 38 insertions(+), 103 deletions(-) diff --git a/README.md b/README.md index f9f9168..82375c4 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,12 @@ Humans dissapeared from Earth and machines are looking for a way to bring them b Made with Godot Engine +# Known issues + +* PlayStation 4 controller does not recognize some buttons +* Sound issues when Steam emulated controller is active +* Sound issues when playing web version on Firefox + +You can play it on your browser at https://patrice.asgardius.company/r3/ + Remember: Godot Does what Unitydn't (if you are from the 1990 decade you will know where it came from) diff --git a/backgounds/Label3.gd b/backgounds/Label3.gd index 0c30754..61b8dfc 100644 --- a/backgounds/Label3.gd +++ b/backgounds/Label3.gd @@ -1,8 +1,16 @@ extends Label +var previoustime +const savegame = preload("res://save.gd") +func _ready(): + previoustime = int(Global.levelmax[Global.gamelevel]) + if Global.time < previoustime && Global.live == 3: + Global.levelmax[Global.gamelevel] = str(Global.time) + savegame.new() func _process(delta: float) -> void: - var hour = int(Global.time / 3600000) - var min = int(Global.time / 60000) - (hour * 60) - var sec = int(Global.time / 1000) - (min * 60) - (hour * 3600) - set_text("Your time: " + str(hour) + ":" + str(min) + ":" + str(sec) + ":" + str(Global.time - (sec * 1000) - (min * 60000) - (hour * 3600000))); + var sec = float(Global.time / 1000) + var msec = Global.time - (sec*1000) + var bsec = float(previoustime / 1000) + var bmsec = previoustime - (bsec*1000) + set_text("Your time: " + str(sec) + "." + str(msec) + "\n" + "Your best time: " + str(bsec) + "." + str(bmsec)); diff --git a/bootclick.gd b/bootclick.gd index bdc1966..41faeb8 100644 --- a/bootclick.gd +++ b/bootclick.gd @@ -9,7 +9,6 @@ const savegame = preload("res://save.gd") func _ready(): loadgame.new() - print(Global.level1max) #pass # Replace with function body. #add_child(title) diff --git a/export_presets.cfg b/export_presets.cfg index 0d0b083..f751979 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -26,8 +26,8 @@ architectures/armeabi-v7a=true architectures/arm64-v8a=true architectures/x86=false architectures/x86_64=false -version/code=4 -version/name="0.0.3" +version/code=5 +version/name="0.0.4" package/unique_name="asgardius.page.r3game" package/name="" package/signed=true @@ -242,68 +242,6 @@ rm -rf \"{temp_dir}\"" [preset.2] -name="Windows Desktop" -platform="Windows Desktop" -runnable=true -dedicated_server=false -custom_features="" -export_filter="all_resources" -include_filter="" -exclude_filter="" -export_path="./The Red Robot Radio.exe" -encryption_include_filters="" -encryption_exclude_filters="" -encrypt_pck=false -encrypt_directory=false - -[preset.2.options] - -custom_template/debug="" -custom_template/release="" -debug/export_console_wrapper=1 -binary_format/embed_pck=true -texture_format/bptc=true -texture_format/s3tc=true -texture_format/etc=false -texture_format/etc2=false -binary_format/architecture="x86_64" -codesign/enable=false -codesign/timestamp=true -codesign/timestamp_server_url="" -codesign/digest_algorithm=1 -codesign/description="" -codesign/custom_options=PackedStringArray() -application/modify_resources=true -application/icon="" -application/console_wrapper_icon="" -application/icon_interpolation=4 -application/file_version="" -application/product_version="" -application/company_name="" -application/product_name="" -application/file_description="" -application/copyright="" -application/trademarks="" -ssh_remote_deploy/enabled=false -ssh_remote_deploy/host="user@host_ip" -ssh_remote_deploy/port="22" -ssh_remote_deploy/extra_args_ssh="" -ssh_remote_deploy/extra_args_scp="" -ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}' -$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}' -$trigger = New-ScheduledTaskTrigger -Once -At 00:00 -$settings = New-ScheduledTaskSettingsSet -$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings -Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true -Start-ScheduledTask -TaskName godot_remote_debug -while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 } -Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue" -ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue -Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue -Remove-Item -Recurse -Force '{temp_dir}'" - -[preset.3] - name="Web" platform="Web" runnable=true @@ -312,13 +250,13 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="The Red Robot Radio/index.html" +export_path="r3/index.html" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=false -[preset.3.options] +[preset.2.options] custom_template/debug="" custom_template/release="" diff --git a/global.gd b/global.gd index fec76d8..9d853e5 100644 --- a/global.gd +++ b/global.gd @@ -7,13 +7,8 @@ var mousepos var timelimit = 15000 var wait var hiscoresfile = "user://hiscores.save" -var level1max -var level2max -var level3max -var level4max -var level5max -var level6max -var level7max +var gamelevel +var levelmax # Called when the node enters the scene tree for the first time. func _ready(): pass # Replace with function body. diff --git a/levels/credits.tscn b/levels/credits.tscn index 37ec3a6..bd699ee 100644 --- a/levels/credits.tscn +++ b/levels/credits.tscn @@ -39,7 +39,7 @@ Made with Godot Engine Original game made with PyGame Pygame version testing -Astroboy +Beachkid Zencifer Natasha Sakura Nakayama @@ -68,9 +68,9 @@ Arch Linux Rolling Godot Port started with this device Provided as a replacement for a HP 14 laptop that died while running Genshin Impact -??? -??? -??? +Steam Deck +Arch Linux +Provided by Store Boss Feedback El Suavecito diff --git a/load.gd b/load.gd index e034924..4a37037 100644 --- a/load.gd +++ b/load.gd @@ -3,15 +3,7 @@ var file func _init(): if FileAccess.file_exists(Global.hiscoresfile): file = FileAccess.open(Global.hiscoresfile, FileAccess.READ) - var checkpoint = file.get_as_text().rsplit(",", true, 7) - Global.level1max = checkpoint[0] - Global.level2max = checkpoint[1] - Global.level3max = checkpoint[2] - Global.level4max = checkpoint[3] - Global.level5max = checkpoint[4] - Global.level6max = checkpoint[5] - Global.level7max = checkpoint[6] - + Global.levelmax = file.get_as_text().rsplit(",", true, 7) # We need to revert the game state so we're not cloning objects # during loading. This will vary wildly depending on the needs of a # project, so take care with this step. @@ -26,11 +18,4 @@ func _init(): var saveinit = "9999999,9999999,9999999,9999999,9999999,9999999,9999999" var file = FileAccess.open(Global.hiscoresfile, FileAccess.WRITE) file.store_string(saveinit) - var checkpoint = saveinit.rsplit(",", true, 7) - Global.level1max = checkpoint[0] - Global.level2max = checkpoint[1] - Global.level3max = checkpoint[2] - Global.level4max = checkpoint[3] - Global.level5max = checkpoint[4] - Global.level6max = checkpoint[5] - Global.level7max = checkpoint[6] + Global.levelmax = saveinit.rsplit(",", true, 7) diff --git a/project.godot b/project.godot index 393998a..0d31a6b 100644 --- a/project.godot +++ b/project.godot @@ -24,6 +24,7 @@ Global="*res://global.gd" window/size/viewport_width=1280 window/size/viewport_height=720 +window/size/mode=3 window/stretch/mode="viewport" [rendering] diff --git a/save.gd b/save.gd index a2789ff..549aac5 100644 --- a/save.gd +++ b/save.gd @@ -1,6 +1,6 @@ extends Node func _init(): - var saveinit = str(Global.level1max)+","+str(Global.level2max)+","+str(Global.level3max)+","+str(Global.level4max)+","+str(Global.level5max)+","+str(Global.level6max)+","+str(Global.level7max) + var saveinit = Global.levelmax[0]+","+Global.levelmax[1]+","+Global.levelmax[2]+","+Global.levelmax[3]+","+Global.levelmax[4]+","+Global.levelmax[5]+","+Global.levelmax[6] var file = FileAccess.open(Global.hiscoresfile, FileAccess.WRITE) file.store_string(saveinit) file.close() diff --git a/title.gd b/title.gd index 8df4757..2a25f83 100644 --- a/title.gd +++ b/title.gd @@ -8,6 +8,7 @@ var wait #var wormhole = preload("res://backgounds/wormhole.tscn").instantiate() func _ready(): + Global.gamelevel = null add_child(bgsound) var titlemusic = load("res://music/x-force.ogg") bgsound.stream = titlemusic @@ -32,10 +33,10 @@ func _level(): # This is like autoloading the scene, only # it happens after already loading the main scene. Global.live = 1 - var level = randi() % 3 - if level == 0: + Global.gamelevel = randi() % 3 + if Global.gamelevel == 0: get_tree().change_scene_to_file("res://backgounds/galaxy.tscn") - elif level == 1: + 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")