Compare commits

...

12 Commits

Author SHA1 Message Date
31b7b5ea0c adding windows ARM target
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 17s
Create tag and build when new code gets to main / Export (push) Successful in 6m40s
2025-11-05 11:06:51 +01:00
78ab2cc637 small changes
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 16s
Create tag and build when new code gets to main / Export (push) Successful in 4m34s
2025-10-31 16:31:21 +01:00
fd16342aca getting the weapon tutorial
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 16s
Create tag and build when new code gets to main / Export (push) Successful in 4m47s
2025-10-31 16:18:59 +01:00
2d3a1b0d4c lift fix
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 16s
Create tag and build when new code gets to main / Export (push) Successful in 4m48s
2025-10-31 11:04:42 +01:00
1c7abeb0d9 tutorial is set up and final lift as well
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 4m49s
2025-10-29 18:48:49 +01:00
97828ecdda tutorial is set up and final lift as well
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Has been cancelled
2025-10-29 18:47:52 +01:00
9d8877cc67 fov fix
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 16s
Create tag and build when new code gets to main / Export (push) Successful in 4m49s
2025-10-28 14:12:32 +01:00
fd7b55452b basic tutorial layout 2025-10-28 14:08:41 +01:00
1cafe6e96d removing import clause on windows export
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 13s
Create tag and build when new code gets to main / Export (push) Successful in 4m30s
2025-10-27 10:41:32 +01:00
ea8821b41a back to base main menu
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 12s
Create tag and build when new code gets to main / Export (push) Successful in 7m51s
2025-10-27 10:15:00 +01:00
8338ce3dd9 trying to change the autoload class name and extends order to fix release issue
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 12s
Create tag and build when new code gets to main / Export (push) Has been cancelled
2025-10-27 10:14:11 +01:00
39f45d418f trying to add a console to release
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 12s
Create tag and build when new code gets to main / Export (push) Successful in 7m32s
2025-10-27 09:49:52 +01:00
26 changed files with 1819 additions and 862 deletions

View File

@@ -57,18 +57,23 @@ jobs:
- name: Build Windows
run: |
mkdir -v -p build/windows
godot --headless --verbose --build-solutions --import --export-release "Windows Desktop" build/windows/${{ env.GAME_NAME }}.exe
godot --headless --verbose --build-solutions --export-release "Windows Desktop" build/windows/${{ env.GAME_NAME }}.exe
zip -r Windows.zip build/windows
- name: Linux Build
- name: Build Windows ARM
run: |
mkdir -v -p build/linux
godot --headless --verbose --export-release "Linux/X11" build/linux/${{ env.GAME_NAME }}.x86_64
zip -r Linux.zip build/linux
- name: Mac Build
run: |
mkdir -v -p build/mac
godot --headless --verbose --export-release "macOS" build/mac/${{ env.GAME_NAME }}.zip
zip -r Mac.zip build/mac
mkdir -v -p build/windowsArm
godot --headless --verbose --build-solutions --export-release "Windows ARM" build/windowsArm/${{ env.GAME_NAME }}.exe
zip -r WindowsArm.zip build/windowsArm
# - name: Linux Build
# run: |
# mkdir -v -p build/linux
# godot --headless --verbose --export-release "Linux/X11" build/linux/${{ env.GAME_NAME }}.x86_64
# zip -r Linux.zip build/linux
# - name: Mac Build
# run: |
# mkdir -v -p build/mac
# godot --headless --verbose --export-release "macOS" build/mac/${{ env.GAME_NAME }}.zip
# zip -r Mac.zip build/mac
- name: Upload to Itch
uses: KikimoraGames/itch-publish@v0.0.3
@@ -86,14 +91,23 @@ jobs:
itchUsername: ${{ env.ITCHIO_USERNAME }}
itchGameId: ${{ env.ITCHIO_GAMEID }}
buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
gameData: Linux.zip
buildChannel: linux
- name: Upload to Itch
uses: KikimoraGames/itch-publish@v0.0.3
with:
butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
itchUsername: ${{ env.ITCHIO_USERNAME }}
itchGameId: ${{ env.ITCHIO_GAMEID }}
buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
gameData: Mac.zip
buildChannel: mac
gameData: WindowsArm.zip
buildChannel: windows-arm
# - name: Upload to Itch
# uses: KikimoraGames/itch-publish@v0.0.3
# with:
# butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
# itchUsername: ${{ env.ITCHIO_USERNAME }}
# itchGameId: ${{ env.ITCHIO_GAMEID }}
# buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
# gameData: Linux.zip
# buildChannel: linux
# - name: Upload to Itch
# uses: KikimoraGames/itch-publish@v0.0.3
# with:
# butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
# itchUsername: ${{ env.ITCHIO_USERNAME }}
# itchGameId: ${{ env.ITCHIO_GAMEID }}
# buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
# gameData: Mac.zip
# buildChannel: mac

