Compare commits

...

57 Commits

Author SHA1 Message Date
837b3d7705 hyperfocused on the procedural FP animations
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m46s
2026-01-19 18:51:27 +01:00
4224333963 improved weapon system and cleaner weapon setup
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 10m20s
2026-01-19 17:25:12 +01:00
4dd48bed70 orienting flying sword 2026-01-19 16:55:22 +01:00
abe6f42a3b some juice work on the first person weapon 2026-01-19 16:46:00 +01:00
27c67dbdd9 Some swords
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 10m0s
2026-01-18 18:34:11 +01:00
98ed361546 reorganizing stuff
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 9m26s
2026-01-18 17:04:28 +01:00
eb1c7f78fa flying knockback as well
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Has been cancelled
2026-01-18 16:58:23 +01:00
35b9ea383c knockback component 2026-01-18 12:39:01 +01:00
9690280cd7 better spawning
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 10m36s
2026-01-18 10:27:21 +01:00
65538495c4 spawning
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m59s
2026-01-17 23:18:06 +01:00
561e026834 ok so this should be the way to go
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 10m24s
2026-01-17 21:51:57 +01:00
7c74b8b5e5 removing broken ABC and refactoring enemy movement
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 10m2s
2026-01-17 19:55:51 +01:00
f7705a6d57 moving files around
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 10m3s
2026-01-17 17:58:23 +01:00
0dcf4a3f99 fixed damage composition issue 2026-01-17 17:47:14 +01:00
4ccdbc0ee6 broken composition and signals 2026-01-17 17:02:31 +01:00
0436053c62 broken composition and signals 2026-01-17 17:02:16 +01:00
6b97c226f1 setup damage types and modifiers as resources
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 10m48s
2026-01-17 14:32:48 +01:00
b1e78df6c7 some damage interfacing 2026-01-17 11:02:17 +01:00
5908494977 two enemy types, ready to refactor 2026-01-17 10:10:14 +01:00
63529a11ae removed tool script stuff
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 9m57s
2026-01-16 18:36:36 +01:00
255b87f991 basic interface and no success trying to use them in a Tool script 2026-01-16 18:35:58 +01:00
fd3eb35782 added enemy inputs as a resource
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 9m48s
2026-01-16 11:18:57 +01:00
9e75193731 enemies can move, also changed and named a few collision layers
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 10m18s
2026-01-16 11:05:02 +01:00
609078c584 enemy work
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 10m32s
2026-01-15 21:47:17 +01:00
893126ef78 starting on enemies 2026-01-14 18:10:37 +01:00
6737668391 groundslide camera setup
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 10m16s
2026-01-14 17:21:57 +01:00
ca77579168 ground sliding under stuff 2026-01-14 15:26:41 +01:00
c6559d593a fixed slope ground slide
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m32s
2026-01-14 10:21:50 +01:00
e32dac9e6e broken sloped slide
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 9m32s
2026-01-13 23:52:44 +01:00
30b4d1a2eb jumping from slides and some improvement on air gliding 2026-01-13 14:22:26 +01:00
2fa4ce68e7 revamped the dash, fixed an infinite jump issue and fixed buffered inputs
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 10m15s
2026-01-13 11:18:56 +01:00
80e533d98e simple slam and changed wall hugging to only work when input is towards the wall 2026-01-13 09:43:58 +01:00
0e3e258fd3 basic slide and air glide mechanic
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 10m40s
2026-01-12 17:47:32 +01:00
c7991198ea code cleanup 2026-01-12 16:43:52 +01:00
1a4b2f4c19 Ended with remapping and removed old junk
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 10m34s
2026-01-12 15:41:43 +01:00
52a9c3f120 Remapped some inputs and added slide, slam and parry mappings 2026-01-12 14:58:43 +01:00
2301884418 added a wall jump section in the GYM 2026-01-12 12:01:40 +01:00
04054cfeae Added ground-like movement (i.e. air control when close to ground) and wall jumping away from the wall is always possible even when facing it 2026-01-12 11:52:35 +01:00
66be7838bb buffered inputs revamped and added mantle jumps and dashed
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 21s
Create tag and build when new code gets to main / Export (push) Successful in 10m30s
2026-01-11 18:14:53 +01:00
1eb65d1520 some shader work and improved mantle feel 2026-01-11 17:09:58 +01:00
f2a39316ba shader changes that don't do anything
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m48s
2026-01-07 17:11:49 +01:00
fffd8c947b implementing jump input buffering on grounded
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 9m47s
2026-01-07 09:58:18 +01:00
a1d57d6a1a some tuto fixing
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m49s
2026-01-06 16:35:17 +01:00
941205af2b small gravity and jump balancing, removed wall jumping coyote times
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m34s
2026-01-06 16:08:39 +01:00
6c2ad89687 fixing the manlting into geo
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m42s
2026-01-06 12:36:38 +01:00
59494f9e98 updating CI to build for linux as well
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m34s
2025-12-25 09:37:51 +01:00
510246c341 fix a scene load issue
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 21s
Create tag and build when new code gets to main / Export (push) Successful in 8m22s
2025-12-22 14:25:17 +01:00
b184bcdea5 added a small dash when leaving a wall run organically
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 8m36s
2025-12-21 17:23:38 +01:00
cf52af4237 mantling after aimed dash with new mantle system 2025-12-21 16:44:35 +01:00
e0fc301414 fixed user stuff
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 8m10s
2025-12-19 19:11:53 +01:00
b792e8721c mantle system fix amazing
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 22s
Create tag and build when new code gets to main / Export (push) Successful in 8m19s
2025-12-19 18:59:34 +01:00
2e2df4ff50 new broken mantle system and fixed lots of gamefeel regarding wall hugs and jumps and coyote time
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 8m51s
2025-12-17 16:39:10 +01:00
a84e0ecfb3 Merge branch 'main' of https://git.game-dev.space/minimata/MovementTests
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 8m25s
2025-12-15 11:20:39 +01:00
f828c1d786 added a coyote time for wall jumps 2025-12-15 11:20:17 +01:00
a98785abec Update .gitea/workflows/main.yaml
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 8m49s
2025-12-10 21:26:25 +00:00
7c4e541446 fixed input mapping context issue
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 6m5s
2025-12-10 17:10:41 +01:00
7d31d17034 tuto fixes
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 6m7s
2025-12-10 10:04:05 +01:00
164 changed files with 5777 additions and 1917 deletions

