diff --git a/GFX/895pics/pic1.jpg.import b/GFX/895pics/pic1.jpg.import index 64e6c15..fdcdebc 100644 --- a/GFX/895pics/pic1.jpg.import +++ b/GFX/895pics/pic1.jpg.import @@ -4,15 +4,16 @@ importer="texture" type="CompressedTexture2D" uid="uid://cp5m56t5o58m0" path.s3tc="res://.godot/imported/pic1.jpg-ef2d2f1a1cefc5f1ab1f63a12db97fc0.s3tc.ctex" +path.etc2="res://.godot/imported/pic1.jpg-ef2d2f1a1cefc5f1ab1f63a12db97fc0.etc2.ctex" metadata={ -"imported_formats": ["s3tc_bptc"], +"imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true } [deps] source_file="res://GFX/895pics/pic1.jpg" -dest_files=["res://.godot/imported/pic1.jpg-ef2d2f1a1cefc5f1ab1f63a12db97fc0.s3tc.ctex"] +dest_files=["res://.godot/imported/pic1.jpg-ef2d2f1a1cefc5f1ab1f63a12db97fc0.s3tc.ctex", "res://.godot/imported/pic1.jpg-ef2d2f1a1cefc5f1ab1f63a12db97fc0.etc2.ctex"] [params] diff --git a/GFX/menu/menublack.jpg.import b/GFX/menu/menublack.jpg.import index 45ad5bf..f0ac2b8 100644 --- a/GFX/menu/menublack.jpg.import +++ b/GFX/menu/menublack.jpg.import @@ -4,15 +4,16 @@ importer="texture" type="CompressedTexture2D" uid="uid://xy3hyh74yji4" path.bptc="res://.godot/imported/menublack.jpg-8bd2d2b3eb0542aa67becafb7bf6019a.bptc.ctex" +path.astc="res://.godot/imported/menublack.jpg-8bd2d2b3eb0542aa67becafb7bf6019a.astc.ctex" metadata={ -"imported_formats": ["s3tc_bptc"], +"imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true } [deps] source_file="res://GFX/menu/menublack.jpg" -dest_files=["res://.godot/imported/menublack.jpg-8bd2d2b3eb0542aa67becafb7bf6019a.bptc.ctex"] +dest_files=["res://.godot/imported/menublack.jpg-8bd2d2b3eb0542aa67becafb7bf6019a.bptc.ctex", "res://.godot/imported/menublack.jpg-8bd2d2b3eb0542aa67becafb7bf6019a.astc.ctex"] [params] diff --git a/GFX/menu/menuwhite.jpg.import b/GFX/menu/menuwhite.jpg.import index baaa7b9..aa20cc3 100644 --- a/GFX/menu/menuwhite.jpg.import +++ b/GFX/menu/menuwhite.jpg.import @@ -4,15 +4,16 @@ importer="texture" type="CompressedTexture2D" uid="uid://bxdd1fe772nkk" path.bptc="res://.godot/imported/menuwhite.jpg-9bed3e33eac36cdfc592952d4d890e87.bptc.ctex" +path.astc="res://.godot/imported/menuwhite.jpg-9bed3e33eac36cdfc592952d4d890e87.astc.ctex" metadata={ -"imported_formats": ["s3tc_bptc"], +"imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true } [deps] source_file="res://GFX/menu/menuwhite.jpg" -dest_files=["res://.godot/imported/menuwhite.jpg-9bed3e33eac36cdfc592952d4d890e87.bptc.ctex"] +dest_files=["res://.godot/imported/menuwhite.jpg-9bed3e33eac36cdfc592952d4d890e87.bptc.ctex", "res://.godot/imported/menuwhite.jpg-9bed3e33eac36cdfc592952d4d890e87.astc.ctex"] [params] diff --git a/addons/ffmpeg/ffmpeg.gdextension b/addons/ffmpeg/ffmpeg.gdextension deleted file mode 100644 index 10323b5..0000000 --- a/addons/ffmpeg/ffmpeg.gdextension +++ /dev/null @@ -1,52 +0,0 @@ -[configuration] - -entry_symbol = "ffmpeg_init" -compatibility_minimum = 4.1 - -[libraries] -windows.debug.x86_64 = "res://addons/ffmpeg/win64/libgdffmpeg.windows.template_debug.x86_64.dll" -windows.release.x86_64 = "res://addons/ffmpeg/win64/libgdffmpeg.windows.template_release.x86_64.dll" -linux.debug.x86_64 = "res://addons/ffmpeg/linux64/libgdffmpeg.linux.template_debug.x86_64.so" -linux.release.x86_64 = "res://addons/ffmpeg/linux64/libgdffmpeg.linux.template_release.x86_64.so" -android.debug.arm64 = "res://addons/ffmpeg/android/libgdffmpeg.android.template_debug.arm64.so" -android.release.arm64 = "res://addons/ffmpeg/android/libgdffmpeg.android.template_release.arm64.so" -macos.debug = "res://addons/ffmpeg/macos/libgdffmpeg.macos.template_debug.framework" -macos.release = "res://addons/ffmpeg/macos/libgdffmpeg.macos.template_release.framework" - -[dependencies] - -windows.x86_64 = - {"res://addons/ffmpeg/win64/avcodec-60.dll": "", - "res://addons/ffmpeg/win64/avfilter-9.dll": "", - "res://addons/ffmpeg/win64/avformat-60.dll": "", - "res://addons/ffmpeg/win64/avutil-58.dll": "", - "res://addons/ffmpeg/win64/swresample-4.dll": "", - "res://addons/ffmpeg/win64/swscale-7.dll": ""} - -linux.x86_64 = - {"res://addons/ffmpeg/linux64/libavcodec.so.60": "", - "res://addons/ffmpeg/linux64/libavfilter.so.9": "", - "res://addons/ffmpeg/linux64/libavformat.so.60": "", - "res://addons/ffmpeg/linux64/libavutil.so.58": "", - "res://addons/ffmpeg/linux64/libswresample.so.4": "", - "res://addons/ffmpeg/linux64/libswscale.so.7": ""} - -android.arm64 = - { - "res://addons/ffmpeg/android/libavcodec.so": "", - "res://addons/ffmpeg/android/libavfilter.so": "", - "res://addons/ffmpeg/android/libavformat.so": "", - "res://addons/ffmpeg/android/libavutil.so": "", - "res://addons/ffmpeg/android/libswresample.so": "", - "res://addons/ffmpeg/android/libswscale.so": "" - } - -macos = - { - "res://addons/ffmpeg/macos/libavcodec.dylib": "", - "res://addons/ffmpeg/macos/libavfilter.dylib": "", - "res://addons/ffmpeg/macos/libavformat.dylib": "", - "res://addons/ffmpeg/macos/libavutil.dylib": "", - "res://addons/ffmpeg/macos/libswresample.dylib": "", - "res://addons/ffmpeg/macos/libswscale.dylib": "" - } \ No newline at end of file diff --git a/addons/ffmpeg/ffmpeg.gdextension.uid b/addons/ffmpeg/ffmpeg.gdextension.uid deleted file mode 100644 index 91586d4..0000000 --- a/addons/ffmpeg/ffmpeg.gdextension.uid +++ /dev/null @@ -1 +0,0 @@ -uid://ye3hglngsbmj diff --git a/addons/ffmpeg/linux64/libavcodec.so.60 b/addons/ffmpeg/linux64/libavcodec.so.60 deleted file mode 100644 index 37b6045..0000000 Binary files a/addons/ffmpeg/linux64/libavcodec.so.60 and /dev/null differ diff --git a/addons/ffmpeg/linux64/libavfilter.so.9 b/addons/ffmpeg/linux64/libavfilter.so.9 deleted file mode 100644 index 10d095e..0000000 Binary files a/addons/ffmpeg/linux64/libavfilter.so.9 and /dev/null differ diff --git a/addons/ffmpeg/linux64/libavformat.so.60 b/addons/ffmpeg/linux64/libavformat.so.60 deleted file mode 100644 index b23a7cc..0000000 Binary files a/addons/ffmpeg/linux64/libavformat.so.60 and /dev/null differ diff --git a/addons/ffmpeg/linux64/libavutil.so.58 b/addons/ffmpeg/linux64/libavutil.so.58 deleted file mode 100644 index 376e000..0000000 Binary files a/addons/ffmpeg/linux64/libavutil.so.58 and /dev/null differ diff --git a/addons/ffmpeg/linux64/libgdffmpeg.linux.template_debug.x86_64.so b/addons/ffmpeg/linux64/libgdffmpeg.linux.template_debug.x86_64.so deleted file mode 100644 index 7f71177..0000000 Binary files a/addons/ffmpeg/linux64/libgdffmpeg.linux.template_debug.x86_64.so and /dev/null differ diff --git a/addons/ffmpeg/linux64/libgdffmpeg.linux.template_release.x86_64.so b/addons/ffmpeg/linux64/libgdffmpeg.linux.template_release.x86_64.so deleted file mode 100644 index 38476dd..0000000 Binary files a/addons/ffmpeg/linux64/libgdffmpeg.linux.template_release.x86_64.so and /dev/null differ diff --git a/addons/ffmpeg/linux64/libswresample.so.4 b/addons/ffmpeg/linux64/libswresample.so.4 deleted file mode 100644 index e504ed4..0000000 Binary files a/addons/ffmpeg/linux64/libswresample.so.4 and /dev/null differ diff --git a/addons/ffmpeg/linux64/libswscale.so.7 b/addons/ffmpeg/linux64/libswscale.so.7 deleted file mode 100644 index 934c323..0000000 Binary files a/addons/ffmpeg/linux64/libswscale.so.7 and /dev/null differ diff --git a/addons/ffmpeg/win64/avcodec-60.dll b/addons/ffmpeg/win64/avcodec-60.dll deleted file mode 100644 index 9f0efb2..0000000 Binary files a/addons/ffmpeg/win64/avcodec-60.dll and /dev/null differ diff --git a/addons/ffmpeg/win64/avfilter-9.dll b/addons/ffmpeg/win64/avfilter-9.dll deleted file mode 100644 index e373f45..0000000 Binary files a/addons/ffmpeg/win64/avfilter-9.dll and /dev/null differ diff --git a/addons/ffmpeg/win64/avformat-60.dll b/addons/ffmpeg/win64/avformat-60.dll deleted file mode 100644 index 538cdd0..0000000 Binary files a/addons/ffmpeg/win64/avformat-60.dll and /dev/null differ diff --git a/addons/ffmpeg/win64/avutil-58.dll b/addons/ffmpeg/win64/avutil-58.dll deleted file mode 100644 index dc5da6a..0000000 Binary files a/addons/ffmpeg/win64/avutil-58.dll and /dev/null differ diff --git a/addons/ffmpeg/win64/libgdffmpeg.windows.template_debug.x86_64.dll b/addons/ffmpeg/win64/libgdffmpeg.windows.template_debug.x86_64.dll deleted file mode 100644 index 1fff75a..0000000 Binary files a/addons/ffmpeg/win64/libgdffmpeg.windows.template_debug.x86_64.dll and /dev/null differ diff --git a/addons/ffmpeg/win64/libgdffmpeg.windows.template_debug.x86_64.exp b/addons/ffmpeg/win64/libgdffmpeg.windows.template_debug.x86_64.exp deleted file mode 100644 index ff95845..0000000 Binary files a/addons/ffmpeg/win64/libgdffmpeg.windows.template_debug.x86_64.exp and /dev/null differ diff --git a/addons/ffmpeg/win64/libgdffmpeg.windows.template_debug.x86_64.lib b/addons/ffmpeg/win64/libgdffmpeg.windows.template_debug.x86_64.lib deleted file mode 100644 index fca7244..0000000 Binary files a/addons/ffmpeg/win64/libgdffmpeg.windows.template_debug.x86_64.lib and /dev/null differ diff --git a/addons/ffmpeg/win64/libgdffmpeg.windows.template_release.x86_64.dll b/addons/ffmpeg/win64/libgdffmpeg.windows.template_release.x86_64.dll deleted file mode 100644 index beb85ee..0000000 Binary files a/addons/ffmpeg/win64/libgdffmpeg.windows.template_release.x86_64.dll and /dev/null differ diff --git a/addons/ffmpeg/win64/libgdffmpeg.windows.template_release.x86_64.exp b/addons/ffmpeg/win64/libgdffmpeg.windows.template_release.x86_64.exp deleted file mode 100644 index b147c5f..0000000 Binary files a/addons/ffmpeg/win64/libgdffmpeg.windows.template_release.x86_64.exp and /dev/null differ diff --git a/addons/ffmpeg/win64/libgdffmpeg.windows.template_release.x86_64.lib b/addons/ffmpeg/win64/libgdffmpeg.windows.template_release.x86_64.lib deleted file mode 100644 index 8bd6bb4..0000000 Binary files a/addons/ffmpeg/win64/libgdffmpeg.windows.template_release.x86_64.lib and /dev/null differ diff --git a/addons/ffmpeg/win64/swresample-4.dll b/addons/ffmpeg/win64/swresample-4.dll deleted file mode 100644 index e9ac07d..0000000 Binary files a/addons/ffmpeg/win64/swresample-4.dll and /dev/null differ diff --git a/addons/ffmpeg/win64/swscale-7.dll b/addons/ffmpeg/win64/swscale-7.dll deleted file mode 100644 index bbdd36a..0000000 Binary files a/addons/ffmpeg/win64/swscale-7.dll and /dev/null differ diff --git a/android_icon_192.png b/android_icon_192.png new file mode 100644 index 0000000..5a9a669 Binary files /dev/null and b/android_icon_192.png differ diff --git a/android_icon_192.png.import b/android_icon_192.png.import new file mode 100644 index 0000000..6487771 --- /dev/null +++ b/android_icon_192.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://be2falceit604" +path="res://.godot/imported/android_icon_192.png-fede79a2925055cb953f580c6a56a6c9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://android_icon_192.png" +dest_files=["res://.godot/imported/android_icon_192.png-fede79a2925055cb953f580c6a56a6c9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/export_presets.cfg b/export_presets.cfg index 3f98b41..50af9ff 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -108,3 +108,220 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi 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.2] + +name="Android" +platform="Android" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="../GodotExports/Android/SCPCB.apk" +patches=PackedStringArray() +encryption_include_filters="" +encryption_exclude_filters="" +seed=0 +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.2.options] + +custom_template/debug="" +custom_template/release="" +gradle_build/use_gradle_build=false +gradle_build/gradle_build_directory="" +gradle_build/android_source_template="" +gradle_build/compress_native_libraries=false +gradle_build/export_format=0 +gradle_build/min_sdk="" +gradle_build/target_sdk="" +architectures/armeabi-v7a=false +architectures/arm64-v8a=true +architectures/x86=false +architectures/x86_64=false +version/code=1 +version/name="" +package/unique_name="net.eusv.scpcbgame" +package/name="SCP - Containment Breach" +package/signed=true +package/app_category=2 +package/retain_data_on_uninstall=false +package/exclude_from_recents=false +package/show_in_android_tv=false +package/show_in_app_library=true +package/show_as_launcher_app=false +launcher_icons/main_192x192="uid://be2falceit604" +launcher_icons/adaptive_foreground_432x432="" +launcher_icons/adaptive_background_432x432="" +launcher_icons/adaptive_monochrome_432x432="" +graphics/opengl_debug=false +xr_features/xr_mode=0 +gesture/swipe_to_dismiss=false +screen/immersive_mode=true +screen/support_small=true +screen/support_normal=true +screen/support_large=true +screen/support_xlarge=true +user_data_backup/allow=false +command_line/extra_args="" +apk_expansion/enable=false +apk_expansion/SALT="" +apk_expansion/public_key="" +permissions/custom_permissions=PackedStringArray() +permissions/access_checkin_properties=false +permissions/access_coarse_location=false +permissions/access_fine_location=false +permissions/access_location_extra_commands=false +permissions/access_media_location=false +permissions/access_mock_location=false +permissions/access_network_state=false +permissions/access_surface_flinger=false +permissions/access_wifi_state=false +permissions/account_manager=false +permissions/add_voicemail=false +permissions/authenticate_accounts=false +permissions/battery_stats=false +permissions/bind_accessibility_service=false +permissions/bind_appwidget=false +permissions/bind_device_admin=false +permissions/bind_input_method=false +permissions/bind_nfc_service=false +permissions/bind_notification_listener_service=false +permissions/bind_print_service=false +permissions/bind_remoteviews=false +permissions/bind_text_service=false +permissions/bind_vpn_service=false +permissions/bind_wallpaper=false +permissions/bluetooth=false +permissions/bluetooth_admin=false +permissions/bluetooth_privileged=false +permissions/brick=false +permissions/broadcast_package_removed=false +permissions/broadcast_sms=false +permissions/broadcast_sticky=false +permissions/broadcast_wap_push=false +permissions/call_phone=false +permissions/call_privileged=false +permissions/camera=false +permissions/capture_audio_output=false +permissions/capture_secure_video_output=false +permissions/capture_video_output=false +permissions/change_component_enabled_state=false +permissions/change_configuration=false +permissions/change_network_state=false +permissions/change_wifi_multicast_state=false +permissions/change_wifi_state=false +permissions/clear_app_cache=false +permissions/clear_app_user_data=false +permissions/control_location_updates=false +permissions/delete_cache_files=false +permissions/delete_packages=false +permissions/device_power=false +permissions/diagnostic=false +permissions/disable_keyguard=false +permissions/dump=false +permissions/expand_status_bar=false +permissions/factory_test=false +permissions/flashlight=false +permissions/force_back=false +permissions/get_accounts=false +permissions/get_package_size=false +permissions/get_tasks=false +permissions/get_top_activity_info=false +permissions/global_search=false +permissions/hardware_test=false +permissions/inject_events=false +permissions/install_location_provider=false +permissions/install_packages=false +permissions/install_shortcut=false +permissions/internal_system_window=false +permissions/internet=true +permissions/kill_background_processes=false +permissions/location_hardware=false +permissions/manage_accounts=false +permissions/manage_app_tokens=false +permissions/manage_documents=false +permissions/manage_external_storage=false +permissions/master_clear=false +permissions/media_content_control=false +permissions/modify_audio_settings=false +permissions/modify_phone_state=false +permissions/mount_format_filesystems=false +permissions/mount_unmount_filesystems=false +permissions/nfc=false +permissions/persistent_activity=false +permissions/post_notifications=false +permissions/process_outgoing_calls=false +permissions/read_calendar=false +permissions/read_call_log=false +permissions/read_contacts=false +permissions/read_external_storage=false +permissions/read_frame_buffer=false +permissions/read_history_bookmarks=false +permissions/read_input_state=false +permissions/read_logs=false +permissions/read_media_audio=false +permissions/read_media_images=false +permissions/read_media_video=false +permissions/read_media_visual_user_selected=false +permissions/read_phone_state=false +permissions/read_profile=false +permissions/read_sms=false +permissions/read_social_stream=false +permissions/read_sync_settings=false +permissions/read_sync_stats=false +permissions/read_user_dictionary=false +permissions/reboot=false +permissions/receive_boot_completed=false +permissions/receive_mms=false +permissions/receive_sms=false +permissions/receive_wap_push=false +permissions/record_audio=false +permissions/reorder_tasks=false +permissions/restart_packages=false +permissions/send_respond_via_message=false +permissions/send_sms=false +permissions/set_activity_watcher=false +permissions/set_alarm=false +permissions/set_always_finish=false +permissions/set_animation_scale=false +permissions/set_debug_app=false +permissions/set_orientation=false +permissions/set_pointer_speed=false +permissions/set_preferred_applications=false +permissions/set_process_limit=false +permissions/set_time=false +permissions/set_time_zone=false +permissions/set_wallpaper=false +permissions/set_wallpaper_hints=false +permissions/signal_persistent_processes=false +permissions/status_bar=false +permissions/subscribed_feeds_read=false +permissions/subscribed_feeds_write=false +permissions/system_alert_window=false +permissions/transmit_ir=false +permissions/uninstall_shortcut=false +permissions/update_device_stats=false +permissions/use_credentials=false +permissions/use_sip=false +permissions/vibrate=false +permissions/wake_lock=false +permissions/write_apn_settings=false +permissions/write_calendar=false +permissions/write_call_log=false +permissions/write_contacts=false +permissions/write_external_storage=false +permissions/write_gservices=false +permissions/write_history_bookmarks=false +permissions/write_profile=false +permissions/write_secure_settings=false +permissions/write_settings=false +permissions/write_sms=false +permissions/write_social_stream=false +permissions/write_sync_settings=false +permissions/write_user_dictionary=false diff --git a/project.godot b/project.godot index cab50a4..eb73616 100644 --- a/project.godot +++ b/project.godot @@ -91,6 +91,7 @@ player_blink={ renderer/rendering_method="gl_compatibility" renderer/rendering_method.mobile="gl_compatibility" +textures/vram_compression/import_etc2_astc=true environment/defaults/default_clear_color=Color(0, 0, 0, 1) occlusion_culling/use_occlusion_culling=true diff --git a/scenes/screens/IntroVideo.tscn b/scenes/screens/IntroVideo.tscn index 91832fd..f6d4e95 100644 --- a/scenes/screens/IntroVideo.tscn +++ b/scenes/screens/IntroVideo.tscn @@ -1,10 +1,7 @@ -[gd_scene load_steps=4 format=3 uid="uid://tbljfkvfepnk"] +[gd_scene load_steps=3 format=3 uid="uid://tbljfkvfepnk"] -[ext_resource type="AudioStream" uid="uid://bbpq1jfihi2d8" path="res://GFX/menu/startup_Undertow.ogg" id="1_35gww"] [ext_resource type="Script" uid="uid://m6h4pxxvxflp" path="res://src/IntroVideo.gd" id="1_w78gt"] - -[sub_resource type="FFmpegVideoStream" id="FFmpegVideoStream_3ewf1"] -file = "res://GFX/menu/startup_Undertow.avi" +[ext_resource type="VideoStream" uid="uid://m8ak8cb4x5m5" path="res://videos/startup_Undertow.ogv" id="2_lk0ge"] [node name="IntroVideo" type="Control"] layout_mode = 3 @@ -26,10 +23,7 @@ ratio = 1.7778 [node name="VideoStreamPlayer" type="VideoStreamPlayer" parent="AspectRatioContainer"] layout_mode = 2 -stream = SubResource("FFmpegVideoStream_3ewf1") +stream = ExtResource("2_lk0ge") expand = true -[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] -stream = ExtResource("1_35gww") - [connection signal="finished" from="AspectRatioContainer/VideoStreamPlayer" to="." method="_on_video_stream_player_finished"] diff --git a/scenes/world/Player.tscn b/scenes/world/Player.tscn index 672ab00..fb9e8b9 100644 --- a/scenes/world/Player.tscn +++ b/scenes/world/Player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=9 format=3 uid="uid://dm33ofcbh8sht"] +[gd_scene load_steps=10 format=3 uid="uid://dm33ofcbh8sht"] [ext_resource type="Script" uid="uid://swqi7bl5fmpv" path="res://src/Player.gd" id="1_n772d"] [ext_resource type="Texture2D" uid="uid://rfpsi4xnxdu" path="res://GFX/BlinkIcon.png" id="2_kjp08"] @@ -6,6 +6,7 @@ [ext_resource type="PackedScene" uid="uid://55cgw0lg8pab" path="res://scenes/gui/OutlineRect.tscn" id="4_r7w8e"] [ext_resource type="Texture2D" uid="uid://c5p7utpptgtww" path="res://GFX/BlinkMeter.jpg" id="5_iwhsa"] [ext_resource type="Texture2D" uid="uid://den5phi138pyh" path="res://GFX/StaminaMeter.jpg" id="6_g44nt"] +[ext_resource type="Script" uid="uid://cltjg15jsxhjc" path="res://src/touch_screen_joystick.gd" id="7_ucuqk"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_w1ang"] radius = 0.15 @@ -458,3 +459,44 @@ offset_top = 3.0 offset_right = 201.0 offset_bottom = 17.0 texture = ExtResource("6_g44nt") + +[node name="JoyL" type="Control" parent="HUD"] +layout_mode = 1 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_top = -40.0 +offset_right = 40.0 +grow_vertical = 0 + +[node name="MobileLayer" type="CanvasLayer" parent="."] + +[node name="AnchorL" type="Control" parent="MobileLayer"] +layout_mode = 3 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_top = -40.0 +offset_right = 40.0 +grow_vertical = 0 + +[node name="TouchScreenJoystick" type="Control" parent="MobileLayer/AnchorL"] +layout_mode = 1 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_top = -386.0 +offset_right = 466.0 +grow_vertical = 0 +pivot_offset = Vector2(233, 193) +script = ExtResource("7_ucuqk") +anti_aliased = true +deadzone = 40.0 +smooth_reset = true +smooth_speed = 15.0 +change_opacity_when_touched = true +use_input_actions = true +action_left = "player_left" +action_right = "player_right" +action_up = "player_forwards" +action_down = "player_backwards" diff --git a/src/GameStartup.gd b/src/GameStartup.gd index bf22dda..a3786b3 100644 --- a/src/GameStartup.gd +++ b/src/GameStartup.gd @@ -24,5 +24,5 @@ func skipIntroVideo(): get_tree().change_scene_to_file("res://scenes/screens/MainMenu.tscn") func playIntro(): - Global.videoToPlay = "res://GFX/menu/startup_Undertow.avi" + Global.videoToPlay = "res://videos/startup_Undertow.ogv" get_tree().change_scene_to_file("res://scenes/screens/IntroVideo.tscn") diff --git a/src/Global.gd b/src/Global.gd index 832cab6..e3637a4 100644 --- a/src/Global.gd +++ b/src/Global.gd @@ -171,6 +171,8 @@ var xrInterface: XRInterface var xrSetup: XrSetup func _ready(): + var viewport = get_viewport() + if Global.VRMode: xrInterface = XRServer.find_interface("OpenXR") if xrInterface and xrInterface.is_initialized(): diff --git a/src/IntroVideo.gd b/src/IntroVideo.gd index d59107b..9c6b18d 100644 --- a/src/IntroVideo.gd +++ b/src/IntroVideo.gd @@ -2,20 +2,17 @@ extends Control func _ready() -> void: $AspectRatioContainer/VideoStreamPlayer.stream.file = Global.videoToPlay - $AudioStreamPlayer.stream = load(Global.videoToPlay.replace(".avi", ".ogg")) - $AspectRatioContainer/VideoStreamPlayer.play() - $AudioStreamPlayer.play() + $AspectRatioContainer/VideoStreamPlayer.play.call_deferred() func _process(_delta: float) -> void: if Input.is_action_just_pressed("ui_accept"): _on_video_stream_player_finished() func _on_video_stream_player_finished() -> void: - if Global.videoToPlay == "res://GFX/menu/startup_TSS.avi": - #get_tree().change_scene_to_file("res://scenes/screens/MainMenu.tscn") + if Global.videoToPlay == "res://videos/startup_TSS.ogv": get_tree().change_scene_to_file("res://scenes/screens/LoadInit.tscn") return - Global.videoToPlay = "res://GFX/menu/startup_TSS.avi" + Global.videoToPlay = "res://videos/startup_TSS.ogv" get_tree().change_scene_to_file("res://scenes/screens/IntroVideo.tscn") diff --git a/src/Player.gd b/src/Player.gd index dc889b2..d92c64a 100644 --- a/src/Player.gd +++ b/src/Player.gd @@ -11,6 +11,8 @@ var blinkBar: Control var sprintBar: Control var Hud: Control var map: Node3D +var mobileLayer: CanvasLayer +var touchScreenJoystick: TouchScreenJoystick var xrSetup: XrSetup @@ -31,6 +33,11 @@ func _ready() -> void: blinkBar = $HUD/BlinkMeter sprintBar = $HUD/SprintMeter Hud = $HUD + mobileLayer = $MobileLayer + touchScreenJoystick = $MobileLayer/AnchorL/TouchScreenJoystick + var osName = OS.get_name() + if osName != "Android" and osName != "iOS": + mobileLayer.visible = false #Select SelectedDifficulty\otherFactors #Case EASY @@ -463,6 +470,8 @@ const CONTROLLER_DEADZONE = 0.20; func _input(event: InputEvent) -> void: if event is InputEventMouseMotion: if not Global.VRMode: + mobileLayer.visible = false + touchScreenJoystick.enabled = false Rotation.y -= event.relative.x / 2 Rotation.x -= event.relative.y / 2 if Rotation.x > 70: @@ -482,3 +491,12 @@ func _input(event: InputEvent) -> void: cameraMoveByVector.x = 0; else: cameraMoveByVector.x = event.axis_value / 45; + if event is InputEventScreenDrag: + mobileLayer.visible = true + touchScreenJoystick.enabled = true + Rotation.y -= event.relative.x / 2 + Rotation.x -= event.relative.y / 2 + if Rotation.x > 70: + Rotation.x = 70 + if Rotation.x < -70: + Rotation.x = -70 diff --git a/src/touch_screen_joystick.gd b/src/touch_screen_joystick.gd index 85517ca..e5f0abc 100644 --- a/src/touch_screen_joystick.gd +++ b/src/touch_screen_joystick.gd @@ -69,12 +69,15 @@ var is_pressing : bool var knob_position : Vector2 var finger_index : int var default_pos : Vector2 +var enabled: bool = true func _ready() -> void: default_pos = position change_opacity() func _process(delta: float) -> void: + if Engine.is_editor_hint(): + return # checks if currently pressing if is_pressing: @@ -104,29 +107,30 @@ func move_knob_pos() -> void: # triggers an specific input action based on the -- # -- current direction func trigger_input_actions() -> void: - - var dir := get_deadzoned_vector().normalized() - - if dir.x > 0: - Input.action_release(action_left) - Input.action_press(action_right, dir.x) - else: - Input.action_release(action_right) - Input.action_press(action_left, -dir.x) - - if dir.y < 0: - Input.action_release(action_down) - Input.action_press(action_up, -dir.y) - else: - Input.action_release(action_up) - Input.action_press(action_down, dir.y) + if enabled: + var dir := get_deadzoned_vector().normalized() + + if dir.x > 0: + Input.action_release(action_left) + Input.action_press(action_right, dir.x) + else: + Input.action_release(action_right) + Input.action_press(action_left, -dir.x) + + if dir.y < 0: + Input.action_release(action_down) + Input.action_press(action_up, -dir.y) + else: + Input.action_release(action_up) + Input.action_press(action_down, dir.y) # releases all input actions func release_input_actions() -> void: - Input.action_release(action_right) - Input.action_release(action_left) - Input.action_release(action_up) - Input.action_release(action_down) + if enabled: + Input.action_release(action_right) + Input.action_release(action_left) + Input.action_release(action_up) + Input.action_release(action_down) # resets knob position if not pressing func reset_knob_pos() -> void: diff --git a/videos/startup_TSS.ogv b/videos/startup_TSS.ogv new file mode 100644 index 0000000..f55517f Binary files /dev/null and b/videos/startup_TSS.ogv differ diff --git a/videos/startup_TSS.ogv.uid b/videos/startup_TSS.ogv.uid new file mode 100644 index 0000000..54039dc --- /dev/null +++ b/videos/startup_TSS.ogv.uid @@ -0,0 +1 @@ +uid://24o53dyktmbq diff --git a/videos/startup_Undertow.ogv b/videos/startup_Undertow.ogv new file mode 100644 index 0000000..88fa185 Binary files /dev/null and b/videos/startup_Undertow.ogv differ diff --git a/videos/startup_Undertow.ogv.uid b/videos/startup_Undertow.ogv.uid new file mode 100644 index 0000000..0a48074 --- /dev/null +++ b/videos/startup_Undertow.ogv.uid @@ -0,0 +1 @@ +uid://m8ak8cb4x5m5