View File

@@ -1,5 +1,5 @@
class_name SceneLoaderClass
extends Node
class_name SceneLoaderClass
## Autoload class for loading scenes with an optional loading screen.
signal scene_loaded

Binary file not shown.

File diff suppressed because one or more lines are too long

28
assets/lift/lift.gd Normal file
View File

@@ -0,0 +1,28 @@
extends Node3D
var lift_already_used : bool = false
@export var end_location : Vector3 = Vector3.ZERO
@export var lift_time : float = 1.0
@onready var button: MeshInstance3D = $Cylinder_001
func start_climbing() -> void:
var elevator_tween = get_tree().create_tween()
elevator_tween.set_ease(Tween.EASE_IN_OUT)
elevator_tween.set_trans(Tween.TRANS_CUBIC)
elevator_tween.tween_property(self, "global_position", end_location, lift_time)
func _on_area_3d_body_entered(body: Node3D) -> void:
if lift_already_used:
return
if is_instance_of(body, CharacterBody3D):
lift_already_used = true
var button_tween = get_tree().create_tween()
var button_final_pos = button.global_position + Vector3.DOWN * 0.35
button_tween.tween_property(button, "global_position", button_final_pos, 0.3)
button_tween.tween_callback(start_climbing)

1
assets/lift/lift.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://c1w84vh3bqijr

BIN
assets/lift/lift.glb Normal file

Binary file not shown.

View File