View File

@@ -54,27 +54,12 @@ jobs:
- name: Import resources and build solution - name: Import resources and build solution
run: | run: |
godot --headless --editor --build-solutions --quit --import --path $PWD godot --headless --editor --build-solutions --quit --import --path $PWD
- name: Build Windows - name: Build Windows
run: | run: |
mkdir -v -p build/windows mkdir -v -p build/windows
godot --headless --verbose --build-solutions --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 zip -r Windows.zip build/windows
- name: Build Windows ARM
run: |
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 - name: Upload to Itch
uses: KikimoraGames/itch-publish@v0.0.3 uses: KikimoraGames/itch-publish@v0.0.3
with: with:
@@ -84,6 +69,12 @@ jobs:
buildNumber: ${{ needs.BumpTag.outputs.tag_name }} buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
gameData: Windows.zip gameData: Windows.zip
buildChannel: windows buildChannel: windows
- name: Build Windows ARM
run: |
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: Upload to Itch - name: Upload to Itch
uses: KikimoraGames/itch-publish@v0.0.3 uses: KikimoraGames/itch-publish@v0.0.3
with: with:
@@ -93,21 +84,33 @@ jobs:
buildNumber: ${{ needs.BumpTag.outputs.tag_name }} buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
gameData: WindowsArm.zip gameData: WindowsArm.zip
buildChannel: windows-arm buildChannel: windows-arm
# - name: Upload to Itch
# uses: KikimoraGames/itch-publish@v0.0.3 - name: Linux Build
# with: run: |
# butlerApiKey: ${{ secrets.BUTLER_TOKEN }} mkdir -v -p build/linux
# itchUsername: ${{ env.ITCHIO_USERNAME }} godot --headless --verbose --export-release "Linux/X11" build/linux/${{ env.GAME_NAME }}.x86_64
# itchGameId: ${{ env.ITCHIO_GAMEID }} zip -r Linux.zip build/linux
# buildNumber: ${{ needs.BumpTag.outputs.tag_name }} - name: Upload to Itch
# gameData: Linux.zip uses: KikimoraGames/itch-publish@v0.0.3
# buildChannel: linux with:
# - name: Upload to Itch butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
# uses: KikimoraGames/itch-publish@v0.0.3 itchUsername: ${{ env.ITCHIO_USERNAME }}
# with: itchGameId: ${{ env.ITCHIO_GAMEID }}
# butlerApiKey: ${{ secrets.BUTLER_TOKEN }} buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
# itchUsername: ${{ env.ITCHIO_USERNAME }} gameData: Linux.zip
# itchGameId: ${{ env.ITCHIO_GAMEID }} buildChannel: linux
# buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
# gameData: Mac.zip - name: Mac Build
# buildChannel: mac 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
with:
butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
itchUsername: ${{ env.ITCHIO_USERNAME }}
itchGameId: ${{ env.ITCHIO_GAMEID }}
buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
gameData: Mac.zip
buildChannel: mac

