diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5131495..4a5250a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,42 +1,46 @@ name: Build Godot Game on: + workflow_dispatch: push: branches: [ main ] + paths: + - "scenes/**" + - "scripts/**" + - "sprites/**" + - "Main.tscn" + - "project.godot" + #- "ans/answers.json" + # Uncomment when we get to this stage. pull_request: branches: [ main ] - workflow_dispatch: + paths: + - "scenes/**" + - "scripts/**" + - "sprites/**" + - "Main.tscn" + - "project.godot" + #- "ans/answers.json" + # Uncomment when we get to this stage. + +permissions: + contents: read jobs: - setup-godot: + build: runs-on: ubuntu-latest steps: - - name: Godot Setup - uses: lihop/godot-setup@v2.1.3 - with: - version: 4.2.2-stable # Specify the Godot version you want to use - bits: 64 # Optional, default is 64 - mono: false # Optional, set to true if using the Mono build - alias: godot # Optional, default is godot - cache: true # Optional, default is true - export-templates: false # Optional, set to true if you need export templates - github-token: ${{ github.token }} # Optional, default is ${{ github.token }} - - - name: Build Godot - uses: yeslayla/build-godot-action@v1.4.1 - with: - name: StarJump # Specify the name of the exported binary - preset: "Game Entry" # Specify the name of the preset in `export_presets.cfg` to use - subdirectory: "" # Optional, default is an empty string - package: true # Optional, set to true to output an artifact zip file - projectDir: build # Optional, default is . - debugMode: true # Optional, specify true or false to use `--export-debug` + - name: Checkout + uses: actions/checkout@v4 - - name: Godot Build Info - uses: robpc/godot-build-info-action@v1.0 - with: - version: 1.0.0 # Specify package version - commit: ${{ github.sha }} # Specify the commit hash - build_date: ${{ github.run_date }} # Specify the build date/time - file: override.cfg # Specify the file to add the overrides + - name: Export Godot project + uses: mirror12k/godot-export-build@v1 + with: + godot-version: '4.2.1' + project-path: '.' + - name: Archive production artifacts + uses: actions/upload-artifact@v2 + with: + name: builds + path: build/* diff --git a/.gitignore b/.gitignore index c4769cd..9616813 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,14 @@ .godot/ # Python files (used to work as a Python game) .py -# Ignore VSCode settings for Godot EXE -.vscode/settings.json -# Ignore imports +# ignore work in progress sprites +*.psd +*.aseprite +# Import file ignores *.import -# Ignore test builds +# Godot EXE path ignore for VSCode +.vscode/settings.json +# If someone decides to place the Godot exe in "for convenience" I suppose +*Godot*.exe +# Test Build Files [Bb]uild/* diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..47ddb26 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,4 @@ +{ + "recommendations": ["alfish.godot-files", "geequlim.godot-tools", "esbenp.prettier-vscode", "ms-vscode.remote-repositories", "github.remotehub", "donjayamanne.githist"], + "unwantedRecommendations": [] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d77cb62 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "GDScript: Launch Project", + "type": "godot", + "request": "launch", + "project": "${workspaceFolder}", + "debug_collisions": false, + "debug_paths": false, + "debug_navigation": false, + "additional_options": "" + } + ] +} \ No newline at end of file diff --git a/Main.tscn b/Main.tscn new file mode 100644 index 0000000..9e5344f --- /dev/null +++ b/Main.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://bh3k50jwrtolm"] + +[ext_resource type="Script" path="res://scripts/Main.gd" id="1_x5cq3"] + +[node name="Main" type="Node2D"] +script = ExtResource("1_x5cq3") diff --git a/ans/answers.json b/ans/answers.json new file mode 100644 index 0000000..d0f1fea --- /dev/null +++ b/ans/answers.json @@ -0,0 +1,4 @@ +{ + "star": "Sun", + "clues": ["We see this everyday from ~6am to ~6pm."] +} \ No newline at end of file diff --git a/audio/Another Night (inside cockpit music) .mp3 b/audio/Another Night (inside cockpit music) .mp3 new file mode 100644 index 0000000..2b6cc84 Binary files /dev/null and b/audio/Another Night (inside cockpit music) .mp3 differ diff --git a/audio/The Journey (final ver.).mp3 b/audio/The Journey (final ver.).mp3 new file mode 100644 index 0000000..2df749a Binary files /dev/null and b/audio/The Journey (final ver.).mp3 differ diff --git a/audio/The Journey (op screen).mp3 b/audio/The Journey (op screen).mp3 new file mode 100644 index 0000000..0cdbd20 Binary files /dev/null and b/audio/The Journey (op screen).mp3 differ diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..17838b2 --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,205 @@ +[preset.0] + +name="StarJump Windows App" +platform="Windows Desktop" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="*.md, old_scripts/*, .github/*, .vscode/*, and/*, LICENSE, export_presets.cfg, *.import, build/*" +export_path="build/StarJump build.exe" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=2 +binary_format/embed_pck=false +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="res://sprites/Astronaut Sprite 1 fire.png" +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="" +application/export_angle=0 +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.1] + +name="StarJump Web App" +platform="Web" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="md, old_scripts/*, .github/*, .vscode/*, and/*, LICENSE, export_presets.cfg, *.import, build/*" +export_path="" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +variant/extensions_support=false +vram_texture_compression/for_desktop=true +vram_texture_compression/for_mobile=false +html/export_icon=true +html/custom_html_shell="" +html/head_include="" +html/canvas_resize_policy=2 +html/focus_canvas_on_start=true +html/experimental_virtual_keyboard=false +progressive_web_app/enabled=false +progressive_web_app/offline_page="" +progressive_web_app/display=1 +progressive_web_app/orientation=0 +progressive_web_app/icon_144x144="" +progressive_web_app/icon_180x180="" +progressive_web_app/icon_512x512="" +progressive_web_app/background_color=Color(0, 0, 0, 1) + +[preset.2] + +name="StarJump Mac App" +platform="macOS" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.2.options] + +export/distribution_type=1 +binary_format/architecture="universal" +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +application/icon="" +application/icon_interpolation=4 +application/bundle_identifier="" +application/signature="" +application/app_category="Games" +application/short_version="" +application/version="" +application/copyright="" +application/copyright_localized={} +application/min_macos_version="10.12" +application/export_angle=0 +display/high_res=true +xcode/platform_build="14C18" +xcode/sdk_version="13.1" +xcode/sdk_build="22C55" +xcode/sdk_name="macosx13.1" +xcode/xcode_version="1420" +xcode/xcode_build="14C18" +codesign/codesign=1 +codesign/installer_identity="" +codesign/apple_team_id="" +codesign/identity="" +codesign/entitlements/custom_file="" +codesign/entitlements/allow_jit_code_execution=false +codesign/entitlements/allow_unsigned_executable_memory=false +codesign/entitlements/allow_dyld_environment_variables=false +codesign/entitlements/disable_library_validation=false +codesign/entitlements/audio_input=false +codesign/entitlements/camera=false +codesign/entitlements/location=false +codesign/entitlements/address_book=false +codesign/entitlements/calendars=false +codesign/entitlements/photos_library=false +codesign/entitlements/apple_events=false +codesign/entitlements/debugging=false +codesign/entitlements/app_sandbox/enabled=false +codesign/entitlements/app_sandbox/network_server=false +codesign/entitlements/app_sandbox/network_client=false +codesign/entitlements/app_sandbox/device_usb=false +codesign/entitlements/app_sandbox/device_bluetooth=false +codesign/entitlements/app_sandbox/files_downloads=0 +codesign/entitlements/app_sandbox/files_pictures=0 +codesign/entitlements/app_sandbox/files_music=0 +codesign/entitlements/app_sandbox/files_movies=0 +codesign/entitlements/app_sandbox/files_user_selected=0 +codesign/entitlements/app_sandbox/helper_executables=[] +codesign/custom_options=PackedStringArray() +notarization/notarization=0 +privacy/microphone_usage_description="" +privacy/microphone_usage_description_localized={} +privacy/camera_usage_description="" +privacy/camera_usage_description_localized={} +privacy/location_usage_description="" +privacy/location_usage_description_localized={} +privacy/address_book_usage_description="" +privacy/address_book_usage_description_localized={} +privacy/calendar_usage_description="" +privacy/calendar_usage_description_localized={} +privacy/photos_library_usage_description="" +privacy/photos_library_usage_description_localized={} +privacy/desktop_folder_usage_description="" +privacy/desktop_folder_usage_description_localized={} +privacy/documents_folder_usage_description="" +privacy/documents_folder_usage_description_localized={} +privacy/downloads_folder_usage_description="" +privacy/downloads_folder_usage_description_localized={} +privacy/network_volumes_usage_description="" +privacy/network_volumes_usage_description_localized={} +privacy/removable_volumes_usage_description="" +privacy/removable_volumes_usage_description_localized={} +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="#!/usr/bin/env bash +unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" +open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}" +ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash +kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\") +rm -rf \"{temp_dir}\"" diff --git a/old_scripts/script.gd b/old_scripts/script.gd new file mode 100644 index 0000000..0efc3ee --- /dev/null +++ b/old_scripts/script.gd @@ -0,0 +1,39 @@ +extends CharacterBody2D + +var speed = 200 +var sprite_index = 0 +var sprite_textures = [] + +func _ready(): + # Load the textures + sprite_textures.append(load("res://sprites/Astronaut Sprite 1.png")) + sprite_textures.append(load("res://sprites/Astronaut Sprite 1 fire.png")) + + # Set initial sprite texture + $Sprite2D.texture = sprite_textures[sprite_index] + +func _process(delta): + # Handle player movement + var velocity = Vector2() + if Input.is_action_pressed("ui_right"): + velocity.x += 1 + if Input.is_action_pressed("ui_left"): + velocity.x -= 1 + if Input.is_action_pressed("ui_down"): + velocity.y += 1 + if Input.is_action_pressed("ui_up"): + velocity.y -= 1 + + if velocity.length() > 0: + velocity = velocity.normalized() * speed + + move_and_slide() + + # Handle sprite toggle on key press + if Input.is_action_just_pressed("toggle_sprite"): + toggle_sprite() + +func toggle_sprite(): + # Alternate the sprite texture + sprite_index = (sprite_index + 1) % sprite_textures.size() + $Sprite2D.texture = sprite_textures[sprite_index] diff --git a/old_scripts/start_button.gd b/old_scripts/start_button.gd new file mode 100644 index 0000000..20cec4a --- /dev/null +++ b/old_scripts/start_button.gd @@ -0,0 +1,18 @@ +extends TextureButton + +# Called when the node enters the scene tree for the first time. +func _ready(): + # Access the TextureButton node + var button_node = "../TextureButton" # Assumes TextureButton is a child node of Control + + # Check if button_node is valid before connecting + if button_node: + # Connect the 'pressed' signal from TextureButton to '_on_button_pressed' method in this script + button_node.connect("pressed", Callable(self, "_on_button_pressed")) + else: + print("TextureButton node not found or accessible.") + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass diff --git a/project.godot b/project.godot index c37a8bc..f8e1bcc 100644 --- a/project.godot +++ b/project.godot @@ -11,9 +11,22 @@ config_version=5 [application] config/name="StarJump" +run/main_scene="res://scenes/start_button.tscn" config/features=PackedStringArray("4.2", "GL Compatibility") config/icon="res://icon.svg" +[display] + +window/stretch/mode="viewport" + +[input] + +ui_space={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":0,"echo":false,"script":null) +] +} + [rendering] renderer/rendering_method="gl_compatibility" diff --git a/scenes/checkpoint.tscn b/scenes/checkpoint.tscn new file mode 100644 index 0000000..4070b6c --- /dev/null +++ b/scenes/checkpoint.tscn @@ -0,0 +1,68 @@ +[gd_scene load_steps=8 format=3 uid="uid://cpqj11o8so3dl"] + +[ext_resource type="Script" path="res://scripts/Stage1/Clue1.gd" id="2_rik6i"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_8iqn8"] +radius = 31.0 + +[sub_resource type="CircleShape2D" id="CircleShape2D_5wl4l"] +radius = 36.0555 + +[sub_resource type="CircleShape2D" id="CircleShape2D_5plmp"] +radius = 41.3038 + +[sub_resource type="CircleShape2D" id="CircleShape2D_3c6uc"] +radius = 35.5106 + +[sub_resource type="CircleShape2D" id="CircleShape2D_ajib0"] +radius = 39.4588 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ic4qh"] +size = Vector2(20, 100) + +[node name="Checkpoint" type="Node2D"] + +[node name="Clue1" type="Area2D" parent="."] +position = Vector2(198, 31) +script = ExtResource("2_rik6i") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue1"] +position = Vector2(37, 40) +shape = SubResource("CircleShape2D_8iqn8") + +[node name="Clue2" type="Area2D" parent="."] +position = Vector2(549, 75) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue2"] +position = Vector2(54, 18) +shape = SubResource("CircleShape2D_5wl4l") + +[node name="Clue3" type="Area2D" parent="."] +position = Vector2(296, 468) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue3"] +position = Vector2(44, 44) +shape = SubResource("CircleShape2D_5plmp") + +[node name="Clue4" type="Area2D" parent="."] +position = Vector2(718, 461) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue4"] +position = Vector2(55, 38) +shape = SubResource("CircleShape2D_3c6uc") + +[node name="Clue5" type="Area2D" parent="."] +position = Vector2(945, 57) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue5"] +position = Vector2(46, 23) +shape = SubResource("CircleShape2D_ajib0") + +[node name="answer" type="Area2D" parent="."] +position = Vector2(-12, 236) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="answer"] +position = Vector2(23, 64) +shape = SubResource("RectangleShape2D_ic4qh") + +[connection signal="body_entered" from="Clue1" to="Clue1" method="_on_body_entered"] diff --git a/scenes/cockpit.tscn b/scenes/cockpit.tscn new file mode 100644 index 0000000..38354fe --- /dev/null +++ b/scenes/cockpit.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://dhnyno80w01m"] + +[ext_resource type="Script" path="res://scripts/cockpit.gd" id="1_aq0f0"] +[ext_resource type="Texture2D" uid="uid://oku8lbst4etl" path="res://sprites/Inside cockpit area screen.png" id="1_i74mr"] +[ext_resource type="AudioStream" uid="uid://o1fpcdhcrr3e" path="res://audio/Another Night (inside cockpit music) .mp3" id="2_45pct"] +[ext_resource type="Texture2D" uid="uid://c70xoliuvmds" path="res://sprites/Sun.png" id="3_ev3sk"] +[ext_resource type="Texture2D" uid="uid://chprpjr43mx04" path="res://sprites/Polaris.png" id="4_6y6js"] +[ext_resource type="Texture2D" uid="uid://blpw7bgteup87" path="res://sprites/Proxima centauri.png" id="5_0utwh"] + +[node name="Cockpit" type="Node2D"] +script = ExtResource("1_aq0f0") + +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +stream = ExtResource("2_45pct") + +[node name="InsideCockpitAreaScreen" type="Sprite2D" parent="."] +position = Vector2(576, 324) +scale = Vector2(2.45106, 2.4) +texture = ExtResource("1_i74mr") + +[node name="Sun" type="TextureButton" parent="."] +offset_left = 728.0 +offset_top = 64.0 +offset_right = 963.0 +offset_bottom = 199.0 +texture_normal = ExtResource("3_ev3sk") + +[node name="Polaris" type="TextureButton" parent="."] +offset_left = 463.0 +offset_top = 200.0 +offset_right = 698.0 +offset_bottom = 335.0 +texture_normal = ExtResource("4_6y6js") + +[node name="Proxima_centauri" type="TextureButton" parent="."] +offset_left = 205.0 +offset_top = 72.0 +offset_right = 440.0 +offset_bottom = 207.0 +texture_normal = ExtResource("5_0utwh") diff --git a/scenes/pilotseat.tscn b/scenes/pilotseat.tscn new file mode 100644 index 0000000..d707b68 --- /dev/null +++ b/scenes/pilotseat.tscn @@ -0,0 +1,3 @@ +[gd_scene format=3 uid="uid://bvrb4b1avt673"] + +[node name="Pilotseat" type="Node2D"] diff --git a/scenes/stages/stage1.tscn b/scenes/stages/stage1.tscn new file mode 100644 index 0000000..f0c0a69 --- /dev/null +++ b/scenes/stages/stage1.tscn @@ -0,0 +1,298 @@ +[gd_scene load_steps=29 format=3 uid="uid://dgdhq7qt34stf"] + +[ext_resource type="Script" path="res://scripts/Player.gd" id="1_4dh24"] +[ext_resource type="Texture2D" uid="uid://dhgvwxivav0sa" path="res://sprites/Astronaut Sprite 1 fire.png" id="2_7ny1k"] +[ext_resource type="AudioStream" uid="uid://dfaswthopohch" path="res://audio/The Journey (final ver.).mp3" id="3_07jfn"] +[ext_resource type="Script" path="res://scripts/Stage1/Clue1.gd" id="3_rns28"] +[ext_resource type="Script" path="res://scripts/Stage1/Clue2.gd" id="4_pv2ro"] +[ext_resource type="Script" path="res://scripts/Stage1/Clue3.gd" id="5_2j6ve"] +[ext_resource type="Texture2D" uid="uid://c70xoliuvmds" path="res://sprites/Sun.png" id="6_5taep"] +[ext_resource type="Script" path="res://scripts/Stage1/Clue4.gd" id="6_dfxqv"] +[ext_resource type="Script" path="res://scripts/Stage1/Clue5.gd" id="7_s042v"] +[ext_resource type="Texture2D" uid="uid://dxr0ynox11apr" path="res://sprites/sun star icon.png" id="8_2enxe"] +[ext_resource type="Script" path="res://scripts/Stage1/AnswerGUI.gd" id="8_yubbe"] +[ext_resource type="Texture2D" uid="uid://ceo8fmyqrium1" path="res://sprites/Stars sheet.png" id="9_5uxs5"] +[ext_resource type="Script" path="res://scripts/Starry background.gd" id="10_njl88"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_0fy8c"] +atlas = ExtResource("9_5uxs5") +region = Rect2(0, 0, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xvvmv"] +atlas = ExtResource("9_5uxs5") +region = Rect2(640, 0, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_byc1j"] +atlas = ExtResource("9_5uxs5") +region = Rect2(1280, 0, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y3keh"] +atlas = ExtResource("9_5uxs5") +region = Rect2(0, 320, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jn0gr"] +atlas = ExtResource("9_5uxs5") +region = Rect2(640, 320, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yg5i2"] +atlas = ExtResource("9_5uxs5") +region = Rect2(1280, 320, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_u5ugd"] +atlas = ExtResource("9_5uxs5") +region = Rect2(0, 640, 640, 320) + +[sub_resource type="SpriteFrames" id="SpriteFrames_uwnlw"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_0fy8c") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xvvmv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_byc1j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_y3keh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jn0gr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yg5i2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_u5ugd") +}], +"loop": true, +"name": &"stars", +"speed": 5.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_3myi4"] +size = Vector2(138, 151) + +[sub_resource type="CircleShape2D" id="CircleShape2D_agvig"] +radius = 31.0 + +[sub_resource type="CircleShape2D" id="CircleShape2D_wofwh"] +radius = 36.0555 + +[sub_resource type="CircleShape2D" id="CircleShape2D_3rrcl"] +radius = 41.3038 + +[sub_resource type="CircleShape2D" id="CircleShape2D_eo4rb"] +radius = 35.5106 + +[sub_resource type="CircleShape2D" id="CircleShape2D_ohvj2"] +radius = 39.4588 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_wmj16"] +size = Vector2(42, 648) + +[node name="Node2D" type="Node2D"] + +[node name="Starry background" type="AnimatedSprite2D" parent="."] +position = Vector2(576, 324.5) +scale = Vector2(1.8, 2.02188) +sprite_frames = SubResource("SpriteFrames_uwnlw") +animation = &"stars" +frame = 6 +script = ExtResource("10_njl88") + +[node name="Background" type="AudioStreamPlayer" parent="Starry background"] +stream = ExtResource("3_07jfn") + +[node name="Player" type="CharacterBody2D" parent="." groups=["player"]] +script = ExtResource("1_4dh24") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"] +position = Vector2(1003, 509.5) +shape = SubResource("RectangleShape2D_3myi4") + +[node name="Sprite2D" type="Sprite2D" parent="Player"] +position = Vector2(1003, 509.476) +scale = Vector2(0.460317, 0.460317) +texture = ExtResource("2_7ny1k") + +[node name="Clue1" type="Area2D" parent="."] +position = Vector2(198, 31) +script = ExtResource("3_rns28") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue1"] +position = Vector2(37, 40) +shape = SubResource("CircleShape2D_agvig") + +[node name="Sun" type="Sprite2D" parent="Clue1"] +position = Vector2(139, 40) +texture = ExtResource("6_5taep") + +[node name="SunStarIcon" type="Sprite2D" parent="Clue1"] +position = Vector2(36, 43) +texture = ExtResource("8_2enxe") + +[node name="Clue2" type="Area2D" parent="."] +position = Vector2(549, 75) +script = ExtResource("4_pv2ro") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue2"] +position = Vector2(54, 18) +shape = SubResource("CircleShape2D_wofwh") + +[node name="Label" type="Label" parent="Clue2"] +offset_left = 94.0 +offset_top = 5.0 +offset_right = 134.0 +offset_bottom = 28.0 + +[node name="SunStarIcon2" type="Sprite2D" parent="Clue2"] +position = Vector2(55, 18) +texture = ExtResource("8_2enxe") + +[node name="Clue3" type="Area2D" parent="."] +position = Vector2(296, 468) +script = ExtResource("5_2j6ve") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue3"] +position = Vector2(44, 44) +shape = SubResource("CircleShape2D_3rrcl") + +[node name="Label" type="Label" parent="Clue3"] +offset_right = 40.0 +offset_bottom = 23.0 + +[node name="SunStarIcon3" type="Sprite2D" parent="Clue3"] +position = Vector2(43, 47) +texture = ExtResource("8_2enxe") + +[node name="Clue4" type="Area2D" parent="."] +position = Vector2(718, 461) +script = ExtResource("6_dfxqv") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue4"] +position = Vector2(55, 38) +shape = SubResource("CircleShape2D_eo4rb") + +[node name="Label" type="Label" parent="Clue4"] +offset_right = 40.0 +offset_bottom = 23.0 + +[node name="SunStarIcon4" type="Sprite2D" parent="Clue4"] +position = Vector2(57, 41) +texture = ExtResource("8_2enxe") + +[node name="Clue5" type="Area2D" parent="."] +position = Vector2(945, 57) +script = ExtResource("7_s042v") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue5"] +position = Vector2(46, 23) +shape = SubResource("CircleShape2D_ohvj2") + +[node name="Label" type="Label" parent="Clue5"] +offset_left = -37.0 +offset_top = 72.0 +offset_right = 3.0 +offset_bottom = 95.0 + +[node name="SunStarIcon5" type="Sprite2D" parent="Clue5"] +position = Vector2(49, 25) +texture = ExtResource("8_2enxe") + +[node name="answer" type="Area2D" parent="."] +position = Vector2(37, 240) +script = ExtResource("8_yubbe") + +[node name="SunStarIcon" type="Sprite2D" parent="answer"] +position = Vector2(-15, 85) +texture = ExtResource("8_2enxe") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="answer"] +position = Vector2(-16, 84) +shape = SubResource("RectangleShape2D_wmj16") + +[node name="Panel" type="Panel" parent="answer"] +offset_left = 42.0 +offset_top = -221.0 +offset_right = 1039.0 +offset_bottom = 396.0 + +[node name="Label" type="Label" parent="answer/Panel"] +layout_mode = 0 +offset_left = 220.0 +offset_top = 27.0 +offset_right = 789.0 +offset_bottom = 125.0 +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Body" type="Label" parent="answer/Panel"] +layout_mode = 0 +offset_left = 14.0 +offset_top = 132.0 +offset_right = 981.0 +offset_bottom = 417.0 +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Ans1" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 524.0 +offset_top = 544.0 +offset_right = 747.0 +offset_bottom = 602.0 +text = "Vega" + +[node name="Ans2" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 230.0 +offset_top = 542.0 +offset_right = 453.0 +offset_bottom = 600.0 +text = "Sirius" + +[node name="Ans3" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 521.0 +offset_top = 456.0 +offset_right = 744.0 +offset_bottom = 514.0 +text = "Altair" + +[node name="Ans4" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 233.0 +offset_top = 456.0 +offset_right = 456.0 +offset_bottom = 514.0 +text = "Sun" + +[node name="Return" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 649.0 +offset_top = 786.0 +offset_right = 795.0 +offset_bottom = 872.0 +text = "Return to cockpit!" + +[connection signal="finished" from="Starry background/Background" to="Starry background" method="_on_background_finished"] +[connection signal="body_entered" from="Clue1" to="Clue1" method="_on_body_entered"] +[connection signal="body_exited" from="Clue1" to="Clue1" method="_on_body_exited"] +[connection signal="body_entered" from="Clue2" to="Clue2" method="_on_body_entered"] +[connection signal="body_exited" from="Clue2" to="Clue2" method="_on_body_exited"] +[connection signal="body_entered" from="Clue3" to="Clue3" method="_on_body_entered"] +[connection signal="body_exited" from="Clue3" to="Clue3" method="_on_body_exited"] +[connection signal="body_entered" from="Clue4" to="Clue4" method="_on_body_entered"] +[connection signal="body_exited" from="Clue4" to="Clue4" method="_on_body_exited"] +[connection signal="body_entered" from="Clue5" to="Clue5" method="_on_body_entered"] +[connection signal="body_exited" from="Clue5" to="Clue5" method="_on_body_exited"] +[connection signal="body_entered" from="answer" to="answer" method="_on_body_entered"] +[connection signal="body_exited" from="answer" to="answer" method="_on_body_exited"] +[connection signal="pressed" from="answer/Panel/Ans1" to="answer" method="_on_ans_1_pressed"] +[connection signal="pressed" from="answer/Panel/Ans2" to="answer" method="_on_ans_2_pressed"] +[connection signal="pressed" from="answer/Panel/Ans3" to="answer" method="_on_ans_3_pressed"] +[connection signal="pressed" from="answer/Panel/Ans4" to="Starry background" method="_on_ans_4_pressed"] +[connection signal="pressed" from="answer/Panel/Ans4" to="answer" method="_on_ans_4_pressed"] +[connection signal="pressed" from="answer/Panel/Return" to="answer" method="_on_return_pressed"] diff --git a/scenes/stages/stage2.tscn b/scenes/stages/stage2.tscn new file mode 100644 index 0000000..26eb110 --- /dev/null +++ b/scenes/stages/stage2.tscn @@ -0,0 +1,299 @@ +[gd_scene load_steps=29 format=3 uid="uid://dvanpqruglgkd"] + +[ext_resource type="Texture2D" uid="uid://ceo8fmyqrium1" path="res://sprites/Stars sheet.png" id="1_uk30u"] +[ext_resource type="Script" path="res://scripts/Starry background.gd" id="2_6xdch"] +[ext_resource type="AudioStream" uid="uid://dfaswthopohch" path="res://audio/The Journey (final ver.).mp3" id="3_0g6qg"] +[ext_resource type="Script" path="res://scripts/Player.gd" id="4_n20oe"] +[ext_resource type="Texture2D" uid="uid://dhgvwxivav0sa" path="res://sprites/Astronaut Sprite 1 fire.png" id="5_hgogw"] +[ext_resource type="Script" path="res://scripts/Stage2/Clue1.gd" id="6_8v7fc"] +[ext_resource type="Texture2D" uid="uid://dxr0ynox11apr" path="res://sprites/sun star icon.png" id="7_0r5pq"] +[ext_resource type="Texture2D" uid="uid://chprpjr43mx04" path="res://sprites/Polaris.png" id="7_ec3y8"] +[ext_resource type="Script" path="res://scripts/Stage2/Clue2.gd" id="8_i7dl7"] +[ext_resource type="Script" path="res://scripts/Stage2/Clue3.gd" id="9_c5eqc"] +[ext_resource type="Script" path="res://scripts/Stage2/Clue4.gd" id="10_wpwbu"] +[ext_resource type="Script" path="res://scripts/Stage2/Clue5.gd" id="11_rlvsd"] +[ext_resource type="Script" path="res://scripts/Stage2/AnswerGUI.gd" id="12_o6d3n"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_0fy8c"] +atlas = ExtResource("1_uk30u") +region = Rect2(0, 0, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xvvmv"] +atlas = ExtResource("1_uk30u") +region = Rect2(640, 0, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_byc1j"] +atlas = ExtResource("1_uk30u") +region = Rect2(1280, 0, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y3keh"] +atlas = ExtResource("1_uk30u") +region = Rect2(0, 320, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jn0gr"] +atlas = ExtResource("1_uk30u") +region = Rect2(640, 320, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yg5i2"] +atlas = ExtResource("1_uk30u") +region = Rect2(1280, 320, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_u5ugd"] +atlas = ExtResource("1_uk30u") +region = Rect2(0, 640, 640, 320) + +[sub_resource type="SpriteFrames" id="SpriteFrames_uwnlw"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_0fy8c") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xvvmv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_byc1j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_y3keh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jn0gr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yg5i2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_u5ugd") +}], +"loop": true, +"name": &"stars", +"speed": 5.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_3myi4"] +size = Vector2(138, 151) + +[sub_resource type="CircleShape2D" id="CircleShape2D_agvig"] +radius = 31.0 + +[sub_resource type="CircleShape2D" id="CircleShape2D_wofwh"] +radius = 36.0555 + +[sub_resource type="CircleShape2D" id="CircleShape2D_3rrcl"] +radius = 41.3038 + +[sub_resource type="CircleShape2D" id="CircleShape2D_eo4rb"] +radius = 35.5106 + +[sub_resource type="CircleShape2D" id="CircleShape2D_ohvj2"] +radius = 39.4588 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_wmj16"] +size = Vector2(42, 648) + +[node name="Node2D" type="Node2D"] + +[node name="Starry background" type="AnimatedSprite2D" parent="."] +position = Vector2(576, 324.5) +scale = Vector2(1.8, 2.02188) +sprite_frames = SubResource("SpriteFrames_uwnlw") +animation = &"stars" +frame = 6 +script = ExtResource("2_6xdch") + +[node name="Background" type="AudioStreamPlayer" parent="Starry background"] +stream = ExtResource("3_0g6qg") +autoplay = true + +[node name="Player" type="CharacterBody2D" parent="." groups=["player"]] +script = ExtResource("4_n20oe") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"] +position = Vector2(1003, 509.5) +shape = SubResource("RectangleShape2D_3myi4") + +[node name="Sprite2D" type="Sprite2D" parent="Player"] +position = Vector2(1003, 509.476) +scale = Vector2(0.460317, 0.460317) +texture = ExtResource("5_hgogw") + +[node name="Clue1" type="Area2D" parent="."] +position = Vector2(198, 31) +script = ExtResource("6_8v7fc") + +[node name="SunStarIcon" type="Sprite2D" parent="Clue1"] +position = Vector2(36, 43) +texture = ExtResource("7_0r5pq") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue1"] +position = Vector2(37, 40) +shape = SubResource("CircleShape2D_agvig") + +[node name="Polaris" type="Sprite2D" parent="Clue1"] +position = Vector2(139, 40) +texture = ExtResource("7_ec3y8") + +[node name="Clue2" type="Area2D" parent="."] +position = Vector2(549, 75) +script = ExtResource("8_i7dl7") + +[node name="SunStarIcon2" type="Sprite2D" parent="Clue2"] +position = Vector2(55, 18) +texture = ExtResource("7_0r5pq") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue2"] +position = Vector2(54, 18) +shape = SubResource("CircleShape2D_wofwh") + +[node name="Label" type="Label" parent="Clue2"] +offset_left = 94.0 +offset_top = 5.0 +offset_right = 134.0 +offset_bottom = 28.0 + +[node name="Clue3" type="Area2D" parent="."] +position = Vector2(296, 468) +script = ExtResource("9_c5eqc") + +[node name="SunStarIcon3" type="Sprite2D" parent="Clue3"] +position = Vector2(43, 47) +texture = ExtResource("7_0r5pq") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue3"] +position = Vector2(44, 44) +shape = SubResource("CircleShape2D_3rrcl") + +[node name="Label" type="Label" parent="Clue3"] +offset_right = 40.0 +offset_bottom = 23.0 + +[node name="Clue4" type="Area2D" parent="."] +position = Vector2(718, 461) +script = ExtResource("10_wpwbu") + +[node name="SunStarIcon4" type="Sprite2D" parent="Clue4"] +position = Vector2(57, 41) +texture = ExtResource("7_0r5pq") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue4"] +position = Vector2(55, 38) +shape = SubResource("CircleShape2D_eo4rb") + +[node name="Label" type="Label" parent="Clue4"] +offset_right = 40.0 +offset_bottom = 23.0 + +[node name="Clue5" type="Area2D" parent="."] +position = Vector2(945, 57) +script = ExtResource("11_rlvsd") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue5"] +position = Vector2(46, 23) +shape = SubResource("CircleShape2D_ohvj2") + +[node name="Label" type="Label" parent="Clue5"] +offset_left = -37.0 +offset_top = 72.0 +offset_right = 3.0 +offset_bottom = 95.0 + +[node name="SunStarIcon5" type="Sprite2D" parent="Clue5"] +position = Vector2(49, 25) +texture = ExtResource("7_0r5pq") + +[node name="answer" type="Area2D" parent="."] +position = Vector2(37, 240) +script = ExtResource("12_o6d3n") + +[node name="SunStarIcon" type="Sprite2D" parent="answer"] +position = Vector2(-15, 85) +texture = ExtResource("7_0r5pq") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="answer"] +position = Vector2(-16, 84) +shape = SubResource("RectangleShape2D_wmj16") + +[node name="Panel" type="Panel" parent="answer"] +offset_left = 42.0 +offset_top = -221.0 +offset_right = 1039.0 +offset_bottom = 396.0 + +[node name="Label" type="Label" parent="answer/Panel"] +layout_mode = 0 +offset_left = 220.0 +offset_top = 27.0 +offset_right = 789.0 +offset_bottom = 125.0 +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Body" type="Label" parent="answer/Panel"] +layout_mode = 0 +offset_left = 14.0 +offset_top = 132.0 +offset_right = 981.0 +offset_bottom = 417.0 +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Ans1" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 524.0 +offset_top = 544.0 +offset_right = 747.0 +offset_bottom = 602.0 +text = "Polaris" + +[node name="Ans2" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 230.0 +offset_top = 542.0 +offset_right = 453.0 +offset_bottom = 600.0 +text = "Baekdu" + +[node name="Ans3" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 521.0 +offset_top = 456.0 +offset_right = 744.0 +offset_bottom = 514.0 +text = "Acubens" + +[node name="Ans4" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 233.0 +offset_top = 456.0 +offset_right = 456.0 +offset_bottom = 514.0 +text = "Achbird" + +[node name="Return" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 416.0 +offset_top = 330.0 +offset_right = 562.0 +offset_bottom = 416.0 +text = "Return to cockpit!" + +[connection signal="finished" from="Starry background/Background" to="Starry background" method="_on_background_finished"] +[connection signal="body_entered" from="Clue1" to="Clue1" method="_on_body_entered"] +[connection signal="body_exited" from="Clue1" to="Clue1" method="_on_body_exited"] +[connection signal="body_entered" from="Clue2" to="Clue2" method="_on_body_entered"] +[connection signal="body_exited" from="Clue2" to="Clue2" method="_on_body_exited"] +[connection signal="body_entered" from="Clue3" to="Clue3" method="_on_body_entered"] +[connection signal="body_exited" from="Clue3" to="Clue3" method="_on_body_exited"] +[connection signal="body_entered" from="Clue4" to="Clue4" method="_on_body_entered"] +[connection signal="body_exited" from="Clue4" to="Clue4" method="_on_body_exited"] +[connection signal="body_entered" from="Clue5" to="Clue5" method="_on_body_entered"] +[connection signal="body_exited" from="Clue5" to="Clue5" method="_on_body_exited"] +[connection signal="body_entered" from="answer" to="answer" method="_on_body_entered"] +[connection signal="body_exited" from="answer" to="answer" method="_on_body_exited"] +[connection signal="pressed" from="answer/Panel/Ans1" to="answer" method="_on_ans_1_pressed"] +[connection signal="pressed" from="answer/Panel/Ans2" to="answer" method="_on_ans_2_pressed"] +[connection signal="pressed" from="answer/Panel/Ans3" to="answer" method="_on_ans_3_pressed"] +[connection signal="pressed" from="answer/Panel/Ans4" to="Starry background" method="_on_ans_4_pressed"] +[connection signal="pressed" from="answer/Panel/Ans4" to="answer" method="_on_ans_4_pressed"] +[connection signal="pressed" from="answer/Panel/Return" to="answer" method="_on_return_pressed"] diff --git a/scenes/stages/stage3.tscn b/scenes/stages/stage3.tscn new file mode 100644 index 0000000..b7f224a --- /dev/null +++ b/scenes/stages/stage3.tscn @@ -0,0 +1,300 @@ +[gd_scene load_steps=29 format=3 uid="uid://g0s6gupgnnm4"] + +[ext_resource type="Texture2D" uid="uid://ceo8fmyqrium1" path="res://sprites/Stars sheet.png" id="1_gki22"] +[ext_resource type="Script" path="res://scripts/Starry background.gd" id="2_bemp2"] +[ext_resource type="AudioStream" uid="uid://dfaswthopohch" path="res://audio/The Journey (final ver.).mp3" id="3_wmn4s"] +[ext_resource type="Script" path="res://scripts/Player.gd" id="4_gesnn"] +[ext_resource type="Texture2D" uid="uid://dhgvwxivav0sa" path="res://sprites/Astronaut Sprite 1 fire.png" id="5_t54v5"] +[ext_resource type="Script" path="res://scripts/Stage3/Clue1.gd" id="6_b2ti4"] +[ext_resource type="Texture2D" uid="uid://blpw7bgteup87" path="res://sprites/Proxima centauri.png" id="7_6ylwy"] +[ext_resource type="Texture2D" uid="uid://dxr0ynox11apr" path="res://sprites/sun star icon.png" id="7_obvvx"] +[ext_resource type="Script" path="res://scripts/Stage3/Clue2.gd" id="8_p5yo5"] +[ext_resource type="Script" path="res://scripts/Stage3/Clue3.gd" id="9_5nq1p"] +[ext_resource type="Script" path="res://scripts/Stage3/Clue4.gd" id="10_xjp6g"] +[ext_resource type="Script" path="res://scripts/Stage3/Clue5.gd" id="11_6a8lr"] +[ext_resource type="Script" path="res://scripts/Stage3/AnswerGUI.gd" id="12_qhll2"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_0fy8c"] +atlas = ExtResource("1_gki22") +region = Rect2(0, 0, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xvvmv"] +atlas = ExtResource("1_gki22") +region = Rect2(640, 0, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_byc1j"] +atlas = ExtResource("1_gki22") +region = Rect2(1280, 0, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y3keh"] +atlas = ExtResource("1_gki22") +region = Rect2(0, 320, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jn0gr"] +atlas = ExtResource("1_gki22") +region = Rect2(640, 320, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yg5i2"] +atlas = ExtResource("1_gki22") +region = Rect2(1280, 320, 640, 320) + +[sub_resource type="AtlasTexture" id="AtlasTexture_u5ugd"] +atlas = ExtResource("1_gki22") +region = Rect2(0, 640, 640, 320) + +[sub_resource type="SpriteFrames" id="SpriteFrames_uwnlw"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_0fy8c") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xvvmv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_byc1j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_y3keh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jn0gr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yg5i2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_u5ugd") +}], +"loop": true, +"name": &"stars", +"speed": 5.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_3myi4"] +size = Vector2(138, 151) + +[sub_resource type="CircleShape2D" id="CircleShape2D_agvig"] +radius = 31.0 + +[sub_resource type="CircleShape2D" id="CircleShape2D_wofwh"] +radius = 36.0555 + +[sub_resource type="CircleShape2D" id="CircleShape2D_3rrcl"] +radius = 41.3038 + +[sub_resource type="CircleShape2D" id="CircleShape2D_eo4rb"] +radius = 35.5106 + +[sub_resource type="CircleShape2D" id="CircleShape2D_ohvj2"] +radius = 39.4588 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_wmj16"] +size = Vector2(42, 648) + +[node name="Node2D" type="Node2D"] + +[node name="Starry background" type="AnimatedSprite2D" parent="."] +position = Vector2(576, 324.5) +scale = Vector2(1.8, 2.02188) +sprite_frames = SubResource("SpriteFrames_uwnlw") +animation = &"stars" +frame = 6 +script = ExtResource("2_bemp2") + +[node name="Background" type="AudioStreamPlayer" parent="Starry background"] +stream = ExtResource("3_wmn4s") +autoplay = true + +[node name="Player" type="CharacterBody2D" parent="." groups=["player"]] +script = ExtResource("4_gesnn") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"] +position = Vector2(1003, 509.5) +shape = SubResource("RectangleShape2D_3myi4") + +[node name="Sprite2D" type="Sprite2D" parent="Player"] +position = Vector2(1003, 509.476) +scale = Vector2(0.460317, 0.460317) +texture = ExtResource("5_t54v5") + +[node name="Clue1" type="Area2D" parent="."] +position = Vector2(198, 31) +script = ExtResource("6_b2ti4") + +[node name="SunStarIcon" type="Sprite2D" parent="Clue1"] +position = Vector2(36, 43) +texture = ExtResource("7_obvvx") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue1"] +position = Vector2(37, 40) +shape = SubResource("CircleShape2D_agvig") + +[node name="Proxima" type="Sprite2D" parent="Clue1"] +position = Vector2(139, 40) +texture = ExtResource("7_6ylwy") + +[node name="Clue2" type="Area2D" parent="."] +position = Vector2(549, 75) +script = ExtResource("8_p5yo5") + +[node name="SunStarIcon2" type="Sprite2D" parent="Clue2"] +position = Vector2(55, 18) +texture = ExtResource("7_obvvx") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue2"] +position = Vector2(54, 18) +shape = SubResource("CircleShape2D_wofwh") + +[node name="Label" type="Label" parent="Clue2"] +offset_left = 94.0 +offset_top = 5.0 +offset_right = 134.0 +offset_bottom = 28.0 + +[node name="Clue3" type="Area2D" parent="."] +position = Vector2(296, 468) +script = ExtResource("9_5nq1p") + +[node name="SunStarIcon3" type="Sprite2D" parent="Clue3"] +position = Vector2(43, 47) +texture = ExtResource("7_obvvx") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue3"] +position = Vector2(44, 44) +shape = SubResource("CircleShape2D_3rrcl") + +[node name="Label" type="Label" parent="Clue3"] +offset_right = 40.0 +offset_bottom = 23.0 + +[node name="Clue4" type="Area2D" parent="."] +position = Vector2(718, 461) +script = ExtResource("10_xjp6g") + +[node name="SunStarIcon4" type="Sprite2D" parent="Clue4"] +position = Vector2(57, 41) +texture = ExtResource("7_obvvx") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue4"] +position = Vector2(55, 38) +shape = SubResource("CircleShape2D_eo4rb") + +[node name="Label" type="Label" parent="Clue4"] +offset_right = 40.0 +offset_bottom = 23.0 + +[node name="Clue5" type="Area2D" parent="."] +position = Vector2(945, 57) +script = ExtResource("11_6a8lr") + +[node name="SunStarIcon5" type="Sprite2D" parent="Clue5"] +position = Vector2(49, 25) +texture = ExtResource("7_obvvx") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Clue5"] +position = Vector2(46, 23) +shape = SubResource("CircleShape2D_ohvj2") + +[node name="Label" type="Label" parent="Clue5"] +offset_left = -37.0 +offset_top = 72.0 +offset_right = 3.0 +offset_bottom = 95.0 + +[node name="answer" type="Area2D" parent="."] +position = Vector2(37, 240) +script = ExtResource("12_qhll2") + +[node name="SunStarIcon" type="Sprite2D" parent="answer"] +position = Vector2(-15, 85) +texture = ExtResource("7_obvvx") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="answer"] +position = Vector2(-16, 84) +shape = SubResource("RectangleShape2D_wmj16") + +[node name="Panel" type="Panel" parent="answer"] +visible = false +offset_left = 42.0 +offset_top = -221.0 +offset_right = 1039.0 +offset_bottom = 396.0 + +[node name="Label" type="Label" parent="answer/Panel"] +layout_mode = 0 +offset_left = 220.0 +offset_top = 27.0 +offset_right = 789.0 +offset_bottom = 125.0 +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Body" type="Label" parent="answer/Panel"] +layout_mode = 0 +offset_left = 14.0 +offset_top = 132.0 +offset_right = 981.0 +offset_bottom = 417.0 +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Ans1" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 524.0 +offset_top = 544.0 +offset_right = 747.0 +offset_bottom = 602.0 +text = "Polaris" + +[node name="Ans2" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 230.0 +offset_top = 542.0 +offset_right = 453.0 +offset_bottom = 600.0 +text = "Baekdu" + +[node name="Ans3" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 521.0 +offset_top = 456.0 +offset_right = 744.0 +offset_bottom = 514.0 +text = "Proxima centauri" + +[node name="Ans4" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 233.0 +offset_top = 456.0 +offset_right = 456.0 +offset_bottom = 514.0 +text = "Spica" + +[node name="Return" type="Button" parent="answer/Panel"] +layout_mode = 0 +offset_left = 416.0 +offset_top = 330.0 +offset_right = 562.0 +offset_bottom = 416.0 +text = "Return to cockpit!" + +[connection signal="finished" from="Starry background/Background" to="Starry background" method="_on_background_finished"] +[connection signal="body_entered" from="Clue1" to="Clue1" method="_on_body_entered"] +[connection signal="body_exited" from="Clue1" to="Clue1" method="_on_body_exited"] +[connection signal="body_entered" from="Clue2" to="Clue2" method="_on_body_entered"] +[connection signal="body_exited" from="Clue2" to="Clue2" method="_on_body_exited"] +[connection signal="body_entered" from="Clue3" to="Clue3" method="_on_body_entered"] +[connection signal="body_exited" from="Clue3" to="Clue3" method="_on_body_exited"] +[connection signal="body_entered" from="Clue4" to="Clue4" method="_on_body_entered"] +[connection signal="body_exited" from="Clue4" to="Clue4" method="_on_body_exited"] +[connection signal="body_entered" from="Clue5" to="Clue5" method="_on_body_entered"] +[connection signal="body_exited" from="Clue5" to="Clue5" method="_on_body_exited"] +[connection signal="body_entered" from="answer" to="answer" method="_on_body_entered"] +[connection signal="body_exited" from="answer" to="answer" method="_on_body_exited"] +[connection signal="pressed" from="answer/Panel/Ans1" to="answer" method="_on_ans_1_pressed"] +[connection signal="pressed" from="answer/Panel/Ans2" to="answer" method="_on_ans_2_pressed"] +[connection signal="pressed" from="answer/Panel/Ans3" to="answer" method="_on_ans_3_pressed"] +[connection signal="pressed" from="answer/Panel/Ans4" to="Starry background" method="_on_ans_4_pressed"] +[connection signal="pressed" from="answer/Panel/Ans4" to="answer" method="_on_ans_4_pressed"] +[connection signal="pressed" from="answer/Panel/Return" to="answer" method="_on_return_pressed"] diff --git a/scenes/start_button.tscn b/scenes/start_button.tscn new file mode 100644 index 0000000..5af127e --- /dev/null +++ b/scenes/start_button.tscn @@ -0,0 +1,49 @@ +[gd_scene load_steps=6 format=3 uid="uid://ij081mw11vmd"] + +[ext_resource type="Script" path="res://scripts/scene_transition.gd" id="1_0qwew"] +[ext_resource type="Texture2D" uid="uid://dv8rqv5yof8nd" path="res://sprites/Start button unclicked.png" id="1_u3ucj"] +[ext_resource type="Texture2D" uid="uid://g0prqcwksx5u" path="res://sprites/Start button clicked.png" id="2_32y8s"] +[ext_resource type="AudioStream" uid="uid://cr5j12earedb1" path="res://audio/The Journey (op screen).mp3" id="2_numg5"] +[ext_resource type="Texture2D" uid="uid://dr5vhsbws65av" path="res://sprites/Title Screen Space.png" id="3_em3l2"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 469.0 +offset_top = 515.0 +offset_right = -427.0 +offset_bottom = -5.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_0qwew") + +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +stream = ExtResource("2_numg5") + +[node name="TitleScreenSpace" type="Sprite2D" parent="."] +position = Vector2(107, -191) +scale = Vector2(2.45106, 2.4) +texture = ExtResource("3_em3l2") + +[node name="TextureButton" type="TextureButton" parent="."] +layout_mode = 0 +offset_top = 5.0 +offset_right = 256.0 +offset_bottom = 133.0 +action_mode = 0 +texture_normal = ExtResource("1_u3ucj") +texture_pressed = ExtResource("2_32y8s") + +[node name="Label" type="Label" parent="."] +layout_mode = 0 +offset_left = 77.0 +offset_top = -515.0 +offset_right = 184.0 +offset_bottom = -463.0 +text = "Star Jump" +horizontal_alignment = 1 +vertical_alignment = 1 + +[connection signal="finished" from="AudioStreamPlayer" to="." method="_on_audio_stream_player_finished"] diff --git a/script.gd b/script.gd deleted file mode 100644 index 1d79dca..0000000 --- a/script.gd +++ /dev/null @@ -1,15 +0,0 @@ -extends Node - -var quizzed = [1, 2, 3] -const 1_ANSWER = "" -const 2_ANSWER = "" -const 3_ANSWER = "" - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass diff --git a/scripts/Main.gd b/scripts/Main.gd new file mode 100644 index 0000000..4b8abe8 --- /dev/null +++ b/scripts/Main.gd @@ -0,0 +1,34 @@ +extends Node2D + +#@onready var checkpoint_gui = preload("res://scenes/checkpoint.tscn").instance() +# Called when the node enters the scene tree for the first time. +func _ready(): + load_scene("res://scenes/start_button.tscn") + #add_child(checkpoint_gui) + + # Using this logic for multiple "checkpoints" + for checkpoint in get_tree().get_nodes_in_group("checkpoints"): + checkpoint.connect("checkpoint_reached", Callable(self, "_on_checkpoint_reached")) + +func load_scene(scene_path): + # Load the new scene + var new_scene = load(scene_path).instantiate() + + # Get the current scene (the first child of the root) + var current_scene = get_tree().root.get_child(0) + + # Remove the current scene if it exists + if current_scene: + current_scene.queue_free() + + # Add the new scene as a child of the root node + get_tree().root.add_child.call_deferred(new_scene) + new_scene.owner = get_tree().root + +func _on_checkpoint_reached(): + #checkpoint_gui.show_message("Checkpoint Reached", "You have reached a checkpoint.", Callable(self, "_checkpoint_callback")) + pass + +func _checkpoint_callback(): + # Add logic to handle what happens after the checkpoint message is dismissed + print("Checkpoint acknowledged") diff --git a/scripts/Player.gd b/scripts/Player.gd new file mode 100644 index 0000000..4fd3e72 --- /dev/null +++ b/scripts/Player.gd @@ -0,0 +1,32 @@ +extends CharacterBody2D + +const SPEED = 300.0 +#const JUMP_VELOCITY = -400.0 + +# Get the gravity from the project settings to be synced with RigidBody nodes. +#var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") + +@onready var sprite = $Sprite2D + +func _physics_process(delta): + # Add the gravity (not needed but still here for future reference). + #if not is_on_floor(): + #velocity.y += gravity * delta + + # Get the input direction and handle the movement/deceleration. + # Handle up and downs. + var lift = Input.get_axis("ui_up", "ui_down") + if lift != 0: + velocity.y = lift * SPEED + else: + velocity.y = move_toward(velocity.y, 0, SPEED * delta) + + # Get the input direction and handle the movement/deceleration. + # Handle left and rights + var direction = Input.get_axis("ui_left", "ui_right") + if direction != 0: + velocity.x = direction * SPEED + else: + velocity.x = move_toward(velocity.x, 0, SPEED * delta) + + move_and_slide() diff --git a/scripts/Stage1/AnswerGUI.gd b/scripts/Stage1/AnswerGUI.gd new file mode 100644 index 0000000..80a34bd --- /dev/null +++ b/scripts/Stage1/AnswerGUI.gd @@ -0,0 +1,64 @@ +extends Area2D + +@onready var panel = $Panel +@onready var heading = $Panel/Label +@onready var middle = $Panel/Body +@onready var Ans1 = $Panel/Ans1 +@onready var Ans2 = $Panel/Ans2 +@onready var Ans3 = $Panel/Ans3 +@onready var Ans4 = $Panel/Ans4 +@onready var cockpit_button = $Panel/Return + +func _ready(): + heading.text = "QUIZ!" + middle.text = "Which star are you on?" + panel.visible = false + heading.visible_characters = 0 + middle.visible_characters = 0 + Ans1.visible = false + Ans2.visible = false + Ans3.visible = false + Ans4.visible = false + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + panel.visible = true + heading.visible_characters = -1 + middle.visible_characters = -1 + Ans1.visible = true + Ans2.visible = true + Ans3.visible = true + Ans4.visible = true + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + panel.visible = false + heading.visible_characters = 0 + middle.visible_characters = 0 + Ans1.visible = false + Ans2.visible = false + Ans3.visible = false + Ans4.visible = false + +func _on_ans_4_pressed(): + middle.text = "Correct!" + heading.visible_characters = 0 + Ans1.visible = false + Ans2.visible = false + Ans3.visible = false + Ans4.visible = false + cockpit_button.visible = true + +func _on_ans_1_pressed(): + middle.text = "Incorrect!" + +func _on_ans_2_pressed(): + middle.text = "Incorrect!" + +func _on_ans_3_pressed(): + middle.text = "Incorrect!" + +func _on_return_pressed(): + get_tree().change_scene_to_file("res://scenes/cockpit.tscn") diff --git a/scripts/Stage1/Clue1.gd b/scripts/Stage1/Clue1.gd new file mode 100644 index 0000000..ec1c43f --- /dev/null +++ b/scripts/Stage1/Clue1.gd @@ -0,0 +1,16 @@ +extends Area2D + +@onready var hint = $Sun + +func _ready(): + hint.visible = false + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + hint.visible = true + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + hint.visible = false diff --git a/scripts/Stage1/Clue2.gd b/scripts/Stage1/Clue2.gd new file mode 100644 index 0000000..252d18d --- /dev/null +++ b/scripts/Stage1/Clue2.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "It's the star closest to Earth!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage1/Clue3.gd b/scripts/Stage1/Clue3.gd new file mode 100644 index 0000000..e917018 --- /dev/null +++ b/scripts/Stage1/Clue3.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "It's a giant gas ball!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage1/Clue4.gd b/scripts/Stage1/Clue4.gd new file mode 100644 index 0000000..ee17f3d --- /dev/null +++ b/scripts/Stage1/Clue4.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "The Moon reflects its light sometimes!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage1/Clue5.gd b/scripts/Stage1/Clue5.gd new file mode 100644 index 0000000..d35e1db --- /dev/null +++ b/scripts/Stage1/Clue5.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "The entire Milky Way revolves around this!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage2/AnswerGUI.gd b/scripts/Stage2/AnswerGUI.gd new file mode 100644 index 0000000..b904cbb --- /dev/null +++ b/scripts/Stage2/AnswerGUI.gd @@ -0,0 +1,66 @@ +extends Area2D + +@onready var panel = $Panel +@onready var heading = $Panel/Label +@onready var middle = $Panel/Body +@onready var Ans1 = $Panel/Ans1 +@onready var Ans2 = $Panel/Ans2 +@onready var Ans3 = $Panel/Ans3 +@onready var Ans4 = $Panel/Ans4 +@onready var cockpit_button = $Panel/Return + +func _ready(): + heading.text = "QUIZ!" + middle.text = "Which star are you on?" + panel.visible = false + heading.visible_characters = 0 + middle.visible_characters = 0 + Ans1.visible = false + Ans2.visible = false + Ans3.visible = false + Ans4.visible = false + cockpit_button.visible = false + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + panel.visible = true + heading.visible_characters = -1 + middle.visible_characters = -1 + Ans1.visible = true + Ans2.visible = true + Ans3.visible = true + Ans4.visible = true + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + panel.visible = false + heading.visible_characters = 0 + middle.visible_characters = 0 + Ans1.visible = false + Ans2.visible = false + Ans3.visible = false + Ans4.visible = false + +func _on_ans_1_pressed(): + middle.text = "Correct!" + heading.visible_characters = 0 + Ans1.visible = false + Ans2.visible = false + Ans3.visible = false + Ans4.visible = false + cockpit_button.visible = true + +func _on_ans_4_pressed(): + middle.text = "Incorrect!" + +func _on_ans_2_pressed(): + middle.text = "Incorrect!" + +func _on_ans_3_pressed(): + middle.text = "Incorrect!" + + +func _on_return_pressed(): + get_tree().change_scene_to_file("res://scenes/cockpit.tscn") diff --git a/scripts/Stage2/Clue1.gd b/scripts/Stage2/Clue1.gd new file mode 100644 index 0000000..ca29c2b --- /dev/null +++ b/scripts/Stage2/Clue1.gd @@ -0,0 +1,16 @@ +extends Area2D + +@onready var hint = $Polaris + +func _ready(): + hint.visible = false + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + hint.visible = true + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + hint.visible = false diff --git a/scripts/Stage2/Clue2.gd b/scripts/Stage2/Clue2.gd new file mode 100644 index 0000000..231b3ca --- /dev/null +++ b/scripts/Stage2/Clue2.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "This is a star that is part of the Ursa Minor constellation!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage2/Clue3.gd b/scripts/Stage2/Clue3.gd new file mode 100644 index 0000000..b6d94d5 --- /dev/null +++ b/scripts/Stage2/Clue3.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "The distance from it and the Sun is approimately 700,00km!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage2/Clue4.gd b/scripts/Stage2/Clue4.gd new file mode 100644 index 0000000..14546af --- /dev/null +++ b/scripts/Stage2/Clue4.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "It stands in the same spot all night!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage2/Clue5.gd b/scripts/Stage2/Clue5.gd new file mode 100644 index 0000000..06a7b33 --- /dev/null +++ b/scripts/Stage2/Clue5.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "This star has been reliable in finding North!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage3/AnswerGUI.gd b/scripts/Stage3/AnswerGUI.gd new file mode 100644 index 0000000..f082244 --- /dev/null +++ b/scripts/Stage3/AnswerGUI.gd @@ -0,0 +1,66 @@ +extends Area2D + +@onready var panel = $Panel +@onready var heading = $Panel/Label +@onready var middle = $Panel/Body +@onready var Ans1 = $Panel/Ans1 +@onready var Ans2 = $Panel/Ans2 +@onready var Ans3 = $Panel/Ans3 +@onready var Ans4 = $Panel/Ans4 +@onready var cockpit_button = $Panel/Return + +func _ready(): + heading.text = "QUIZ!" + middle.text = "Which star are you on?" + panel.visible = false + heading.visible_characters = 0 + middle.visible_characters = 0 + Ans1.visible = false + Ans2.visible = false + Ans3.visible = false + Ans4.visible = false + cockpit_button.visible = false + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + panel.visible = true + heading.visible_characters = -1 + middle.visible_characters = -1 + Ans1.visible = true + Ans2.visible = true + Ans3.visible = true + Ans4.visible = true + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + panel.visible = false + heading.visible_characters = 0 + middle.visible_characters = 0 + Ans1.visible = false + Ans2.visible = false + Ans3.visible = false + Ans4.visible = false + +func _on_ans_3_pressed(): + middle.text = "Correct!" + heading.visible_characters = 0 + Ans1.visible = false + Ans2.visible = false + Ans3.visible = false + Ans4.visible = false + cockpit_button.visible = true + +func _on_ans_4_pressed(): + middle.text = "Incorrect!" + +func _on_ans_2_pressed(): + middle.text = "Incorrect!" + +func _on_ans_1_pressed(): + middle.text = "Incorrect!" + + +func _on_return_pressed(): + get_tree().change_scene_to_file("res://scenes/cockpit.tscn") diff --git a/scripts/Stage3/Clue1.gd b/scripts/Stage3/Clue1.gd new file mode 100644 index 0000000..6cb2a39 --- /dev/null +++ b/scripts/Stage3/Clue1.gd @@ -0,0 +1,16 @@ +extends Area2D + +@onready var hint = $Proxima + +func _ready(): + hint.visible = false + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + hint.visible = true + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + hint.visible = false diff --git a/scripts/Stage3/Clue2.gd b/scripts/Stage3/Clue2.gd new file mode 100644 index 0000000..0a234fb --- /dev/null +++ b/scripts/Stage3/Clue2.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "This star is the closest one to the Sun!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage3/Clue3.gd b/scripts/Stage3/Clue3.gd new file mode 100644 index 0000000..36ddc8d --- /dev/null +++ b/scripts/Stage3/Clue3.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "It is a red dwarf star." + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage3/Clue4.gd b/scripts/Stage3/Clue4.gd new file mode 100644 index 0000000..8081041 --- /dev/null +++ b/scripts/Stage3/Clue4.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "It is located in the southern constellation of Centaurus!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Stage3/Clue5.gd b/scripts/Stage3/Clue5.gd new file mode 100644 index 0000000..06a7b33 --- /dev/null +++ b/scripts/Stage3/Clue5.gd @@ -0,0 +1,17 @@ +extends Area2D + +@onready var label = $Label + +func _ready(): + label.text = "This star has been reliable in finding North!" + label.visible_characters = 0 + +# Showing text when the player enters the area +func _on_body_entered(body): + if body.is_in_group("player"): # The player-character is in a group called "player" + label.visible_characters = -1 + +# Hiding text when the player exits the area +func _on_body_exited(body): + if body.is_in_group("player"): + label.visible_characters = 0 diff --git a/scripts/Starry background.gd b/scripts/Starry background.gd new file mode 100644 index 0000000..ee284ea --- /dev/null +++ b/scripts/Starry background.gd @@ -0,0 +1,18 @@ +extends AnimatedSprite2D + +@onready var audio_player = $Background + +# Called when the node enters the scene tree for the first time. +func _ready(): + set_autoplay('stars') + audio_player.play() + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + get_autoplay() + +func _on_ans_4_pressed(): + audio_player.stop() + +func _on_background_finished(): + audio_player.play() diff --git a/scripts/cockpit.gd b/scripts/cockpit.gd new file mode 100644 index 0000000..00f3ca3 --- /dev/null +++ b/scripts/cockpit.gd @@ -0,0 +1,20 @@ +extends Node2D + +@onready var sun = $Sun +@onready var polaris = $Polaris +@onready var proxima = $Proxima_centauri + +# Called when the node enters the scene tree for the first time. +func _ready(): + sun.connect("button_up", Callable(self, "_on_sun_button_pressed")) + polaris.connect("button_up", Callable(self, "_on_polaris_button_pressed")) + proxima.connect("button_up", Callable(self, "_on_proxima_button_pressed")) + +func _on_sun_button_pressed(): + get_tree().change_scene_to_file("res://scenes/stages/stage1.tscn") + +func _on_polaris_button_pressed(): + get_tree().change_scene_to_file("res://scenes/stages/stage2.tscn") + +func _on_proxima_button_pressed(): + get_tree().change_scene_to_file("res://scenes/stages/stage3.tscn") diff --git a/scripts/scene_transition.gd b/scripts/scene_transition.gd new file mode 100644 index 0000000..ac1f87c --- /dev/null +++ b/scripts/scene_transition.gd @@ -0,0 +1,23 @@ +extends Control + +@onready var audio_player = $AudioStreamPlayer +@onready var button_node = $TextureButton + +func _ready(): + # Check if button_node is valid before connecting + if button_node: + # Play audio once scene is ready + audio_player.play() + # Connect the 'pressed' signal from TextureButton to '_on_button_pressed' method in this script + button_node.connect("button_up", Callable(self, "_on_button_pressed")) + else: + print("TextureButton node not found or accessible.") + +func _on_button_pressed(): + # Debug line + print("Button pressed, stopping music and changing scenes!") + audio_player.stop() + get_tree().change_scene_to_file("res://scenes/cockpit.tscn") + +func _on_audio_stream_player_finished(): + audio_player.play() diff --git a/sprites/Astronaut Sprite 1 fire.png b/sprites/Astronaut Sprite 1 fire.png new file mode 100644 index 0000000..bc810b9 Binary files /dev/null and b/sprites/Astronaut Sprite 1 fire.png differ diff --git a/sprites/Astronaut Sprite 1.png b/sprites/Astronaut Sprite 1.png new file mode 100644 index 0000000..e4fdd09 Binary files /dev/null and b/sprites/Astronaut Sprite 1.png differ diff --git a/sprites/Inside cockpit area screen.png b/sprites/Inside cockpit area screen.png new file mode 100644 index 0000000..d04b225 Binary files /dev/null and b/sprites/Inside cockpit area screen.png differ diff --git a/sprites/Polaris.png b/sprites/Polaris.png new file mode 100644 index 0000000..01fa275 Binary files /dev/null and b/sprites/Polaris.png differ diff --git a/sprites/Proxima centauri.png b/sprites/Proxima centauri.png new file mode 100644 index 0000000..ebbc84e Binary files /dev/null and b/sprites/Proxima centauri.png differ diff --git a/sprites/Space 1.gif b/sprites/Space 1.gif new file mode 100644 index 0000000..f0b55b9 Binary files /dev/null and b/sprites/Space 1.gif differ diff --git a/sprites/Stars sheet.png b/sprites/Stars sheet.png new file mode 100644 index 0000000..98b6914 Binary files /dev/null and b/sprites/Stars sheet.png differ diff --git a/sprites/Start button clicked.png b/sprites/Start button clicked.png new file mode 100644 index 0000000..34e6a9e Binary files /dev/null and b/sprites/Start button clicked.png differ diff --git a/sprites/Start button unclicked.png b/sprites/Start button unclicked.png new file mode 100644 index 0000000..43ee60c Binary files /dev/null and b/sprites/Start button unclicked.png differ diff --git a/sprites/Sun.png b/sprites/Sun.png new file mode 100644 index 0000000..b48bded Binary files /dev/null and b/sprites/Sun.png differ diff --git a/sprites/Title Screen Space.png b/sprites/Title Screen Space.png new file mode 100644 index 0000000..1f1c1a9 Binary files /dev/null and b/sprites/Title Screen Space.png differ diff --git a/sprites/exit button clicked.png b/sprites/exit button clicked.png new file mode 100644 index 0000000..6c05f04 Binary files /dev/null and b/sprites/exit button clicked.png differ diff --git a/sprites/exit button unclicked.png b/sprites/exit button unclicked.png new file mode 100644 index 0000000..8978522 Binary files /dev/null and b/sprites/exit button unclicked.png differ diff --git a/sprites/polaris icon.png b/sprites/polaris icon.png new file mode 100644 index 0000000..89501e3 Binary files /dev/null and b/sprites/polaris icon.png differ diff --git a/sprites/proxima centauri icon.png b/sprites/proxima centauri icon.png new file mode 100644 index 0000000..2014b52 Binary files /dev/null and b/sprites/proxima centauri icon.png differ diff --git a/sprites/star background 1.gif b/sprites/star background 1.gif new file mode 100644 index 0000000..24b3c4d Binary files /dev/null and b/sprites/star background 1.gif differ diff --git a/sprites/sun star icon.png b/sprites/sun star icon.png new file mode 100644 index 0000000..5fff196 Binary files /dev/null and b/sprites/sun star icon.png differ