diff --git a/.circleci/config.yml b/.circleci/config.yml index bff1cc1..1b8710c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: # command: bash .circleci/deploy-heroku.sh - run: godot --export "Windows Desktop" ./build/windows/cluennector.exe - run: godot --export "Linux/X11" ./build/linux/cluennector - - run: godot --export "Mac OSX" ./build/macos/cluennector.dmg + - run: godot --export "Mac OSX" ./build/macos/cluennector.app - run: name: Github release command: bash .circleci/release.sh diff --git a/.circleci/deploy-cloudflare.sh b/.circleci/deploy-cloudflare.sh index 25fc6eb..0969845 100644 --- a/.circleci/deploy-cloudflare.sh +++ b/.circleci/deploy-cloudflare.sh @@ -11,5 +11,5 @@ nvm use --lts branch=$(git rev-parse --abbrev-ref HEAD) name=$(basename $(git config remote.origin.url |sed "s/\.git$//") | sed "s/ /-/g" | tr '[:upper:]' '[:lower:]') -npx wrangler pages project create unborn --production-branch "$branch" || true +npx wrangler pages project create "$name" --production-branch "$branch" || true npx wrangler pages publish build/html --project-name "$name" diff --git a/assets/bgclose.jpeg b/assets/bgclose.jpeg new file mode 100644 index 0000000..bb2a628 Binary files /dev/null and b/assets/bgclose.jpeg differ diff --git a/assets/bgfar.png.import b/assets/bgclose.jpeg.import similarity index 69% rename from assets/bgfar.png.import rename to assets/bgclose.jpeg.import index 3928265..8701b4d 100644 --- a/assets/bgfar.png.import +++ b/assets/bgclose.jpeg.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/bgfar.png-7fd62260446e80fd6d39fa5eb51c278a.stex" +path="res://.import/bgclose.jpeg-366b66971fa080928ae95c6e75b306c9.stex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/bgfar.png" -dest_files=[ "res://.import/bgfar.png-7fd62260446e80fd6d39fa5eb51c278a.stex" ] +source_file="res://assets/bgclose.jpeg" +dest_files=[ "res://.import/bgclose.jpeg-366b66971fa080928ae95c6e75b306c9.stex" ] [params] @@ -19,7 +19,7 @@ compress/lossy_quality=0.7 compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 +flags/repeat=1 flags/filter=true flags/mipmaps=false flags/anisotropic=false diff --git a/assets/bgfar.jpeg b/assets/bgfar.jpeg new file mode 100644 index 0000000..7e38f0f Binary files /dev/null and b/assets/bgfar.jpeg differ diff --git a/assets/bgbig.png.import b/assets/bgfar.jpeg.import similarity index 70% rename from assets/bgbig.png.import rename to assets/bgfar.jpeg.import index ab78aaf..59a25cb 100644 --- a/assets/bgbig.png.import +++ b/assets/bgfar.jpeg.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/bgbig.png-5ecf0050e0a566f784bc1beac35afc5d.stex" +path="res://.import/bgfar.jpeg-acece484428bd3d719ff1cf2e443925c.stex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/bgbig.png" -dest_files=[ "res://.import/bgbig.png-5ecf0050e0a566f784bc1beac35afc5d.stex" ] +source_file="res://assets/bgfar.jpeg" +dest_files=[ "res://.import/bgfar.jpeg-acece484428bd3d719ff1cf2e443925c.stex" ] [params] @@ -19,7 +19,7 @@ compress/lossy_quality=0.7 compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 +flags/repeat=1 flags/filter=true flags/mipmaps=false flags/anisotropic=false diff --git a/assets/bgmedium.jpeg b/assets/bgmedium.jpeg new file mode 100644 index 0000000..e5a7a25 Binary files /dev/null and b/assets/bgmedium.jpeg differ diff --git a/assets/bgmedium.png.import b/assets/bgmedium.jpeg.import similarity index 69% rename from assets/bgmedium.png.import rename to assets/bgmedium.jpeg.import index cadcf14..64d01cb 100644 --- a/assets/bgmedium.png.import +++ b/assets/bgmedium.jpeg.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/bgmedium.png-414d83a50461da3c082ce09c4dc16195.stex" +path="res://.import/bgmedium.jpeg-7034170847a4cda6ac66d239e5fb9d8c.stex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/bgmedium.png" -dest_files=[ "res://.import/bgmedium.png-414d83a50461da3c082ce09c4dc16195.stex" ] +source_file="res://assets/bgmedium.jpeg" +dest_files=[ "res://.import/bgmedium.jpeg-7034170847a4cda6ac66d239e5fb9d8c.stex" ] [params] @@ -19,7 +19,7 @@ compress/lossy_quality=0.7 compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 +flags/repeat=1 flags/filter=true flags/mipmaps=false flags/anisotropic=false diff --git a/assets/bgmiddle.png.import b/assets/bgmiddle.png.import deleted file mode 100644 index 8719178..0000000 --- a/assets/bgmiddle.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/bgmiddle.png-d80f00dd1dd2a2ea1a489a9918f1270a.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://assets/bgmiddle.png" -dest_files=[ "res://.import/bgmiddle.png-d80f00dd1dd2a2ea1a489a9918f1270a.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/assets/bgsmall.png.import b/assets/bgsmall.png.import deleted file mode 100644 index ecbbd94..0000000 --- a/assets/bgsmall.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/bgsmall.png-e023c932343ef484cdec2cfcff214675.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://assets/bgsmall.png" -dest_files=[ "res://.import/bgsmall.png-e023c932343ef484cdec2cfcff214675.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/assets/nebula.jpg.import b/assets/nebula.jpg.import index a9cdd81..cc33fdb 100644 --- a/assets/nebula.jpg.import +++ b/assets/nebula.jpg.import @@ -14,16 +14,16 @@ dest_files=[ "res://.import/nebula.jpg-dd1844ba804a91a284ad58583e357691.stex" ] [params] -compress/mode=0 -compress/lossy_quality=0.7 +compress/mode=1 +compress/lossy_quality=1.0 compress/hdr_mode=0 compress/bptc_ldr=0 -compress/normal_map=0 +compress/normal_map=2 flags/repeat=0 flags/filter=true flags/mipmaps=false flags/anisotropic=false -flags/srgb=2 +flags/srgb=0 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false diff --git a/assets/ship.png b/assets/ship.png index 754bce3..b30dea6 100644 Binary files a/assets/ship.png and b/assets/ship.png differ diff --git a/assets/ship.png.import b/assets/ship.png.import index ed8eb8d..667d0e9 100644 --- a/assets/ship.png.import +++ b/assets/ship.png.import @@ -14,8 +14,8 @@ dest_files=[ "res://.import/ship.png-0b2a8e7064d2d88a0149f9491a8ea676.stex" ] [params] -compress/mode=0 -compress/lossy_quality=0.7 +compress/mode=1 +compress/lossy_quality=1.0 compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 diff --git a/export_presets.cfg b/export_presets.cfg index 51a8f5f..5496a47 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -23,6 +23,7 @@ texture_format/etc=false texture_format/etc2=false texture_format/no_bptc_fallbacks=true codesign/enable=false +codesign/identity_type=0 codesign/identity="" codesign/password="" codesign/timestamp=true @@ -30,6 +31,7 @@ codesign/timestamp_server_url="" codesign/digest_algorithm=1 codesign/description="" codesign/custom_options=PoolStringArray( ) +application/modify_resources=true application/icon="" application/file_version="" application/product_version="" @@ -70,10 +72,11 @@ name="HTML5" platform="HTML5" runnable=true custom_features="" -export_filter="all_resources" +export_filter="resources" +export_files=PoolStringArray( "res://assets/Black.png", "res://assets/SeratUltra-1GE24.ttf", "res://assets/SpaceMono-Regular.ttf", "res://assets/White.png", "res://assets/arrow.png", "res://assets/bgclose.jpeg", "res://assets/bgfar.jpeg", "res://assets/bgmedium.jpeg", "res://assets/flame.png", "res://assets/flamegrow.png", "res://assets/front.png", "res://assets/nebula.jpg", "res://assets/ship.png", "res://assets/st1.png", "res://assets/st2.png", "res://assets/st3.png", "res://assets/st4.png", "res://default_env.tres", "res://effects/Effect.gd", "res://effects/Effect.tscn", "res://effects/Explosion.tscn", "res://effects/ExplosionRefuel.tscn", "res://effects/ExplosionWithWave.tscn", "res://effects/ShockWave.tscn", "res://effects/Wave.gd", "res://effects/WaveEmitter.gd", "res://effects/WaveEmitter.tscn", "res://global/GlobalState.gd", "res://global/PlayerState.gd", "res://global/Utils.gd", "res://icon.png", "res://objects/BlackHole.tscn", "res://objects/Body.gd", "res://objects/Camera.gd", "res://objects/Camera.tscn", "res://objects/KBody.gd", "res://objects/KBody.tscn", "res://objects/Player.gd", "res://objects/Player.tscn", "res://objects/Refuel.gd", "res://objects/Refuel.tscn", "res://objects/Stars/BlueGiant.tscn", "res://objects/Stars/BrownDwarf.tscn", "res://objects/Stars/RedDwarf.tscn", "res://objects/Stars/RedGiant.tscn", "res://objects/Stars/RedSuperGiant.tscn", "res://objects/Stars/WhiteDwarf.tscn", "res://objects/Stars/YellowDwarf.tscn", "res://objects/Stars/star1.tscn", "res://objects/Stars/star2.tscn", "res://objects/Stars/star3.tscn", "res://objects/Stars/star4.tscn", "res://objects/Stars/sun.tscn", "res://objects/blackhole.gd", "res://objects/star_shader.shader", "res://objects/sun.gd", "res://scenes/DrawingCanvas.gd", "res://scenes/HUD.gd", "res://scenes/HUD.tres", "res://scenes/HUD.tscn", "res://scenes/World.gd", "res://scenes/World.tscn", "res://shaders/bloom.shader", "res://shaders/color.shader", "res://shaders/distort.shader", "res://shaders/edge_dissolve.shader", "res://shaders/fog.shader", "res://shaders/glow.shader", "res://shaders/saturation.shader", "res://shaders/shockwave.shader", "res://shaders/sun.shader" ) include_filter="" -exclude_filter="" -export_path="" +exclude_filter="*.exr" +export_path="../../tmp/GravityDemo.html" script_export_mode=1 script_encryption_key="" @@ -116,8 +119,10 @@ script_encryption_key="" custom_template/debug="" custom_template/release="" -custom_template/use_custom_build=false -custom_template/export_format=0 +custom_build/use_custom_build=false +custom_build/export_format=0 +custom_build/min_sdk="" +custom_build/target_sdk="" architectures/armeabi-v7a=true architectures/arm64-v8a=true architectures/x86=false @@ -131,8 +136,6 @@ keystore/release_password="" one_click_deploy/clear_previous_install=false version/code=1 version/name="1.0" -version/min_sdk=19 -version/target_sdk=30 package/unique_name="org.godotengine.$genname" package/name="" package/signed=true @@ -142,7 +145,6 @@ package/exclude_from_recents=false launcher_icons/main_192x192="" launcher_icons/adaptive_foreground_432x432="" launcher_icons/adaptive_background_432x432="" -graphics/32_bits_framebuffer=true graphics/opengl_debug=false xr_features/xr_mode=0 xr_features/hand_tracking=0 @@ -231,6 +233,7 @@ 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 @@ -332,8 +335,49 @@ application/short_version="1.0" application/version="1.0" application/copyright="" display/high_res=false -privacy/camera_usage_description="" privacy/microphone_usage_description="" +privacy/camera_usage_description="" +privacy/location_usage_description="" +privacy/address_book_usage_description="" +privacy/calendar_usage_description="" +privacy/photos_library_usage_description="" +privacy/desktop_folder_usage_description="" +privacy/documents_folder_usage_description="" +privacy/downloads_folder_usage_description="" +privacy/network_volumes_usage_description="" +privacy/removable_volumes_usage_description="" +codesign/enable=true +codesign/identity="" +codesign/timestamp=true +codesign/hardened_runtime=true +codesign/replace_existing_signature=true +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/custom_options=PoolStringArray( ) +notarization/enable=false +notarization/apple_id_name="" +notarization/apple_id_password="" +notarization/apple_team_id="" texture_format/s3tc=true texture_format/etc=false texture_format/etc2=false diff --git a/icon.png b/icon.png index 9262591..c407d07 100644 Binary files a/icon.png and b/icon.png differ diff --git a/objects/Camera.gd b/objects/Camera.gd index 0e5b95f..0685611 100644 --- a/objects/Camera.gd +++ b/objects/Camera.gd @@ -6,6 +6,10 @@ export var keyboard_zoom_multiplier = 1.01 export var scroll_wheel_zoom_multiplier = 1.08 export var drag_multiplier = 0.05 +onready var far_sprite = $ParallaxBackground/Far/Sprite +onready var mid_sprite = $ParallaxBackground/Mid/Sprite +onready var close_sprite = $ParallaxBackground/Close/Sprite + onready var current_scene = get_tree().get_current_scene() onready var player = current_scene.get_node("Player") onready var hud = current_scene.get_node("HUD") @@ -15,14 +19,26 @@ var drags = PoolVector2Array() var attached = true var paralax_layers = [] + func _ready(): + + # Change textures for some exports + match OS.get_name(): + # "Android": + "HTML5": + far_sprite.texture = load("res://assets/bgfar.jpeg") + mid_sprite.texture = load("res://assets/bgmedium.jpeg") + close_sprite.texture = load("res://assets/bgclose.jpeg") + for layer in Utils.get_children_with_type(self, ParallaxLayer): paralax_layers.append([layer, layer.motion_scale]) + func scale_click_areas(): for body in GlobalState.kbodies: body.scale_click_area(zoom) + func update_paralax(): """Change paralax on zooming""" for layer in paralax_layers: @@ -32,6 +48,7 @@ func update_paralax(): # HACK This is so the paralax doesn't disappear when detached global_position += Vector2(0, -10) + func _process(delta): var input_vector = Vector2.ZERO input_vector.x = Input.get_action_strength("cam_right") - Input.get_action_strength("cam_left") @@ -89,6 +106,7 @@ func _process(delta): global_position = track_object.global_position hud.set_tracking(track_object) + func _unhandled_input(event): if event is InputEventScreenDrag: var input_vector = Vector2(event.relative[0], event.relative[1]) diff --git a/project.godot b/project.godot index 284537b..c4ea00c 100644 --- a/project.godot +++ b/project.godot @@ -31,6 +31,34 @@ drag=false [input] +ui_left={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null) + ] +} +ui_right={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null) + ] +} +ui_up={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null) + ] +} +ui_down={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null) + ] +} cam_up={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777358,"physical_scancode":0,"unicode":0,"echo":false,"script":null) diff --git a/scenes/World.gd b/scenes/World.gd index cda334c..c275072 100644 --- a/scenes/World.gd +++ b/scenes/World.gd @@ -27,6 +27,7 @@ const simulation_speed_faker = 1 var kbodies = [] + func _ready(): OS.low_processor_usage_mode = true @@ -67,6 +68,7 @@ func _unhandled_input(event): simulation_speed = timescale_keymap[event.scancode] GlobalState.timescale = simulation_speed + func _on_HUD_time_scale_changed(value): simulation_speed = value Engine.time_scale = simulation_speed * simulation_speed_faker diff --git a/scenes/World.tscn b/scenes/World.tscn index 15e5926..1e845c8 100644 --- a/scenes/World.tscn +++ b/scenes/World.tscn @@ -319,6 +319,11 @@ capacity = 50.0 position = Vector2( -838, 6323 ) color = Color( 0.905882, 0.141176, 0.0823529, 1 ) death_effect = ExtResource( 14 ) +fuel_consunption_rate = 3 +spin_fuel_consunption_rate = 0.5 +power = 12 +break_power = 4 +refuel_rate = 10 [node name="BlackHoles" type="Node2D" parent="."] @@ -332,9 +337,6 @@ visible = false [node name="WaveEmitter2" parent="Waves" instance=ExtResource( 15 )] position = Vector2( 498, 4877 ) lifetime = 10.0 -spawn_props = { -"lifetime": 10.0 -} [connection signal="time_scale_changed" from="HUD" to="." method="_on_HUD_time_scale_changed"] [connection signal="toggle_gravity" from="HUD" to="." method="_on_HUD_toggle_gravity"]