1
.gitignore vendored
View File

@@ -10,6 +10,7 @@
.import/ .import/
/builds /builds
/communication
# Imported translations (automatically generated from CSV files) # Imported translations (automatically generated from CSV files)
*.translation *.translation

View File

@@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAction_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F7c0f83388bfc4d2c9d09befcec9dd79bc90908_003Fb8_003F4d300c4d_003FAction_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fdf73a4db74df89d59655c5fb6326406f47fbfa9af1fa81518fe0a07c49d34133_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fdf73a4db74df89d59655c5fb6326406f47fbfa9af1fa81518fe0a07c49d34133_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASceneTree_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F8d6960554e939a669841b1ece03d27df4ab42f92bb80be3767eaec8cdaccf84b_003FSceneTree_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASceneTree_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F8d6960554e939a669841b1ece03d27df4ab42f92bb80be3767eaec8cdaccf84b_003FSceneTree_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=floorplane/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> <s:Boolean x:Key="/Default/UserDictionary/Words/=floorplane/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@@ -14,6 +14,7 @@ var credits_scene
var sub_menu var sub_menu
func load_game_scene() -> void: func load_game_scene() -> void:
GUIDE.disable_mapping_context(menu_context)
SceneLoader.load_scene(game_scene_path) SceneLoader.load_scene(game_scene_path)
func new_game() -> void: func new_game() -> void:

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,8 @@ script = ExtResource("2_5i7wx")
material_override = ExtResource("3_u2uhe") material_override = ExtResource("3_u2uhe")
[node name="StaticBody3D" type="StaticBody3D" parent="Cube_279" index="0"] [node name="StaticBody3D" type="StaticBody3D" parent="Cube_279" index="0"]
collision_layer = 256
collision_mask = 65553
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cube_279/StaticBody3D" index="0"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Cube_279/StaticBody3D" index="0"]
shape = SubResource("ConcavePolygonShape3D_5i7wx") shape = SubResource("ConcavePolygonShape3D_5i7wx")
@@ -28,12 +30,15 @@ shape = SubResource("ConcavePolygonShape3D_5i7wx")
material_override = ExtResource("4_jmnc2") material_override = ExtResource("4_jmnc2")
[node name="StaticBody3D" type="StaticBody3D" parent="Cylinder_001" index="0"] [node name="StaticBody3D" type="StaticBody3D" parent="Cylinder_001" index="0"]
collision_layer = 256
collision_mask = 65553
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cylinder_001/StaticBody3D" index="0"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Cylinder_001/StaticBody3D" index="0"]
shape = SubResource("ConcavePolygonShape3D_wai75") shape = SubResource("ConcavePolygonShape3D_wai75")
[node name="Area3D" type="Area3D" parent="." index="2"] [node name="Area3D" type="Area3D" parent="." index="2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -36.343, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -36.343, 0)
collision_layer = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" index="0"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" index="0"]
shape = SubResource("CylinderShape3D_wai75") shape = SubResource("CylinderShape3D_wai75")

View File

@@ -27,7 +27,7 @@ shader_parameter/floorRoughnessMap = ExtResource("4_rir86")
shader_parameter/floorNormalMap = ExtResource("3_f1b6h") shader_parameter/floorNormalMap = ExtResource("3_f1b6h")
shader_parameter/floorHeightMap = ExtResource("2_0e3id") shader_parameter/floorHeightMap = ExtResource("2_0e3id")
shader_parameter/floorUvScale = 0.5 shader_parameter/floorUvScale = 0.5
shader_parameter/enablePom = true shader_parameter/enablePom = false
shader_parameter/heightMinLayers = 8 shader_parameter/heightMinLayers = 8
shader_parameter/heightMaxLayers = 64 shader_parameter/heightMaxLayers = 64
shader_parameter/heightScale = 0.08 shader_parameter/heightScale = 0.08

View File

