Skip to content

Commit

Permalink
Web build changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwijuice56 committed Mar 20, 2024
1 parent 791a928 commit 0b9dc2a
Show file tree
Hide file tree
Showing 17 changed files with 198 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ game/sandslide.apk
android_project/*
game/main/2023-01-02 19-35-12.mp4
*.cfg
release/*
Binary file modified .sconsign.dblite
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added extension/register_types.o
Binary file not shown.
Binary file modified extension/register_types.os
Binary file not shown.
Binary file added extension/sand_simulation.o
Binary file not shown.
Binary file modified extension/sand_simulation.os
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ 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"
linux.release.arm64 = "res://bin/fallingsand/libgdfallingsand.linux.template_release.arm64.so"
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"
Binary file not shown.
Binary file not shown.
Binary file not shown.
153 changes: 148 additions & 5 deletions game/export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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}\""
9 changes: 8 additions & 1 deletion game/main/Main.tscn
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down Expand Up @@ -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_ = []
Expand Down Expand Up @@ -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")
1 change: 1 addition & 0 deletions game/main/ui/element_selector/element_selector.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion game/main/ui/submenu/element_editor/ElementEditor.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion game/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 34 additions & 0 deletions game/thumbnail.png.import
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0b9dc2a

Please sign in to comment.