@@ -0,0 +1,42 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cc2vcuaulfks3"
path="res://.godot/imported/lift.glb-e7e66d0f097e30a0a067073f130adce8.scn"
[deps]
source_file="res://assets/lift/lift.glb"
dest_files=["res://.godot/imported/lift.glb-e7e66d0f097e30a0a067073f130adce8.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1

41
assets/lift/lift.tscn Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@@ -5,11 +5,11 @@ bus/1/name = &"Music"
bus/1/solo = false
bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = -6.5788474
bus/1/volume_db = -26.595549
bus/1/send = &"Master"
bus/2/name = &"SFX"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = -10.074136
bus/2/volume_db = -8.798218
bus/2/send = &"Master"

View File

@@ -26,7 +26,7 @@ debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=false
shader_baker/enabled=true
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
@@ -72,11 +72,11 @@ script_export_mode=2
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
debug/export_console_wrapper=2
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=false
shader_baker/enabled=true
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
@@ -125,55 +125,6 @@ texture_format/etc2=false
[preset.2]
name="Web"
platform="Web"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
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=""
variant/extensions_support=false
variant/thread_support=true
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/ensure_cross_origin_isolation_headers=true
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)
threads/emscripten_pool_size=8
threads/godot_pool_size=4
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=true
dotnet/embed_build_outputs=false
[preset.3]
name="macOS"
platform="macOS"
runnable=true
@@ -192,7 +143,7 @@ encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.3.options]
[preset.2.options]
export/distribution_type=1
binary_format/architecture="universal"
@@ -212,7 +163,7 @@ application/min_macos_version_x86_64="10.12"
application/min_macos_version_arm64="11.00"
application/export_angle=0
display/high_res=true
shader_baker/enabled=false
shader_baker/enabled=true
application/additional_plist_content=""
xcode/platform_build="14C18"
xcode/sdk_version="13.1"
@@ -430,3 +381,74 @@ dotnet/include_scripts_content=false
dotnet/include_debug_symbols=true
dotnet/embed_build_outputs=false
application/min_macos_version="10.12"
[preset.3]
name="Windows ARM"
platform="Windows Desktop"
runnable=false
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.3.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=true
binary_format/architecture="arm64"
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=""
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
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
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 -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$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}'"
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=true
dotnet/embed_build_outputs=false

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=16 format=3 uid="uid://dmkw8cmalm5k"]
[gd_scene load_steps=20 format=3 uid="uid://dmkw8cmalm5k"]
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_2vsi6"]
[ext_resource type="Texture2D" uid="uid://ca4kkq3w8cd4n" path="res://assets/sky/sky_15_2k.png" id="2_ruo5i"]
@@ -12,6 +12,9 @@
[ext_resource type="AudioStream" uid="uid://f8cvr5s041ej" path="res://assets/audio/ambiance/637083__nox_sound__ambiance_nature_night_cricket_calm_loop_stereo.wav" id="10_eca4n"]
[ext_resource type="PackedScene" uid="uid://dip6cce5gtwi8" path="res://assets/greyboxing/guard_tower.tscn" id="11_wctvs"]
[ext_resource type="PackedScene" uid="uid://c066hc7yu36wx" path="res://assets/water/water.tscn" id="12_i2xii"]
[ext_resource type="PackedScene" uid="uid://gir68sk3762e" path="res://assets/lift/lift.tscn" id="13_eca4n"]
[ext_resource type="CylinderMesh" uid="uid://bhkbwvuft1bpg" path="res://systems/weapon/weapon_tuto.tres" id="14_0ari0"]
[ext_resource type="Script" uid="uid://v4nnql2laqdn" path="res://systems/weapon/placed_tutorial_weapon.gd" id="15_165wb"]
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_feb1n"]
panorama = ExtResource("2_ruo5i")
@@ -27,19 +30,26 @@ reflected_light_source = 2
tonemap_mode = 4
ssao_enabled = true
ssil_enabled = true
sdfgi_enabled = true
sdfgi_use_occlusion = true
fog_light_color = Color(1, 1, 1, 1)
fog_density = 0.001
fog_sky_affect = 0.121
volumetric_fog_enabled = true
fog_enabled = true
fog_light_color = Color(0.9955967, 0.83634025, 0.69151855, 1)
fog_sun_scatter = 0.5
fog_density = 0.002
fog_sky_affect = 0.184
volumetric_fog_density = 0.004
volumetric_fog_emission = Color(1, 1, 1, 1)
volumetric_fog_anisotropy = 0.6
[sub_resource type="BoxShape3D" id="BoxShape3D_0ari0"]
size = Vector3(11.5, 9, 4.5)
[node name="Main" type="Node3D"]
[node name="Player" parent="." instance=ExtResource("1_2vsi6")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.21207, 64.344444, -41.363285)
[node name="Player" parent="." node_paths=PackedStringArray("TutorialWeaponTarget") instance=ExtResource("1_2vsi6")]
transform = Transform3D(0.054514527, 0, -0.9985129, 0, 1, 0, 0.9985129, 0, 0.054514527, -1.2857323, -132.74933, 116.15933)
collision_layer = 17
TutorialWeaponTarget = NodePath("../PlacedTutorialWeapon/WeaponLocationTarget")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_1bvp3")
@@ -77,3 +87,42 @@ pause = ExtResource("10_0ari0")
[node name="BackgroundMusicPlayer" parent="." instance=ExtResource("9_i2xii")]
stream = ExtResource("10_eca4n")
[node name="Lift" parent="." instance=ExtResource("13_eca4n")]
transform = Transform3D(0.9961947, 0, -0.08715573, 0, 1, 0, 0.08715573, 0, 0.9961947, -4.593, 1.618, 0.583)
end_location = Vector3(-4.593, 116.11, 0.583)
lift_time = 15.0
[node name="PlacedTutorialWeapon" type="MeshInstance3D" parent="."]
transform = Transform3D(-2, 3.019916e-07, 0, -3.019916e-07, -2, 0, 0, 0, 2, -17.904, -79.265, 145.317)
mesh = ExtResource("14_0ari0")
script = ExtResource("15_165wb")
[node name="SpotLight3D" type="SpotLight3D" parent="PlacedTutorialWeapon"]
transform = Transform3D(1, -1.509958e-07, 6.600236e-15, 0, -4.371139e-08, -1, 1.509958e-07, 1, -4.371139e-08, 0, -2.3931274, 0)
spot_range = 9.85
spot_attenuation = 0.46
spot_angle = 15.0
[node name="WeaponLocationTarget" type="Marker3D" parent="PlacedTutorialWeapon"]
[node name="TutorialDoneArea" type="Area3D" parent="."]
transform = Transform3D(0.9961947, 0, -0.08715574, 0, 1, 0, 0.08715574, 0, 0.9961947, -17, -79, 125.5)
collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="TutorialDoneArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7500105, 4, 0.7499695)
shape = SubResource("BoxShape3D_0ari0")
[node name="WeaponRetrieved" type="Area3D" parent="."]
transform = Transform3D(0.9961947, 0, -0.08715574, 0, 1, 0, 0.08715574, 0, 0.9961947, -18, -79, 145)
collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="WeaponRetrieved"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7500105, 4, 0.7499695)
shape = SubResource("BoxShape3D_0ari0")
[connection signal="body_entered" from="TutorialDoneArea" to="Player" method="OnTutorialDone"]
[connection signal="body_entered" from="WeaponRetrieved" to="PlacedTutorialWeapon" method="_on_weapon_retrieved_body_entered"]