@@ -28,6 +28,7 @@ uniform float heightScale = 1.0;
varying vec3 worldPos; varying vec3 worldPos;
varying vec3 worldNormal; varying vec3 worldNormal;
varying vec3 diffuse;
void vertex() { void vertex() {
@@ -177,12 +178,14 @@ void fragment() {
// sample and output // sample and output
SPECULAR = specular; SPECULAR = specular;
ALBEDO = triplanarSample(texCoordX, texCoordY, texCoordZ, blend, yDot).rgb; ALBEDO = triplanarSample(texCoordX, texCoordY, texCoordZ, blend, yDot).rgb;
diffuse = ALBEDO;
ROUGHNESS = triplanarRoughness(texCoordX, texCoordY, texCoordZ, blend, yDot).r; ROUGHNESS = triplanarRoughness(texCoordX, texCoordY, texCoordZ, blend, yDot).r;
NORMAL = mix(worldNormal, triplanarNormal(yDot, texCoordX, texCoordY, texCoordZ, blend), normalMapStrength); NORMAL = mix(worldNormal, triplanarNormal(yDot, texCoordX, texCoordY, texCoordZ, blend), normalMapStrength);
NORMAL = normalize((VIEW_MATRIX * vec4(NORMAL, 0.0)).xyz); NORMAL = normalize((VIEW_MATRIX * vec4(NORMAL, 0.0)).xyz);
} }
//void light() { void light() {
// // Called for every pixel for every light affecting the material. float lambert = clamp(dot(NORMAL, LIGHT), 0.0, 1.0);
// // Uncomment to replace the default light processing function with this one. float halfLambert = pow(lambert*0.5 + 0.5, 5);
//} DIFFUSE_LIGHT += halfLambert * ATTENUATION * LIGHT_COLOR / PI;
}

View File

@@ -31,7 +31,7 @@ shader_parameter/floorRoughnessMap = ExtResource("4_4vhk1")
shader_parameter/floorNormalMap = ExtResource("3_ytvoj") shader_parameter/floorNormalMap = ExtResource("3_ytvoj")
shader_parameter/floorHeightMap = ExtResource("2_4vhk1") shader_parameter/floorHeightMap = ExtResource("2_4vhk1")
shader_parameter/floorUvScale = 0.5 shader_parameter/floorUvScale = 0.5
shader_parameter/enablePom = true shader_parameter/enablePom = false
shader_parameter/heightMinLayers = 8 shader_parameter/heightMinLayers = 8
shader_parameter/heightMaxLayers = 64 shader_parameter/heightMaxLayers = 64
shader_parameter/heightScale = 0.2 shader_parameter/heightScale = 0.2

View File

@@ -27,7 +27,7 @@ shader_parameter/floorRoughnessMap = ExtResource("4_ob11h")
shader_parameter/floorNormalMap = ExtResource("3_ff2cr") shader_parameter/floorNormalMap = ExtResource("3_ff2cr")
shader_parameter/floorHeightMap = ExtResource("2_roy1o") shader_parameter/floorHeightMap = ExtResource("2_roy1o")
shader_parameter/floorUvScale = 0.5 shader_parameter/floorUvScale = 0.5
shader_parameter/enablePom = true shader_parameter/enablePom = false
shader_parameter/heightMinLayers = 8 shader_parameter/heightMinLayers = 8
shader_parameter/heightMaxLayers = 64 shader_parameter/heightMaxLayers = 64
shader_parameter/heightScale = 1.0 shader_parameter/heightScale = 1.0

View File

@@ -0,0 +1 @@
https://craftpix.net/file-licenses/

