diff --git a/.gitignore b/.gitignore index 3a550a7..e50c3a5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ game/sandslide.apk android_project/* game/main/2023-01-02 19-35-12.mp4 *.cfg +release/* \ No newline at end of file diff --git a/.sconsign.dblite b/.sconsign.dblite index 90f04b5..ece7e24 100644 Binary files a/.sconsign.dblite and b/.sconsign.dblite differ diff --git a/README.md b/README.md index 4e08a4c..e334fd0 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ A falling sand game made with Godot 4.0's GDextension feature. The full game can The project was initialized using a GDExtension template, [GDSummator.](https://github.com/paddy-exe/GDExtensionSummator). The simulation logic is implemented in C++ as a GDextension (in `extension`) that gets compiled into a binary file (in `game\bin`). -The user interface was created in a Godot 4.0.3 project (in `game`). +The user interface was created in a Godot 4.2.beta project (in `game`). ## Set Up 1. Clone the sand-slide repository -2. In a command prompt, navigate to the `godot-cpp` folder and run `scons` (add `target=template_release` for exported projects, or `platform=...` for other devices). You only need to do this the first time you initialize the repository. Note that the `MD` flag in `godot-cpp\tools\targets.py` will prevent the game from running on Windows devices without Visual Studio installed. You can change all instances of `MD` to `MT` to fix this. If you recieve an `Access Denied` error, make sure that the project is not open in another window while compiling. +2. In a command prompt, navigate to the `godot-cpp` folder and run `scons` (add `target=template_release` for exported projects, or `platform=...` for other devices). You only need to do this the first time you initialize the repository. 3. You are now ready to make changes to the project! ## Compiling Changes diff --git a/extension/register_types.o b/extension/register_types.o new file mode 100644 index 0000000..2295b60 Binary files /dev/null and b/extension/register_types.o differ diff --git a/extension/register_types.os b/extension/register_types.os index 058d3ef..40ce479 100644 Binary files a/extension/register_types.os and b/extension/register_types.os differ diff --git a/extension/sand_simulation.o b/extension/sand_simulation.o new file mode 100644 index 0000000..cd42147 Binary files /dev/null and b/extension/sand_simulation.o differ diff --git a/extension/sand_simulation.os b/extension/sand_simulation.os index 11ad994..27939e2 100644 Binary files a/extension/sand_simulation.os and b/extension/sand_simulation.os differ diff --git a/game/bin/fallingsand.gdextension b/game/bin/fallingsand/fallingsand.gdextension similarity index 84% rename from game/bin/fallingsand.gdextension rename to game/bin/fallingsand/fallingsand.gdextension index 04705a9..3e16422 100644 --- a/game/bin/fallingsand.gdextension +++ b/game/bin/fallingsand/fallingsand.gdextension @@ -9,8 +9,7 @@ macos.debug = "res://bin/fallingsand/libgdfallingsand.macos.template_debug.frame macos.release = "res://bin/fallingsand/libgdfallingsand.macos.template_release.framework" windows.debug.x86_32 = "res://bin/fallingsand/libgdfallingsand.windows.template_debug.x86_32.dll" windows.release.x86_32 = "res://bin/fallingsand/libgdfallingsand.windows.template_release.x86_32.dll" -windows.debug.x86_64 = "res://bin/fallingsand/libgdfallingsand.windows.template_debug.x86_64.dll" -windows.release.x86_64 = "res://bin/fallingsand/libgdfallingsand.windows.template_release.x86_64.dll" +windows.x86_64 = "res://bin/fallingsand/libgdfallingsand.windows.template_debug.x86_64.dll" linux.debug.x86_64 = "res://bin/fallingsand/libgdfallingsand.linux.template_debug.x86_64.so" linux.release.x86_64 = "res://bin/fallingsand/libgdfallingsand.linux.template_release.x86_64.so" linux.debug.arm64 = "res://bin/fallingsand/libgdfallingsand.linux.template_debug.arm64.so" @@ -18,3 +17,4 @@ linux.release.arm64 = "res://bin/fallingsand/libgdfallingsand.linux.template_rel linux.debug.rv64 = "res://bin/fallingsand/libgdfallingsand.linux.template_debug.rv64.so" linux.release.rv64 = "res://bin/fallingsand/libgdfallingsand.linux.template_release.rv64.so" android.arm64-v8a = "res://bin/fallingsand/libgdfallingsand.android.template_debug.arm64.so" +web = "res://bin/fallingsand/libgdfallingsand.web.template_debug.wasm32.wasm" diff --git a/game/bin/fallingsand/libgdfallingsand.android.template_debug.arm64.so b/game/bin/fallingsand/libgdfallingsand.android.template_debug.arm64.so index 8d744f3..7224ef9 100644 Binary files a/game/bin/fallingsand/libgdfallingsand.android.template_debug.arm64.so and b/game/bin/fallingsand/libgdfallingsand.android.template_debug.arm64.so differ diff --git a/game/bin/fallingsand/libgdfallingsand.web.template_debug.wasm32.wasm b/game/bin/fallingsand/libgdfallingsand.web.template_debug.wasm32.wasm new file mode 100644 index 0000000..5c6233d Binary files /dev/null and b/game/bin/fallingsand/libgdfallingsand.web.template_debug.wasm32.wasm differ diff --git a/game/bin/fallingsand/~libgdfallingsand.windows.template_debug.x86_64.dll b/game/bin/fallingsand/~libgdfallingsand.windows.template_debug.x86_64.dll deleted file mode 100644 index 68c2a8c..0000000 Binary files a/game/bin/fallingsand/~libgdfallingsand.windows.template_debug.x86_64.dll and /dev/null differ diff --git a/game/export_presets.cfg b/game/export_presets.cfg index 032b233..1e5e244 100644 --- a/game/export_presets.cfg +++ b/game/export_presets.cfg @@ -8,7 +8,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../build/sandslide4.0.aab" +export_path="../release/sandslide4.3.aab" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -26,8 +26,8 @@ architectures/armeabi-v7a=false architectures/arm64-v8a=true architectures/x86=false architectures/x86_64=false -version/code=9 -version/name="4.0" +version/code=13 +version/name="4.3" package/unique_name="org.godotengine.sandslide" package/name="sand slide" package/signed=true @@ -418,7 +418,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../build/sand_slide4.1.exe" +export_path="../release/sand_slide4.3.exe" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -429,7 +429,7 @@ encrypt_directory=false custom_template/debug="" custom_template/release="" debug/export_console_wrapper=1 -binary_format/embed_pck=true +binary_format/embed_pck=false texture_format/bptc=false texture_format/s3tc=true texture_format/etc=false @@ -512,3 +512,146 @@ ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") rm -rf \"{temp_dir}\"" debug/export_console_script=1 + +[preset.4] + +name="Web" +platform="Web" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="../release/web/test.html" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.4.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.5] + +name="macOS" +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.5.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="1.0" +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/game/main/Main.tscn b/game/main/Main.tscn index 7492c17..1902a4d 100644 --- a/game/main/Main.tscn +++ b/game/main/Main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=36 format=3 uid="uid://ggbp6fch244c"] +[gd_scene load_steps=37 format=3 uid="uid://ggbp6fch244c"] [ext_resource type="Script" path="res://main/main.gd" id="1_2pidp"] [ext_resource type="Theme" uid="uid://co20v1mxv2dfm" path="res://main/ui/_theme/theme.tres" id="2_nb65v"] @@ -124,6 +124,10 @@ _data = { "show": SubResource("Animation_o0jo7") } +[sub_resource type="Environment" id="Environment_6bfny"] +glow_enabled = true +glow_strength = 1.1 + [node name="Main" type="Node"] script = ExtResource("1_2pidp") metadata/_edit_vertical_guides_ = [] @@ -374,3 +378,6 @@ script = ExtResource("18_mpubp") [node name="Painter" type="Node" parent="."] unique_name_in_owner = true script = ExtResource("18_mer41") + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource("Environment_6bfny") diff --git a/game/main/ui/element_selector/element_selector.gd b/game/main/ui/element_selector/element_selector.gd index 1b4baad..d889769 100644 --- a/game/main/ui/element_selector/element_selector.gd +++ b/game/main/ui/element_selector/element_selector.gd @@ -30,6 +30,7 @@ func _ready() -> void: initialize_buttons() if not simple: $basic/Basic/None.queue_free() + print(len($basic/Basic.get_children())) await get_tree().get_root().ready update_custom_elements() diff --git a/game/main/ui/submenu/element_editor/ElementEditor.tscn b/game/main/ui/submenu/element_editor/ElementEditor.tscn index 79bb0b0..9678669 100644 --- a/game/main/ui/submenu/element_editor/ElementEditor.tscn +++ b/game/main/ui/submenu/element_editor/ElementEditor.tscn @@ -371,7 +371,7 @@ unique_name_in_owner = true layout_mode = 2 size_flags_vertical = 3 theme_override_styles/panel = SubResource("StyleBoxEmpty_hcor6") -scroll_vertical = 707 +scroll_vertical = 100 vertical_scroll_mode = 2 [node name="VBoxContainer" type="VBoxContainer" parent="SettingsContainer/PanelContainer/VBoxContainer/ScrollContainer"] diff --git a/game/project.godot b/game/project.godot index 936f1eb..55955ca 100644 --- a/game/project.godot +++ b/game/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="sandslide" -config/version="4.2" +config/version="4.3" run/main_scene="res://main/Main.tscn" config/features=PackedStringArray("4.2") run/max_fps=60 diff --git a/game/thumbnail.png.import b/game/thumbnail.png.import new file mode 100644 index 0000000..99f0c53 --- /dev/null +++ b/game/thumbnail.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cy33uj7pyr07s" +path="res://.godot/imported/thumbnail.png-3f545d161fd110f6ef4e5b6d4c7c77a7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://thumbnail.png" +dest_files=["res://.godot/imported/thumbnail.png-3f545d161fd110f6ef4e5b6d4c7c77a7.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