View File

@@ -134,7 +134,7 @@ target_position = Vector3(0, -0.75, 0)
[node name="MantleSystem" parent="." instance=ExtResource("8_qu4wy")]
MantleEndLocationDistanceFromWall = 0.3
MantleHeightCastStart = 1.5
MantleHeightCastStart = 2.0
[node name="Bobbing" type="Node3D" parent="."]
script = ExtResource("10_7wk1w")
@@ -212,6 +212,7 @@ one_shot = true
ignore_time_scale = true
[node name="StateChartDebugger" parent="." instance=ExtResource("24_q5h8a")]
visible = false
offset_left = 1524.0
offset_top = 1.0
offset_right = -8.0
@@ -251,15 +252,24 @@ expand_mode = 2
[node name="DashCooldownIndicator" type="ColorRect" parent="UI"]
unique_name_in_owner = true
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 910.0
offset_top = 549.0
offset_right = 1010.0
offset_bottom = 559.0
offset_right = -910.0
offset_bottom = -521.0
grow_horizontal = 2
grow_vertical = 2
[node name="CenterContainer" type="CenterContainer" parent="UI"]
custom_minimum_size = Vector2(1920, 1080)
offset_right = 1919.0
offset_bottom = 1080.0
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -1.0
grow_horizontal = 2
grow_vertical = 2
[node name="CenterIcon" type="TextureRect" parent="UI/CenterContainer"]
material = SubResource("CanvasItemMaterial_2q0ik")
@@ -365,44 +375,6 @@ to = NodePath("../../AtLeastOneCharge")
event = &"power_used"
delay_in_seconds = "0.0"
[node name="WeaponState" type="Node" parent="StateChart/Root"]
script = ExtResource("26_infe6")
initial_state = NodePath("InHand")
metadata/_custom_type_script = "uid://c1vp0ojjvaby1"
[node name="ToPlanted" type="Node" parent="StateChart/Root/WeaponState"]
script = ExtResource("28_n7qhm")
to = NodePath("../Planted")
event = &"plant_weapon"
delay_in_seconds = "0.0"
[node name="ToHand" type="Node" parent="StateChart/Root/WeaponState"]
script = ExtResource("28_n7qhm")
to = NodePath("../InHand")
event = &"recover_weapond"
delay_in_seconds = "0.0"
[node name="InHand" type="Node" parent="StateChart/Root/WeaponState"]
script = ExtResource("27_34snm")
[node name="ToThrown" type="Node" parent="StateChart/Root/WeaponState/InHand"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Flying")
event = &"throw"
delay_in_seconds = "0.0"
[node name="Flying" type="Node" parent="StateChart/Root/WeaponState"]
script = ExtResource("27_34snm")
[node name="ToPlanted" type="Node" parent="StateChart/Root/WeaponState/Flying"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Planted")
event = &"plant_weapon"
delay_in_seconds = "0.0"
[node name="Planted" type="Node" parent="StateChart/Root/WeaponState"]
script = ExtResource("27_34snm")
[node name="Movement" type="Node" parent="StateChart/Root"]
script = ExtResource("26_infe6")
initial_state = NodePath("Grounded")

View File

@@ -50,6 +50,8 @@ public partial class PlayerController : CharacterBody3D
private Timer _timeScaleAimInAirTimer;
private Timer _simpleDashCooldownTimer;
private Timer _powerCooldownTimer;
[Export] public Marker3D TutorialWeaponTarget;
[ExportCategory("Movement")]
[ExportGroup("Ground")]
@@ -156,26 +158,22 @@ public partial class PlayerController : CharacterBody3D
PlayerUi.SetNumberOfDashesLeft(value);
}
}
public bool TutorialDone { get; set; } = false;
private bool _canDashAirborne = true;
private bool _isWallJumpAvailable = true;
private bool _canDash = true;
private bool _shouldMantleOnDashEnded = false;
private StateChart _playerState;
private StateChartState _weaponInHand;
private StateChartState _aiming;
private StateChartState _weaponThrown;
private StateChartState _actionHanging;
private StateChartState _empowerOn;
private StateChartState _empowerOff;
private StateChartState _powerExpired;
private StateChartState _powerRecharging;
private StateChartState _powerFull;
private StateChartState _grounded;
private StateChartState _mantling;
private StateChartState _movHanging;
private StateChartState _airborne;
private StateChartState _coyoteEnabled;
private StateChartState _simpleJump;
@@ -184,13 +182,9 @@ public partial class PlayerController : CharacterBody3D
private StateChartState _simpleDash;
private StateChartState _poweredDash;
private StateChartState _aimedDash;
private StateChartState _doubleJumpEnabled;
private StateChartState _onWall;
private StateChartState _onWallHugCanceled;
private StateChartState _onWallHugging;
private StateChartState _onWallHanging;
private StateChartState _falling;
private StateChartState _to_weapon_dash;
private Transition _onJumpFromWall;
private Transition _onMegajumpFromWall;
@@ -277,31 +271,22 @@ public partial class PlayerController : CharacterBody3D
// State management
_playerState = StateChart.Of(GetNode("StateChart"));
_weaponInHand = StateChartState.Of(GetNode("StateChart/Root/WeaponState/InHand"));
_weaponThrown = StateChartState.Of(GetNode("StateChart/Root/WeaponState/Flying"));
_aiming = StateChartState.Of(GetNode("StateChart/Root/Aim/On"));
_simpleDash = StateChartState.Of(GetNode("StateChart/Root/Movement/Dashing/Dash"));
_poweredDash = StateChartState.Of(GetNode("StateChart/Root/Movement/Dashing/PoweredDash"));
_aimedDash = StateChartState.Of(GetNode("StateChart/Root/Movement/Dashing/AimedDash"));
// _actionHanging = StateChartState.Of(GetNode("StateChart/Root/Actions/Hanging"));
_empowerOn = StateChartState.Of(GetNode("StateChart/Root/Empower/On"));
_empowerOff = StateChartState.Of(GetNode("StateChart/Root/Empower/Off"));
_powerExpired = StateChartState.Of(GetNode("StateChart/Root/PowerReserve/Expired"));
_powerRecharging = StateChartState.Of(GetNode("StateChart/Root/PowerReserve/AtLeastOneCharge"));
_powerFull = StateChartState.Of(GetNode("StateChart/Root/PowerReserve/Full"));
_grounded = StateChartState.Of(GetNode("StateChart/Root/Movement/Grounded"));
_mantling = StateChartState.Of(GetNode("StateChart/Root/Movement/Mantling"));
_movHanging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hanging"));
_airborne = StateChartState.Of(GetNode("StateChart/Root/Movement/Airborne"));
_coyoteEnabled = StateChartState.Of(GetNode("StateChart/Root/Movement/Airborne/CoyoteEnabled"));
_simpleJump = StateChartState.Of(GetNode("StateChart/Root/Movement/Jump/SimpleJump"));
_doubleJump = StateChartState.Of(GetNode("StateChart/Root/Movement/Jump/DoubleJump"));
_megaJump = StateChartState.Of(GetNode("StateChart/Root/Movement/Jump/MegaJump"));
_doubleJumpEnabled = StateChartState.Of(GetNode("StateChart/Root/Movement/Airborne/DoubleJumpEnabled"));
_falling = StateChartState.Of(GetNode("StateChart/Root/Movement/Airborne/Falling"));
_to_weapon_dash = StateChartState.Of(GetNode("StateChart/Root/Movement/Dashing/ToWeaponDash"));
_onWall = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall"));
_onJumpFromWall = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/OnJump"));
_onMegajumpFromWall = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/OnMegajump"));
_onWallHugging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hugging"));
@@ -347,11 +332,11 @@ public partial class PlayerController : CharacterBody3D
Stamina.SetSpeeds(WalkSpeed, WalkSpeed);
EmpoweredActionsLeft = MaxNumberOfEmpoweredActions;
PlaceWeaponForTutorial();
///////////////////////////
// Signal setup ///////////
///////////////////////////
_weaponInHand.StateProcessing += HandleWeaponInHand;
_aiming.StatePhysicsProcessing += HandleAiming;
_aiming.StateEntered += OnAimingEntered;
_aiming.StateExited += ResetTimeScale;
@@ -363,8 +348,6 @@ public partial class PlayerController : CharacterBody3D
_coyoteEnabled.StateEntered += StartCoyoteTime;
_timeScaleAimInAirTimer.Timeout += ResetTimeScale;
// _weaponThrown.StateEntered += OnWeaponThrown;
_powerFull.StateEntered += StopPowerCooldown;
_powerFull.StateExited += StartPowerCooldown;
@@ -401,8 +384,12 @@ public partial class PlayerController : CharacterBody3D
_onJumpFromWall.Taken += OnJumpFromWall;
_onMegajumpFromWall.Taken += OnMegajumpFromWall;
}
private bool _canDashAirborne = true;
public void OnTutorialDone(Node3D _)
{
TutorialDone = true;
GD.Print("tutorial done");
}
public void OnWallDetected()
{
@@ -532,7 +519,7 @@ public partial class PlayerController : CharacterBody3D
public Vector3 ComputeHVelocity(float delta, float accelerationFactor, float decelerationFactor, Vector3? direction = null)
{
var dir = direction ?? HeadSystem.Transform.Basis * _inputMove;
var dir = direction ?? Transform.Basis * HeadSystem.Transform.Basis * _inputMove;
var acceleration = dir.Length() > 0 ? accelerationFactor : decelerationFactor;
@@ -833,6 +820,14 @@ public partial class PlayerController : CharacterBody3D
{
_playerState.SendEvent("dash_finished");
}
public void PlaceWeaponForTutorial()
{
RemoveChild(WeaponRoot);
GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, WeaponRoot);
WeaponRoot.CallDeferred(Node3D.MethodName.SetGlobalPosition, TutorialWeaponTarget.GlobalPosition);
WeaponSystem.CallDeferred(WeaponSystem.MethodName.PlaceWeaponForTutorial, TutorialWeaponTarget.GlobalPosition);
}
public void ThrowWeapon()
{
@@ -875,7 +870,7 @@ public partial class PlayerController : CharacterBody3D
public Vector3 GetInputGlobalHDirection()
{
var direction = HeadSystem.Transform.Basis * _inputMove;
var direction = Transform.Basis * HeadSystem.Transform.Basis * _inputMove;
return new Vector3(direction.X, 0, direction.Z).Normalized();
}
@@ -914,7 +909,7 @@ public partial class PlayerController : CharacterBody3D
public bool CanPerformEmpoweredAction()
{
return EmpoweredActionsLeft > 0;
return EmpoweredActionsLeft > 0 && TutorialDone;
}
public void PerformEmpoweredAction()
@@ -949,13 +944,6 @@ public partial class PlayerController : CharacterBody3D
_playerState.SendEvent("grounded");
}
// Regular processes
public void HandleWeaponInHand(float delta)
{
if (WeaponSystem.InHandState.Active)
RotateWeaponWithPlayer();
}
///////////////////////////
// Stateless logic ////////
///////////////////////////
@@ -1105,12 +1093,15 @@ public partial class PlayerController : CharacterBody3D
CameraModifications((float) delta);
HandleStairs((float) delta);
if (WeaponSystem.InHandState.Active && !_aiming.Active)
if (WeaponSystem.InHandState.Active)
RotateWeaponWithPlayer();
if (WeaponSystem.InHandState.Active && !_aiming.Active && TutorialDone)
{
DashIndicatorMesh.Visible = false;
}
if (!WeaponSystem.InHandState.Active)
if (!WeaponSystem.InHandState.Active && TutorialDone)
{
DashIndicatorMesh.Visible = true;

View File

@@ -15,7 +15,7 @@ warnings/check_invalid_track_paths=false
[application]
config/name="Movement tests"
run/main_scene="uid://br8shfwk2lne0"
run/main_scene="uid://vm22i5sv3p3s"
config/features=PackedStringArray("4.5", "C#", "Forward Plus")
config/icon="res://icon.svg"
@@ -154,7 +154,9 @@ copy_path="res://scenes"
[physics]
common/physics_jitter_fix=0.0
3d/physics_engine="Jolt Physics"
common/physics_interpolation=true
[rendering]

View File

@@ -6,6 +6,7 @@ namespace Movementtests.systems;
public partial class HeadSystem : Node3D
{
private Camera3D _camera;
private Marker3D _cameraAnchor;
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float LookSensitivity { get; set; } = 1f;
@@ -14,6 +15,7 @@ public partial class HeadSystem : Node3D
{
Input.SetMouseMode(Input.MouseModeEnum.Captured);
_camera = GetNode<Camera3D>("CameraSmooth/Camera3D");
_cameraAnchor = GetNode<Marker3D>("CameraAnchor");
}
public void LookAround(Vector2 lookDir, float sensitivitMultiplier = 1f)
@@ -23,11 +25,12 @@ public partial class HeadSystem : Node3D
RotateY(angleForHorizontalRotation);
// Vertical movement of head
Vector3 currentCameraRotation = _camera.Rotation;
Vector3 currentCameraRotation = _cameraAnchor.Rotation;
currentCameraRotation.X += Convert.ToSingle(lookDir.Y * LookSensitivity * sensitivitMultiplier);
currentCameraRotation.X = Mathf.Clamp(currentCameraRotation.X, Mathf.DegToRad(-90f), Mathf.DegToRad(90f));
_camera.Rotation = currentCameraRotation;
_cameraAnchor.Rotation = currentCameraRotation;
_camera.GlobalTransform = _cameraAnchor.GetGlobalTransformInterpolated();
}
public Vector3 GetForwardHorizontalVector()

View File

@@ -16,8 +16,8 @@ script = ExtResource("1_8abgy")
[node name="CameraSmooth" type="Node3D" parent="."]
[node name="Camera3D" type="Camera3D" parent="CameraSmooth"]
transform = Transform3D(0.15, 0, 0, 0, 0.15, 0, 0, 0, 0.15, 0, 0, 0)
current = true
fov = 90.0
[node name="CLVignette(Layer_1)" type="CanvasLayer" parent="CameraSmooth/Camera3D"]
@@ -57,3 +57,5 @@ mouse_filter = 2
[node name="RayCast3D" type="RayCast3D" parent="CameraSmooth/Camera3D"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, -0.64723)
visible = false
[node name="CameraAnchor" type="Marker3D" parent="."]

View File

@@ -6,6 +6,7 @@
height = 1.7
[sub_resource type="SphereShape3D" id="SphereShape3D_2oobp"]
radius = 0.75
[node name="MantleSystem" type="Node3D"]
script = ExtResource("1_2oobp")

View File

@@ -81,6 +81,15 @@ public partial class WeaponSystem : RigidBody3D
EmitSignalWeaponRetrieved();
}
public void PlaceWeaponForTutorial(Vector3 location)
{
_weaponState.SendEvent("plant");
Freeze = true;
GlobalPosition = location;
PlantLocation = location;
Visible = false;
}
public void ThrowWeapon(Vector3 end, bool hasHit, Vector3 collisionLocation, Vector3 collisionNormal)
{
_weaponState.SendEvent("throw");
@@ -126,6 +135,7 @@ public partial class WeaponSystem : RigidBody3D
_weaponState.SendEvent("recover");
Transform = _startTransform;
Freeze = true;
Visible = true;
}
public override void _IntegrateForces(PhysicsDirectBodyState3D state)

View File

@@ -0,0 +1,5 @@
extends MeshInstance3D
func _on_weapon_retrieved_body_entered(body: Node3D) -> void:
visible = false

View File

@@ -0,0 +1 @@
uid://v4nnql2laqdn

View File

@@ -0,0 +1,13 @@
[gd_resource type="CylinderMesh" load_steps=2 format=3 uid="uid://b7vt0nk2htpo4"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jv82r"]
use_z_clip_scale = true
z_clip_scale = 0.9
use_fov_override = true
fov_override = 70.0
[resource]
material = SubResource("StandardMaterial3D_jv82r")
top_radius = 0.0
bottom_radius = 0.05
height = 1.0

View File

@@ -1,8 +1,9 @@
[gd_scene load_steps=13 format=3 uid="uid://ckm3d6k08a72u"]
[gd_scene load_steps=12 format=3 uid="uid://ckm3d6k08a72u"]
[ext_resource type="Script" uid="uid://iii3wfto4t5b" path="res://systems/weapon/WeaponSystem.cs" id="1_csqwk"]
[ext_resource type="PackedScene" uid="uid://dbe5f0p6lvqtr" path="res://systems/tween_queue/tween_queue_system.tscn" id="2_x1nha"]
[ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="3_5owyf"]
[ext_resource type="CylinderMesh" uid="uid://b7vt0nk2htpo4" path="res://systems/weapon/weapon.tres" id="3_svc06"]
[ext_resource type="Script" uid="uid://jk2jm1g6q853" path="res://addons/godot_state_charts/compound_state.gd" id="4_svc06"]
[ext_resource type="Script" uid="uid://cytafq8i1y8qm" path="res://addons/godot_state_charts/atomic_state.gd" id="5_m0v1h"]
[ext_resource type="Script" uid="uid://cf1nsco3w0mf6" path="res://addons/godot_state_charts/transition.gd" id="6_jpdh0"]
@@ -11,23 +12,12 @@
height = 1.0
radius = 0.1
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_5owyf"]
use_z_clip_scale = true
z_clip_scale = 0.9
use_fov_override = true
fov_override = 70.0
[sub_resource type="CylinderMesh" id="CylinderMesh_x1nha"]
material = SubResource("StandardMaterial3D_5owyf")
top_radius = 0.0
bottom_radius = 0.05
height = 1.0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_svc06"]
render_priority = 1
transparency = 1
no_depth_test = true
shading_mode = 0
grow_amount = 0.1
stencil_mode = 3
stencil_flags = 1
stencil_compare = 5
@@ -62,7 +52,7 @@ shape = SubResource("CylinderShape3D_avini")
[node name="Weapon" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0)
mesh = SubResource("CylinderMesh_x1nha")
mesh = ExtResource("3_svc06")
[node name="StateChart" type="Node" parent="."]
script = ExtResource("3_5owyf")
@@ -72,6 +62,12 @@ metadata/_custom_type_script = "uid://couw105c3bde4"
script = ExtResource("4_svc06")
initial_state = NodePath("InHand")
[node name="ToPlanted" type="Node" parent="StateChart/Root"]
script = ExtResource("6_jpdh0")
to = NodePath("../Planted")
event = &"plant"
delay_in_seconds = "0.0"
[node name="InHand" type="Node" parent="StateChart/Root"]
script = ExtResource("5_m0v1h")
@@ -90,12 +86,6 @@ to = NodePath("../../InHand")
event = &"recover"
delay_in_seconds = "0.0"
[node name="ToPlanted" type="Node" parent="StateChart/Root/Flying"]
script = ExtResource("6_jpdh0")
to = NodePath("../../Planted")
event = &"plant"
delay_in_seconds = "0.0"
[node name="Planted" type="Node" parent="StateChart/Root"]
script = ExtResource("5_m0v1h")

View File

@@ -0,0 +1,11 @@
[gd_resource type="CylinderMesh" load_steps=2 format=3 uid="uid://bhkbwvuft1bpg"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_f5qr4"]
z_clip_scale = 0.9
fov_override = 70.0
[resource]
material = SubResource("StandardMaterial3D_f5qr4")
top_radius = 0.0
bottom_radius = 0.05
height = 1.0