BIN
assets/swords/fbx/Texture_MAp_sword.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,42 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://qtu5ue4ixkwm"
path.s3tc="res://.godot/imported/Texture_MAp_sword.png-2af3c78c4883b079065f66f1feac90e4.s3tc.ctex"
path.etc2="res://.godot/imported/Texture_MAp_sword.png-2af3c78c4883b079065f66f1feac90e4.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
[deps]
source_file="res://assets/swords/fbx/Texture_MAp_sword.png"
dest_files=["res://.godot/imported/Texture_MAp_sword.png-2af3c78c4883b079065f66f1feac90e4.s3tc.ctex", "res://.godot/imported/Texture_MAp_sword.png-2af3c78c4883b079065f66f1feac90e4.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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=0

BIN
assets/swords/fbx/_sword_1.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://pgd71ofvqsmf"
path="res://.godot/imported/_sword_1.fbx-4fe48a2bb63be1f77a3cf7c7a5c46a2d.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_1.fbx"
dest_files=["res://.godot/imported/_sword_1.fbx-4fe48a2bb63be1f77a3cf7c7a5c46a2d.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_10.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dc867it2djc0j"
path="res://.godot/imported/_sword_10.fbx-26a7b1fe725211263b2c77d9a7dc6a5a.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_10.fbx"
dest_files=["res://.godot/imported/_sword_10.fbx-26a7b1fe725211263b2c77d9a7dc6a5a.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_11.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b817njxdpygk4"
path="res://.godot/imported/_sword_11.fbx-6b498f728a419e5cdf7015937648dc0c.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_11.fbx"
dest_files=["res://.godot/imported/_sword_11.fbx-6b498f728a419e5cdf7015937648dc0c.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_12.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://vfwwh86wf1ds"
path="res://.godot/imported/_sword_12.fbx-2e156e5fe829c5a90f46f02befc39030.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_12.fbx"
dest_files=["res://.godot/imported/_sword_12.fbx-2e156e5fe829c5a90f46f02befc39030.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_13.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bdo4w8qjps8k1"
path="res://.godot/imported/_sword_13.fbx-0a46eb67177c7e5eef79859c7c94d975.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_13.fbx"
dest_files=["res://.godot/imported/_sword_13.fbx-0a46eb67177c7e5eef79859c7c94d975.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_15.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bo14ktg303cci"
path="res://.godot/imported/_sword_15.fbx-c121fcd47cad6f0460d63d2867e3fecd.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_15.fbx"
dest_files=["res://.godot/imported/_sword_15.fbx-c121fcd47cad6f0460d63d2867e3fecd.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_16.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bu55u3oj7roer"
path="res://.godot/imported/_sword_16.fbx-6c55a39e578558d03763795cf751f0e0.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_16.fbx"
dest_files=["res://.godot/imported/_sword_16.fbx-6c55a39e578558d03763795cf751f0e0.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_17.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b4gescssbshia"
path="res://.godot/imported/_sword_17.fbx-b5a7ae5038b5033dcc9a27b689bdf110.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_17.fbx"
dest_files=["res://.godot/imported/_sword_17.fbx-b5a7ae5038b5033dcc9a27b689bdf110.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_18.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://fm4607vrkr5l"
path="res://.godot/imported/_sword_18.fbx-eda4d9cb8bcde4d55ac99ec09b545356.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_18.fbx"
dest_files=["res://.godot/imported/_sword_18.fbx-eda4d9cb8bcde4d55ac99ec09b545356.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_19.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://c8lx8075hl8cw"
path="res://.godot/imported/_sword_19.fbx-eb227611876b1946d2773f4e1a392c73.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_19.fbx"
dest_files=["res://.godot/imported/_sword_19.fbx-eb227611876b1946d2773f4e1a392c73.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_2.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dw35utjjm8gb6"
path="res://.godot/imported/_sword_2.fbx-75c5e721ad94d604d3e69e3919dbb3c5.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_2.fbx"
dest_files=["res://.godot/imported/_sword_2.fbx-75c5e721ad94d604d3e69e3919dbb3c5.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_20.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dc65lwlhqbmqd"
path="res://.godot/imported/_sword_20.fbx-0617cc5a77fb88a346d20ddf46355225.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_20.fbx"
dest_files=["res://.godot/imported/_sword_20.fbx-0617cc5a77fb88a346d20ddf46355225.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_21.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://wawgl6e0h6tj"
path="res://.godot/imported/_sword_21.fbx-7200ded408f5953cbc70877022c333a5.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_21.fbx"
dest_files=["res://.godot/imported/_sword_21.fbx-7200ded408f5953cbc70877022c333a5.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_22.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b0x5klx5auig6"
path="res://.godot/imported/_sword_22.fbx-c6ed8d5dbb3050e43ea62d2e5ccc565c.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_22.fbx"
dest_files=["res://.godot/imported/_sword_22.fbx-c6ed8d5dbb3050e43ea62d2e5ccc565c.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_23.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dqmfrrbc3ewal"
path="res://.godot/imported/_sword_23.fbx-493172d63aace2a9301836d894a62890.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_23.fbx"
dest_files=["res://.godot/imported/_sword_23.fbx-493172d63aace2a9301836d894a62890.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_24.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b1qfs4yugw3ph"
path="res://.godot/imported/_sword_24.fbx-0adbb8989d27c2a804efc391a50e4c7b.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_24.fbx"
dest_files=["res://.godot/imported/_sword_24.fbx-0adbb8989d27c2a804efc391a50e4c7b.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_3.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://sdufabwshlrj"
path="res://.godot/imported/_sword_3.fbx-04a6f1a0f269fa6ff0c8cba8aed2c8b8.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_3.fbx"
dest_files=["res://.godot/imported/_sword_3.fbx-04a6f1a0f269fa6ff0c8cba8aed2c8b8.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_4.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dmiewrsn2o1xt"
path="res://.godot/imported/_sword_4.fbx-25a5609f8f6918f76d0ed4b3e8e55618.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_4.fbx"
dest_files=["res://.godot/imported/_sword_4.fbx-25a5609f8f6918f76d0ed4b3e8e55618.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_5.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://brogj578mkndo"
path="res://.godot/imported/_sword_5.fbx-9d38cdd495cd4ff9bc2758f9d1e01b7e.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_5.fbx"
dest_files=["res://.godot/imported/_sword_5.fbx-9d38cdd495cd4ff9bc2758f9d1e01b7e.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_6.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://tol5v11e7bhx"
path="res://.godot/imported/_sword_6.fbx-65a0a7d72918e7512792cfa786f56e6e.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_6.fbx"
dest_files=["res://.godot/imported/_sword_6.fbx-65a0a7d72918e7512792cfa786f56e6e.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_7.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bag0oxbvo7ya7"
path="res://.godot/imported/_sword_7.fbx-5a2d61c3625b87c9b91bab13a45ef09e.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_7.fbx"
dest_files=["res://.godot/imported/_sword_7.fbx-5a2d61c3625b87c9b91bab13a45ef09e.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_8.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b7ibkej2rcs03"
path="res://.godot/imported/_sword_8.fbx-84c74a27d77c6f3455ecd47693de31ef.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_8.fbx"
dest_files=["res://.godot/imported/_sword_8.fbx-84c74a27d77c6f3455ecd47693de31ef.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/_sword_9.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://7widux5ck7kg"
path="res://.godot/imported/_sword_9.fbx-83e0a99c6bcb7a2f902fc35d3c339287.scn"
[deps]
source_file="res://assets/swords/fbx/_sword_9.fbx"
dest_files=["res://.godot/imported/_sword_9.fbx-83e0a99c6bcb7a2f902fc35d3c339287.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

BIN
assets/swords/fbx/sword_14.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://3gho2priko7i"
path="res://.godot/imported/sword_14.fbx-43a1e42a5de4603e1b903e8a8848e2b4.scn"
[deps]
source_file="res://assets/swords/fbx/sword_14.fbx"
dest_files=["res://.godot/imported/sword_14.fbx-43a1e42a5de4603e1b903e8a8848e2b4.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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

2
assets/swords/readme.txt Normal file
View File

@@ -0,0 +1,2 @@
Font that was used for the background of the preview:
https://www.dafont.com/the-bold-font.font

View File

@@ -0,0 +1,13 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://buevqo8w8fq75"]
[ext_resource type="Texture2D" uid="uid://qtu5ue4ixkwm" path="res://assets/swords/fbx/Texture_MAp_sword.png" id="1_ke6g8"]
[resource]
resource_name = "Sword_mat_map"
vertex_color_use_as_albedo = true
albedo_texture = ExtResource("1_ke6g8")
emission_enabled = true
use_z_clip_scale = true
z_clip_scale = 0.5
use_fov_override = true
fov_override = 30.0

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

BIN
assets/swords/texture/Texture_MAp_sword.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://br8gpitkrtroi"
path="res://.godot/imported/Texture_MAp_sword.png-5d2e59afea3d1af36913e0e3757cf603.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/swords/texture/Texture_MAp_sword.png"
dest_files=["res://.godot/imported/Texture_MAp_sword.png-5d2e59afea3d1af36913e0e3757cf603.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,23 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class CDamageable : Node, IDamageable
{
public event Action<IDamageable, DamageRecord> DamageTaken;
[Export]
public RDamageModifier[] DamageModifiers { get; set; }
public DamageRecord TakeDamage(DamageRecord damageRecord)
{
var finalDamage = 0f;
foreach (var damageable in DamageModifiers.ToIDamageables())
finalDamage += damageable.TakeDamage(damageRecord).Damage.DamageDealt;
var finalDamageRecord = damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
DamageTaken?.Invoke(this, finalDamageRecord);
return finalDamageRecord;
}
}

View File

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

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://hpsg4fqwrx1u"]
[ext_resource type="Script" uid="uid://b0u23nkpaimyc" path="res://components/damage/CDamageable.cs" id="1_qp8bd"]
[node name="CDamageable" type="Node"]
script = ExtResource("1_qp8bd")

View File

@@ -0,0 +1,24 @@
using Godot;
using System;
using Movementtests.systems.damage;
[GlobalClass]
public partial class RDamage : Resource
{
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float DamageDealt = 1.0f;
[Export]
public EDamageTypes DamageType = EDamageTypes.Normal;
public RDamage()
{
DamageDealt = 1.0f;
DamageType = EDamageTypes.Normal;
}
public RDamage(float damageDealt, EDamageTypes damageType)
{
DamageDealt = damageDealt;
DamageType = damageType;
}
}

View File

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

View File

@@ -0,0 +1,37 @@
using Godot;
using System;
using Movementtests.interfaces;
using Movementtests.systems.damage;
[GlobalClass]
public partial class RDamageModifier : Resource, IDamageable
{
public event Action<IDamageable, DamageRecord> DamageTaken;
[Export]
public EDamageTypes DamageType = EDamageTypes.Normal;
[Export]
public float Modifier = 1.0f;
public RDamageModifier()
{
Modifier = 1.0f;
DamageType = EDamageTypes.Normal;
}
public RDamageModifier(EDamageTypes damageType, float modifier)
{
Modifier = modifier;
DamageType = damageType;
}
public DamageRecord TakeDamage(DamageRecord damageRecord)
{
if (damageRecord.Damage.DamageType != DamageType)
return damageRecord with { Damage = new RDamage(0, damageRecord.Damage.DamageType) };
var finalDamage = damageRecord.Damage.DamageDealt * Modifier;
var finalDamageRecord = damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
DamageTaken?.Invoke(this, finalDamageRecord);
return finalDamageRecord;
}
}

View File

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

View File

@@ -0,0 +1,33 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class CHealth : Node, IHealthable
{
public event Action<IHealthable, float> HealthChanged;
public event Action<IHealthable> HealthDepleted;
[Export]
public RHealth RHealth { get; set; }
public float CurrentHealth { get; set; }
public override void _Ready()
{
CurrentHealth = RHealth.StartingHealth;
}
public void ReduceHealth(IDamageable source, DamageRecord damageRecord)
{
GD.Print(CurrentHealth);
CurrentHealth -= damageRecord.Damage.DamageDealt;
HealthChanged?.Invoke(this, CurrentHealth);
if (CurrentHealth <= 0)
{
CurrentHealth = 0;
HealthDepleted?.Invoke(this);
}
}
}

View File

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

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://c4ikbhojckpnc"]
[ext_resource type="Script" uid="uid://bjwrpv3jpsc1e" path="res://components/health/CHealth.cs" id="1_75uyt"]
[node name="CHealth" type="Node"]
script = ExtResource("1_75uyt")

View File

@@ -0,0 +1,12 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class RDeathEffect : Resource, IKillable
{
public void Kill(IHealthable source)
{
GD.Print($"Death Effect triggered on {source}");
}
}

View File

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

View File

@@ -0,0 +1,20 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class RHealth : Resource
{
[Export]
public float StartingHealth = 100.0f;
public RHealth()
{
StartingHealth = 100.0f;
}
public RHealth(float startingHealth)
{
StartingHealth = startingHealth;
}
}

View File

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

View File

@@ -0,0 +1,25 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class CKnockback : Node3D, IKnockbackable
{
[Export] public RKnockback RKnockback { get; set;}
private DamageRecord _damageRecord = null;
public void RegisterKnockback(IDamageable source, DamageRecord damageRecord)
{
_damageRecord = damageRecord;
}
public Vector3 ComputeKnockback()
{
if (_damageRecord == null) return Vector3.Zero;
var knockbackDirection = GlobalPosition - _damageRecord.Source.GlobalPosition;
_damageRecord = null;
return knockbackDirection.Normalized() * RKnockback.Modifier;
}
}

View File

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

View File

@@ -0,0 +1,12 @@
[gd_scene load_steps=4 format=3 uid="uid://bctpe34ddamg5"]
[ext_resource type="Script" uid="uid://b8dprpcjeac7e" path="res://components/knockback/CKnockback.cs" id="1_ix2yg"]
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://components/knockback/RKnockback.cs" id="2_uqiml"]
[sub_resource type="Resource" id="Resource_gbu2d"]
script = ExtResource("2_uqiml")
metadata/_custom_type_script = "uid://b44cse62qru7j"
[node name="CKnockback" type="Node3D"]
script = ExtResource("1_ix2yg")
RKnockback = SubResource("Resource_gbu2d")

View File

@@ -0,0 +1,19 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class RKnockback : Resource
{
[Export]
public float Modifier = 1.0f;
public RKnockback()
{
Modifier = 1.0f;
}
public RKnockback(float modifier)
{
Modifier = modifier;
}
}

View File

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

View File

@@ -0,0 +1,61 @@
using Godot;
using Movementtests.interfaces;
namespace Movementtests.scenes.movement;
public partial class CFlyingMovement : Node3D, IMoveable
{
[Export] public RMovement RMovement { get; set; }
[Export(PropertyHint.Layers3DPhysics)]
public uint TerrainCollision { get; set; } = 1;
private bool _movingToDesiredHeight = true;
private Vector3 _randomDirection;
public override void _Ready()
{
_randomDirection = new Vector3(GD.RandRange(-1, 1), 1, GD.RandRange(-1, 1)).Normalized();
}
public Vector3 ComputeVelocity(MovementInputs inputs)
{
var velocity = inputs.Velocity;
var spaceState = GetWorld3D().DirectSpaceState;
var target = inputs.TargetLocation;
var direction = (target - GlobalPosition).Normalized();
// Check if we have a direct line of sight to the player
if (!_movingToDesiredHeight)
{
velocity = velocity.Lerp(direction * RMovement.Speed, (float) inputs.delta * RMovement.Acceleration);
var query = PhysicsRayQueryParameters3D.Create(GlobalPosition, target, TerrainCollision);
var result = spaceState.IntersectRay(query);
if (result.Count > 0)
{
_movingToDesiredHeight = true;
_randomDirection = new Vector3(GD.RandRange(-1, 1), 1, GD.RandRange(-1, 1)).Normalized();
}
}
else
{
velocity = velocity.Lerp(_randomDirection * RMovement.Speed, (float) inputs.delta * RMovement.Acceleration);
var groundQuery = PhysicsRayQueryParameters3D.Create(GlobalPosition, GlobalPosition+Vector3.Down*RMovement.TargetHeight, TerrainCollision);
var groundResult = spaceState.IntersectRay(groundQuery);
if (groundResult.Count == 0)
{
velocity.Y = 0;
var query = PhysicsRayQueryParameters3D.Create(GlobalPosition, target, TerrainCollision);
var result = spaceState.IntersectRay(query);
if (result.Count == 0)
{
_movingToDesiredHeight = false;
}
}
}
return velocity;
}
}

View File

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

View File

@@ -0,0 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://dmw5ibwrb483f"]
[ext_resource type="Script" uid="uid://cps1rbkxs3nvq" path="res://components/movement/CFlyingMovement.cs" id="1_i26q2"]
[node name="CFlyingMovement" type="Node3D"]
script = ExtResource("1_i26q2")
CollisionMask = 256

View File

@@ -0,0 +1,34 @@
using Godot;
using Movementtests.interfaces;
namespace Movementtests.scenes.movement;
public partial class CGroundedMovement : Node3D, IMoveable
{
[Export] public RMovement RMovement { get; set; }
[Export]
public RayCast3D WallInFrontRayCast { get; set; }
public Vector3 ComputeVelocity(MovementInputs inputs)
{
var velocity = inputs.Velocity;
var target = inputs.TargetLocation;
var direction = (target - GlobalPosition).Normalized();
var targetPlane = new Vector3(target.X, GlobalPosition.Y, target.Z);
LookAt(targetPlane);
float xAcc = (float) Mathf.Lerp(velocity.X, direction.X * RMovement.Speed, inputs.delta * RMovement.Acceleration);
float zAcc = (float) Mathf.Lerp(velocity.Z, direction.Z * RMovement.Speed, inputs.delta * RMovement.Acceleration);
velocity.X = xAcc;
velocity.Z = zAcc;
if (WallInFrontRayCast.IsColliding())
velocity.Y = RMovement.Speed;
else if (!inputs.isOnFloor)
velocity += inputs.gravity * (float)inputs.delta * RMovement.GravityModifier;
return velocity;
}
}

View File

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

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dbr7ioio158ew"]
[ext_resource type="Script" uid="uid://bdag2eeixw2lt" path="res://components/movement/CGroundedMovement.cs" id="1_e0agf"]
[node name="CGroundedMovement" type="Node3D"]
script = ExtResource("1_e0agf")

View File

@@ -0,0 +1,31 @@
using Godot;
using System;
[GlobalClass]
public partial class RMovement : Resource
{
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float Speed { get; set;}
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float Acceleration { get; set;}
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float GravityModifier { get; set;}
[Export(PropertyHint.Range, "0,20,1,or_greater")]
public float TargetHeight { get; set;}
public RMovement()
{
Speed = 3.0f;
Acceleration = 1.0f;
GravityModifier = 1.0f;
TargetHeight = 10.0f;
}
public RMovement(float speed, float acceleration, float gravityModifier, float targetHeight)
{
Speed = speed;
Acceleration = acceleration;
GravityModifier = gravityModifier;
TargetHeight = targetHeight;
}
}

View File

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

View File

@@ -0,0 +1,9 @@
using Godot;
namespace Movementtests.interfaces;
public interface IDamageDealer
{
[Export]
RDamage RDamage { get; set; }
}

View File

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

12
interfaces/IDamageable.cs Normal file
View File

@@ -0,0 +1,12 @@
using System;
using Godot;
namespace Movementtests.interfaces;
public record DamageRecord(Node3D Source, RDamage Damage);
public interface IDamageable
{
event Action<IDamageable, DamageRecord> DamageTaken;
DamageRecord TakeDamage(DamageRecord damageRecord);
}

Some files were not shown because too many files have changed in this diff Show More