diff --git a/assets/characters/Bob.glb b/assets/characters/Bob.glb new file mode 100644 index 0000000..6e8d0ed Binary files /dev/null and b/assets/characters/Bob.glb differ diff --git a/assets/characters/Bob.glb.import b/assets/characters/Bob.glb.import new file mode 100644 index 0000000..4dab8f3 --- /dev/null +++ b/assets/characters/Bob.glb.import @@ -0,0 +1,48 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://ejeamn0pyey4" +path="res://.godot/imported/Bob.glb-b36d843833d2bf8fe73ce6b24284a2e6.scn" + +[deps] + +source_file="res://assets/characters/Bob.glb" +dest_files=["res://.godot/imported/Bob.glb-b36d843833d2bf8fe73ce6b24284a2e6.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +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="" +_subresources={ +"nodes": { +"PATH:AnimationPlayer": { +"import/skip_import": true +}, +"PATH:bob-rig/Skeleton3D": { +"rest_pose/external_animation_library": null, +"retarget/bone_map": Object(BoneMap,"resource_local_to_scene":false,"resource_name":"","profile":Object(SkeletonProfileHumanoid,"resource_local_to_scene":false,"resource_name":"","root_bone":&"Root","scale_base_bone":&"Hips","group_size":4,"bone_size":56,"script":null) +,"bonemap":null,"bone_map/Root":&"","bone_map/Hips":&"spine","bone_map/Spine":&"spine.001","bone_map/Chest":&"","bone_map/UpperChest":&"","bone_map/Neck":&"head","bone_map/Head":&"head_end","bone_map/LeftEye":&"","bone_map/RightEye":&"","bone_map/Jaw":&"","bone_map/LeftShoulder":&"shoulder.L","bone_map/LeftUpperArm":&"upper_arm.L","bone_map/LeftLowerArm":&"forearm.L","bone_map/LeftHand":&"hand.L","bone_map/LeftThumbMetacarpal":&"","bone_map/LeftThumbProximal":&"","bone_map/LeftThumbDistal":&"","bone_map/LeftIndexProximal":&"","bone_map/LeftIndexIntermediate":&"","bone_map/LeftIndexDistal":&"","bone_map/LeftMiddleProximal":&"","bone_map/LeftMiddleIntermediate":&"","bone_map/LeftMiddleDistal":&"","bone_map/LeftRingProximal":&"","bone_map/LeftRingIntermediate":&"","bone_map/LeftRingDistal":&"","bone_map/LeftLittleProximal":&"","bone_map/LeftLittleIntermediate":&"","bone_map/LeftLittleDistal":&"","bone_map/RightShoulder":&"shoulder.R","bone_map/RightUpperArm":&"upper_arm.R","bone_map/RightLowerArm":&"forearm.R","bone_map/RightHand":&"hand.R","bone_map/RightThumbMetacarpal":&"","bone_map/RightThumbProximal":&"","bone_map/RightThumbDistal":&"","bone_map/RightIndexProximal":&"","bone_map/RightIndexIntermediate":&"","bone_map/RightIndexDistal":&"","bone_map/RightMiddleProximal":&"","bone_map/RightMiddleIntermediate":&"","bone_map/RightMiddleDistal":&"","bone_map/RightRingProximal":&"","bone_map/RightRingIntermediate":&"","bone_map/RightRingDistal":&"","bone_map/RightLittleProximal":&"","bone_map/RightLittleIntermediate":&"","bone_map/RightLittleDistal":&"","bone_map/LeftUpperLeg":&"thigh.L","bone_map/LeftLowerLeg":&"leg.L","bone_map/LeftFoot":&"leg.L_end","bone_map/LeftToes":&"","bone_map/RightUpperLeg":&"thigh.R","bone_map/RightLowerLeg":&"leg.R","bone_map/RightFoot":&"leg.R_end","bone_map/RightToes":&"","script":null) + +} +} +} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/assets/characters/Bob_bob-expression.png b/assets/characters/Bob_bob-expression.png new file mode 100644 index 0000000..fc94a7f Binary files /dev/null and b/assets/characters/Bob_bob-expression.png differ diff --git a/assets/characters/Bob_bob-expression.png.import b/assets/characters/Bob_bob-expression.png.import new file mode 100644 index 0000000..1798cf9 --- /dev/null +++ b/assets/characters/Bob_bob-expression.png.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bv1sc1qhcq1a" +path.s3tc="res://.godot/imported/Bob_bob-expression.png-dd85f9c85e0b1fce41f739ac5e2738dc.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "da9ef29073196da9462ebb8cdb927864" +} + +[deps] + +source_file="res://assets/characters/Bob_bob-expression.png" +dest_files=["res://.godot/imported/Bob_bob-expression.png-dd85f9c85e0b1fce41f739ac5e2738dc.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/assets/characters/Bob_bob-tex.png b/assets/characters/Bob_bob-tex.png new file mode 100644 index 0000000..6a75220 Binary files /dev/null and b/assets/characters/Bob_bob-tex.png differ diff --git a/assets/characters/Bob_bob-tex.png.import b/assets/characters/Bob_bob-tex.png.import new file mode 100644 index 0000000..0cbd2bb --- /dev/null +++ b/assets/characters/Bob_bob-tex.png.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://i7s5u4xti1tl" +path.s3tc="res://.godot/imported/Bob_bob-tex.png-4f071a2d7bfb667073cbad51938ae2fc.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "82029193c1406f641d6277f8a8be7571" +} + +[deps] + +source_file="res://assets/characters/Bob_bob-tex.png" +dest_files=["res://.godot/imported/Bob_bob-tex.png-4f071a2d7bfb667073cbad51938ae2fc.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/assets/characters/Gatot.glb b/assets/characters/Gatot.glb new file mode 100644 index 0000000..3424b6d Binary files /dev/null and b/assets/characters/Gatot.glb differ diff --git a/assets/characters/Gatot.glb.import b/assets/characters/Gatot.glb.import new file mode 100644 index 0000000..ce4ee37 --- /dev/null +++ b/assets/characters/Gatot.glb.import @@ -0,0 +1,48 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://d4cul3w3wem5w" +path="res://.godot/imported/Gatot.glb-7ed2e6cfe1354f044d634ce57f159a9a.scn" + +[deps] + +source_file="res://assets/characters/Gatot.glb" +dest_files=["res://.godot/imported/Gatot.glb-7ed2e6cfe1354f044d634ce57f159a9a.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +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="" +_subresources={ +"nodes": { +"PATH:AnimationPlayer": { +"import/skip_import": true +}, +"PATH:gatot-tpose/Skeleton3D": { +"rest_pose/external_animation_library": null, +"retarget/bone_map": Object(BoneMap,"resource_local_to_scene":false,"resource_name":"","profile":Object(SkeletonProfileHumanoid,"resource_local_to_scene":false,"resource_name":"","root_bone":&"Root","scale_base_bone":&"Hips","group_size":4,"bone_size":56,"script":null) +,"bonemap":null,"bone_map/Root":&"","bone_map/Hips":&"spine","bone_map/Spine":&"spine.001","bone_map/Chest":&"","bone_map/UpperChest":&"","bone_map/Neck":&"head","bone_map/Head":&"head_end","bone_map/LeftEye":&"","bone_map/RightEye":&"","bone_map/Jaw":&"","bone_map/LeftShoulder":&"shoulder.L","bone_map/LeftUpperArm":&"upper_arm.L","bone_map/LeftLowerArm":&"forearm.L","bone_map/LeftHand":&"hand.L","bone_map/LeftThumbMetacarpal":&"","bone_map/LeftThumbProximal":&"","bone_map/LeftThumbDistal":&"","bone_map/LeftIndexProximal":&"","bone_map/LeftIndexIntermediate":&"","bone_map/LeftIndexDistal":&"","bone_map/LeftMiddleProximal":&"","bone_map/LeftMiddleIntermediate":&"","bone_map/LeftMiddleDistal":&"","bone_map/LeftRingProximal":&"","bone_map/LeftRingIntermediate":&"","bone_map/LeftRingDistal":&"","bone_map/LeftLittleProximal":&"","bone_map/LeftLittleIntermediate":&"","bone_map/LeftLittleDistal":&"","bone_map/RightShoulder":&"shoulder.R","bone_map/RightUpperArm":&"upper_arm.R","bone_map/RightLowerArm":&"forearm.R","bone_map/RightHand":&"hand.R","bone_map/RightThumbMetacarpal":&"","bone_map/RightThumbProximal":&"","bone_map/RightThumbDistal":&"","bone_map/RightIndexProximal":&"","bone_map/RightIndexIntermediate":&"","bone_map/RightIndexDistal":&"","bone_map/RightMiddleProximal":&"","bone_map/RightMiddleIntermediate":&"","bone_map/RightMiddleDistal":&"","bone_map/RightRingProximal":&"","bone_map/RightRingIntermediate":&"","bone_map/RightRingDistal":&"","bone_map/RightLittleProximal":&"","bone_map/RightLittleIntermediate":&"","bone_map/RightLittleDistal":&"","bone_map/LeftUpperLeg":&"thigh.L","bone_map/LeftLowerLeg":&"leg.L","bone_map/LeftFoot":&"leg.L_end","bone_map/LeftToes":&"","bone_map/RightUpperLeg":&"thigh.R","bone_map/RightLowerLeg":&"leg.R","bone_map/RightFoot":&"leg.R_end","bone_map/RightToes":&"","script":null) + +} +} +} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/assets/characters/Gatot_gatot-expression.png b/assets/characters/Gatot_gatot-expression.png new file mode 100644 index 0000000..5f0e8b5 Binary files /dev/null and b/assets/characters/Gatot_gatot-expression.png differ diff --git a/assets/characters/Gatot_gatot-expression.png.import b/assets/characters/Gatot_gatot-expression.png.import new file mode 100644 index 0000000..bb76877 --- /dev/null +++ b/assets/characters/Gatot_gatot-expression.png.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://8tuv5jhxtomr" +path.s3tc="res://.godot/imported/Gatot_gatot-expression.png-76e1272bbc91c29d3fd46476b194aa32.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "b06b30c2b569aaa35de4a0a5632c4071" +} + +[deps] + +source_file="res://assets/characters/Gatot_gatot-expression.png" +dest_files=["res://.godot/imported/Gatot_gatot-expression.png-76e1272bbc91c29d3fd46476b194aa32.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/assets/characters/Gatot_gatot-tex.png b/assets/characters/Gatot_gatot-tex.png new file mode 100644 index 0000000..86d8ba4 Binary files /dev/null and b/assets/characters/Gatot_gatot-tex.png differ diff --git a/assets/characters/Gatot_gatot-tex.png.import b/assets/characters/Gatot_gatot-tex.png.import new file mode 100644 index 0000000..547a358 --- /dev/null +++ b/assets/characters/Gatot_gatot-tex.png.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dffwmdedi0wfb" +path.s3tc="res://.godot/imported/Gatot_gatot-tex.png-0ec17b48fcf71fcb7c1146079952224a.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "c969a1cda70ac36a4af7ef9fba2b4525" +} + +[deps] + +source_file="res://assets/characters/Gatot_gatot-tex.png" +dest_files=["res://.godot/imported/Gatot_gatot-tex.png-0ec17b48fcf71fcb7c1146079952224a.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/assets/characters/Masbro.glb b/assets/characters/Masbro.glb new file mode 100644 index 0000000..5bd53d0 Binary files /dev/null and b/assets/characters/Masbro.glb differ diff --git a/assets/characters/Masbro.glb.import b/assets/characters/Masbro.glb.import new file mode 100644 index 0000000..e87dd8e --- /dev/null +++ b/assets/characters/Masbro.glb.import @@ -0,0 +1,48 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://1vk0mjnwkngi" +path="res://.godot/imported/Masbro.glb-c019c78827ce632933ba37f4b2937305.scn" + +[deps] + +source_file="res://assets/characters/Masbro.glb" +dest_files=["res://.godot/imported/Masbro.glb-c019c78827ce632933ba37f4b2937305.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +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="" +_subresources={ +"nodes": { +"PATH:AnimationPlayer": { +"import/skip_import": true +}, +"PATH:masbro-tpose/Skeleton3D": { +"rest_pose/external_animation_library": null, +"retarget/bone_map": Object(BoneMap,"resource_local_to_scene":false,"resource_name":"","profile":Object(SkeletonProfileHumanoid,"resource_local_to_scene":false,"resource_name":"","root_bone":&"Root","scale_base_bone":&"Hips","group_size":4,"bone_size":56,"script":null) +,"bonemap":null,"bone_map/Root":&"","bone_map/Hips":&"spine","bone_map/Spine":&"spine.001","bone_map/Chest":&"","bone_map/UpperChest":&"","bone_map/Neck":&"","bone_map/Head":&"head","bone_map/LeftEye":&"","bone_map/RightEye":&"","bone_map/Jaw":&"","bone_map/LeftShoulder":&"shoulder.L","bone_map/LeftUpperArm":&"upper_arm.L","bone_map/LeftLowerArm":&"forearm.L","bone_map/LeftHand":&"hand.L","bone_map/LeftThumbMetacarpal":&"","bone_map/LeftThumbProximal":&"","bone_map/LeftThumbDistal":&"","bone_map/LeftIndexProximal":&"","bone_map/LeftIndexIntermediate":&"","bone_map/LeftIndexDistal":&"","bone_map/LeftMiddleProximal":&"","bone_map/LeftMiddleIntermediate":&"","bone_map/LeftMiddleDistal":&"","bone_map/LeftRingProximal":&"","bone_map/LeftRingIntermediate":&"","bone_map/LeftRingDistal":&"","bone_map/LeftLittleProximal":&"","bone_map/LeftLittleIntermediate":&"","bone_map/LeftLittleDistal":&"","bone_map/RightShoulder":&"shoulder.R","bone_map/RightUpperArm":&"upper_arm.R","bone_map/RightLowerArm":&"forearm.R","bone_map/RightHand":&"hand.R","bone_map/RightThumbMetacarpal":&"","bone_map/RightThumbProximal":&"","bone_map/RightThumbDistal":&"","bone_map/RightIndexProximal":&"","bone_map/RightIndexIntermediate":&"","bone_map/RightIndexDistal":&"","bone_map/RightMiddleProximal":&"","bone_map/RightMiddleIntermediate":&"","bone_map/RightMiddleDistal":&"","bone_map/RightRingProximal":&"","bone_map/RightRingIntermediate":&"","bone_map/RightRingDistal":&"","bone_map/RightLittleProximal":&"","bone_map/RightLittleIntermediate":&"","bone_map/RightLittleDistal":&"","bone_map/LeftUpperLeg":&"thigh.L","bone_map/LeftLowerLeg":&"leg.L","bone_map/LeftFoot":&"leg.L_end","bone_map/LeftToes":&"","bone_map/RightUpperLeg":&"thigh.R","bone_map/RightLowerLeg":&"leg.R","bone_map/RightFoot":&"leg.R_end","bone_map/RightToes":&"","script":null) + +} +} +} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/assets/characters/Masbro_masbro-expression.png b/assets/characters/Masbro_masbro-expression.png new file mode 100644 index 0000000..6bd9f92 Binary files /dev/null and b/assets/characters/Masbro_masbro-expression.png differ diff --git a/assets/characters/Masbro_masbro-expression.png.import b/assets/characters/Masbro_masbro-expression.png.import new file mode 100644 index 0000000..0e0fe3e --- /dev/null +++ b/assets/characters/Masbro_masbro-expression.png.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ckmpgwjcbnea" +path.s3tc="res://.godot/imported/Masbro_masbro-expression.png-d6672181c953656cdfcc1524ce6b7c6e.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "42c78622d347d6ea6f30c5404dd153f6" +} + +[deps] + +source_file="res://assets/characters/Masbro_masbro-expression.png" +dest_files=["res://.godot/imported/Masbro_masbro-expression.png-d6672181c953656cdfcc1524ce6b7c6e.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/assets/characters/Masbro_masbro-tex.png b/assets/characters/Masbro_masbro-tex.png new file mode 100644 index 0000000..7d7afc4 Binary files /dev/null and b/assets/characters/Masbro_masbro-tex.png differ diff --git a/assets/characters/Masbro_masbro-tex.png.import b/assets/characters/Masbro_masbro-tex.png.import new file mode 100644 index 0000000..d3a9062 --- /dev/null +++ b/assets/characters/Masbro_masbro-tex.png.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b6uhiltx80i4o" +path.s3tc="res://.godot/imported/Masbro_masbro-tex.png-7e985454b7edc93fd47db30929e335c0.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "26957528a2b1b5a522ac69d193409675" +} + +[deps] + +source_file="res://assets/characters/Masbro_masbro-tex.png" +dest_files=["res://.godot/imported/Masbro_masbro-tex.png-7e985454b7edc93fd47db30929e335c0.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/assets/characters/Oldpop.glb b/assets/characters/Oldpop.glb new file mode 100644 index 0000000..770be08 Binary files /dev/null and b/assets/characters/Oldpop.glb differ diff --git a/assets/characters/Oldpop.glb.import b/assets/characters/Oldpop.glb.import new file mode 100644 index 0000000..cc9b3e3 --- /dev/null +++ b/assets/characters/Oldpop.glb.import @@ -0,0 +1,48 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bmln7v6v5kvxg" +path="res://.godot/imported/Oldpop.glb-c0496f43d11bd79e0865e1e20da606da.scn" + +[deps] + +source_file="res://assets/characters/Oldpop.glb" +dest_files=["res://.godot/imported/Oldpop.glb-c0496f43d11bd79e0865e1e20da606da.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +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="" +_subresources={ +"nodes": { +"PATH:AnimationPlayer": { +"import/skip_import": true +}, +"PATH:oldpop-rig/Skeleton3D": { +"rest_pose/external_animation_library": null, +"retarget/bone_map": Object(BoneMap,"resource_local_to_scene":false,"resource_name":"","profile":Object(SkeletonProfileHumanoid,"resource_local_to_scene":false,"resource_name":"","root_bone":&"Root","scale_base_bone":&"Hips","group_size":4,"bone_size":56,"script":null) +,"bonemap":null,"bone_map/Root":&"","bone_map/Hips":&"spine","bone_map/Spine":&"spine.001","bone_map/Chest":&"","bone_map/UpperChest":&"","bone_map/Neck":&"head","bone_map/Head":&"head_end","bone_map/LeftEye":&"","bone_map/RightEye":&"","bone_map/Jaw":&"","bone_map/LeftShoulder":&"shoulder.L","bone_map/LeftUpperArm":&"upper_arm.L","bone_map/LeftLowerArm":&"forearm.L","bone_map/LeftHand":&"hand.L","bone_map/LeftThumbMetacarpal":&"","bone_map/LeftThumbProximal":&"","bone_map/LeftThumbDistal":&"","bone_map/LeftIndexProximal":&"","bone_map/LeftIndexIntermediate":&"","bone_map/LeftIndexDistal":&"","bone_map/LeftMiddleProximal":&"","bone_map/LeftMiddleIntermediate":&"","bone_map/LeftMiddleDistal":&"","bone_map/LeftRingProximal":&"","bone_map/LeftRingIntermediate":&"","bone_map/LeftRingDistal":&"","bone_map/LeftLittleProximal":&"","bone_map/LeftLittleIntermediate":&"","bone_map/LeftLittleDistal":&"","bone_map/RightShoulder":&"shoulder.R","bone_map/RightUpperArm":&"upper_arm.R","bone_map/RightLowerArm":&"forearm.R","bone_map/RightHand":&"hand.R","bone_map/RightThumbMetacarpal":&"","bone_map/RightThumbProximal":&"","bone_map/RightThumbDistal":&"","bone_map/RightIndexProximal":&"","bone_map/RightIndexIntermediate":&"","bone_map/RightIndexDistal":&"","bone_map/RightMiddleProximal":&"","bone_map/RightMiddleIntermediate":&"","bone_map/RightMiddleDistal":&"","bone_map/RightRingProximal":&"","bone_map/RightRingIntermediate":&"","bone_map/RightRingDistal":&"","bone_map/RightLittleProximal":&"","bone_map/RightLittleIntermediate":&"","bone_map/RightLittleDistal":&"","bone_map/LeftUpperLeg":&"thigh.L","bone_map/LeftLowerLeg":&"leg.L","bone_map/LeftFoot":&"leg.L_end","bone_map/LeftToes":&"","bone_map/RightUpperLeg":&"thigh.R","bone_map/RightLowerLeg":&"leg.R","bone_map/RightFoot":&"leg.R_end","bone_map/RightToes":&"","script":null) + +} +} +} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/assets/characters/Oldpop_oldpop-expression.png b/assets/characters/Oldpop_oldpop-expression.png new file mode 100644 index 0000000..104d5a9 Binary files /dev/null and b/assets/characters/Oldpop_oldpop-expression.png differ diff --git a/assets/characters/Oldpop_oldpop-expression.png.import b/assets/characters/Oldpop_oldpop-expression.png.import new file mode 100644 index 0000000..b2e3275 --- /dev/null +++ b/assets/characters/Oldpop_oldpop-expression.png.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bhoo56kuqtgha" +path.s3tc="res://.godot/imported/Oldpop_oldpop-expression.png-89e3d83847c840114e2d0543c96f5ca9.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "9cb145857c614f966bbdc24301f18efb" +} + +[deps] + +source_file="res://assets/characters/Oldpop_oldpop-expression.png" +dest_files=["res://.godot/imported/Oldpop_oldpop-expression.png-89e3d83847c840114e2d0543c96f5ca9.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/assets/characters/Oldpop_oldpop-tex.png b/assets/characters/Oldpop_oldpop-tex.png new file mode 100644 index 0000000..4f9173a Binary files /dev/null and b/assets/characters/Oldpop_oldpop-tex.png differ diff --git a/assets/characters/Oldpop_oldpop-tex.png.import b/assets/characters/Oldpop_oldpop-tex.png.import new file mode 100644 index 0000000..2f169a1 --- /dev/null +++ b/assets/characters/Oldpop_oldpop-tex.png.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c1i00chwkmxtw" +path.s3tc="res://.godot/imported/Oldpop_oldpop-tex.png-2caa5a81b501017c039cb840f5674229.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "eb0e872385a972db6481b58e977a86f3" +} + +[deps] + +source_file="res://assets/characters/Oldpop_oldpop-tex.png" +dest_files=["res://.godot/imported/Oldpop_oldpop-tex.png-2caa5a81b501017c039cb840f5674229.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/assets/characters/animation.glb b/assets/characters/animation.glb new file mode 100644 index 0000000..4820ab1 Binary files /dev/null and b/assets/characters/animation.glb differ diff --git a/assets/characters/animation.glb.import b/assets/characters/animation.glb.import new file mode 100644 index 0000000..17911e1 --- /dev/null +++ b/assets/characters/animation.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://burcyxruv73pu" +path="res://.godot/imported/animation.glb-d28e509f062b0ed9227a1d97e8075ed8.scn" + +[deps] + +source_file="res://assets/characters/animation.glb" +dest_files=["res://.godot/imported/animation.glb-d28e509f062b0ed9227a1d97e8075ed8.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +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="" +_subresources={} +gltf/naming_version=0 +gltf/embedded_image_handling=1 diff --git a/assets/characters/animations/animation-pack.res b/assets/characters/animations/animation-pack.res new file mode 100644 index 0000000..ec6de52 Binary files /dev/null and b/assets/characters/animations/animation-pack.res differ diff --git a/assets/characters/animations/backflip_1.res b/assets/characters/animations/backflip_1.res new file mode 100644 index 0000000..1f3c01c Binary files /dev/null and b/assets/characters/animations/backflip_1.res differ diff --git a/assets/characters/animations/drop_tile_1.res b/assets/characters/animations/drop_tile_1.res new file mode 100644 index 0000000..2d6c85b Binary files /dev/null and b/assets/characters/animations/drop_tile_1.res differ diff --git a/assets/characters/animations/drop_tile_2.res b/assets/characters/animations/drop_tile_2.res new file mode 100644 index 0000000..7b4afe3 Binary files /dev/null and b/assets/characters/animations/drop_tile_2.res differ diff --git a/assets/characters/animations/idle.res b/assets/characters/animations/idle.res new file mode 100644 index 0000000..1f15b44 Binary files /dev/null and b/assets/characters/animations/idle.res differ diff --git a/assets/characters/animations/spawn_tile_1.res b/assets/characters/animations/spawn_tile_1.res new file mode 100644 index 0000000..c239ea1 Binary files /dev/null and b/assets/characters/animations/spawn_tile_1.res differ diff --git a/assets/characters/animations/take_tile_1.res b/assets/characters/animations/take_tile_1.res new file mode 100644 index 0000000..73c202c Binary files /dev/null and b/assets/characters/animations/take_tile_1.res differ diff --git a/assets/characters/animations/take_tile_2.res b/assets/characters/animations/take_tile_2.res new file mode 100644 index 0000000..41daee2 Binary files /dev/null and b/assets/characters/animations/take_tile_2.res differ diff --git a/assets/characters/animations/walk_forward.res b/assets/characters/animations/walk_forward.res new file mode 100644 index 0000000..1d4d73c Binary files /dev/null and b/assets/characters/animations/walk_forward.res differ diff --git a/assets/characters/skeleton_profile_humanoid.tres b/assets/characters/skeleton_profile_humanoid.tres new file mode 100644 index 0000000..53086bb --- /dev/null +++ b/assets/characters/skeleton_profile_humanoid.tres @@ -0,0 +1,3 @@ +[gd_resource type="SkeletonProfileHumanoid" format=3 uid="uid://bvhvhvx2c2303"] + +[resource] diff --git a/scenes/main.gd b/scenes/main.gd index 6eb2f9d..001e768 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -46,6 +46,7 @@ func _on_peer_connected(new_peer_id): await get_tree().create_timer(1).timeout rpc("add_newly_connected_player_character", new_peer_id) rpc_id(new_peer_id, "add_previously_connected_player_characters", connected_peer_ids) + rpc_id(new_peer_id, "sync_game_state", players, bots, game_started) add_player_character(new_peer_id) replace_bot_with_player(new_peer_id) @@ -65,25 +66,35 @@ func add_player_character(peer_id): local_player_character = player_character func add_bot(bot_id): + if multiplayer.is_server(): + rpc("create_bot", bot_id) + +@rpc("call_local") +func create_bot(bot_id): var bot_character = player_scene.instantiate() bot_character.set_multiplayer_authority(1) # Set server as authority for bots bot_character.name = str(bot_id) add_child(bot_character) bot_character.add_to_group("Players", true) bot_character.add_to_group("Bots", true) - bots.append(bot_id) - players.append(bot_id) + if multiplayer.is_server(): + bots.append(bot_id) + players.append(bot_id) func replace_bot_with_player(player_id): - if bots.size() > 0: + if multiplayer.is_server() and bots.size() > 0: var bot_id = bots.pop_front() players.erase(bot_id) players.append(player_id) - var bot_node = get_node(str(bot_id)) - if bot_node: - bot_node.queue_free() + rpc("remove_bot", bot_id) rpc("sync_players", players) +@rpc("call_local") +func remove_bot(bot_id): + var bot_node = get_node(str(bot_id)) + if bot_node: + bot_node.queue_free() + func get_next_available_bot_id(): for i in range(2, max_players + 1): if not i in players: @@ -99,6 +110,17 @@ func add_previously_connected_player_characters(peer_ids): for peer_id in peer_ids: add_player_character(peer_id) +@rpc("call_local") +func sync_game_state(current_players, current_bots, is_game_started): + players = current_players + bots = current_bots + game_started = is_game_started + + # Create bot characters for existing bots + for bot_id in bots: + if not has_node(str(bot_id)): + create_bot(bot_id) + func _process(_delta): if multiplayer.is_server() and game_started: rpc("sync_turn_index", current_turn_index) @@ -107,13 +129,15 @@ func start_game(): if multiplayer.is_server(): game_started = true connected_peer_ids.sort() - rpc("sync_game_start", connected_peer_ids) + rpc("sync_game_start", connected_peer_ids, players, bots) current_turn_index = -1 next_turn() -@rpc -func sync_game_start(peer_ids): +@rpc("call_local") +func sync_game_start(peer_ids, current_players, current_bots): connected_peer_ids = peer_ids + players = current_players + bots = current_bots game_started = true @rpc("reliable") diff --git a/scenes/main.tscn b/scenes/main.tscn index eb3cc03..acc0c15 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -12,19 +12,19 @@ script = ExtResource("1_xcpe3") mesh_library = ExtResource("1_110wo") cell_size = Vector3(1, 1, 1) data = { -"cells": PackedInt32Array(0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 1, 0, 0, 1, 1, 0, 1, 2, 0, 1, 3, 0, 1, 4, 0, 1, 5, 0, 1, 6, 0, 1, 7, 4, 1, 8, 0, 1, 9, 4, 2, 0, 4, 2, 1, 0, 2, 2, 0, 2, 3, 0, 2, 4, 0, 2, 5, 0, 2, 6, 0, 2, 7, 0, 2, 8, 0, 2, 9, 0, 3, 0, 0, 3, 1, 0, 3, 2, 0, 3, 3, 0, 3, 4, 0, 3, 5, 0, 3, 6, 0, 3, 7, 4, 3, 8, 0, 3, 9, 0, 4, 0, 0, 4, 1, 0, 4, 2, 0, 4, 3, 0, 4, 4, 0, 4, 5, 0, 4, 6, 0, 4, 7, 0, 4, 8, 0, 4, 9, 4, 5, 0, 0, 5, 1, 0, 5, 2, 0, 5, 3, 0, 5, 4, 0, 5, 5, 0, 5, 6, 0, 5, 7, 0, 5, 8, 0, 5, 9, 0, 6, 0, 4, 6, 1, 0, 6, 2, 0, 6, 3, 0, 6, 4, 0, 6, 5, 0, 6, 6, 0, 6, 7, 0, 6, 8, 0, 6, 9, 4, 7, 0, 0, 7, 1, 0, 7, 2, 0, 7, 3, 0, 7, 4, 0, 7, 5, 0, 7, 6, 0, 7, 7, 0, 7, 8, 0, 7, 9, 0, 8, 0, 0, 8, 1, 0, 8, 2, 0, 8, 3, 0, 8, 4, 4, 8, 5, 0, 8, 6, 0, 8, 7, 0, 8, 8, 0, 8, 9, 0, 9, 0, 0, 9, 1, 0, 9, 2, 0, 9, 3, 0, 9, 4, 0, 9, 5, 0, 9, 6, 0, 9, 7, 0, 9, 8, 0, 9, 9, 0) +"cells": PackedInt32Array(0, 0, 4, 0, 1, 0, 0, 2, 4, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 4, 0, 7, 0, 0, 8, 0, 0, 9, 0, 1, 0, 0, 1, 1, 0, 1, 2, 0, 1, 3, 0, 1, 4, 0, 1, 5, 4, 1, 6, 4, 1, 7, 4, 1, 8, 0, 1, 9, 4, 2, 0, 0, 2, 1, 0, 2, 2, 0, 2, 3, 0, 2, 4, 0, 2, 5, 0, 2, 6, 4, 2, 7, 4, 2, 8, 0, 2, 9, 4, 3, 0, 4, 3, 1, 0, 3, 2, 0, 3, 3, 0, 3, 4, 4, 3, 5, 0, 3, 6, 4, 3, 7, 0, 3, 8, 0, 3, 9, 0, 4, 0, 4, 4, 1, 0, 4, 2, 0, 4, 3, 0, 4, 4, 4, 4, 5, 0, 4, 6, 0, 4, 7, 0, 4, 8, 0, 4, 9, 0, 5, 0, 0, 5, 1, 4, 5, 2, 0, 5, 3, 0, 5, 4, 4, 5, 5, 0, 5, 6, 0, 5, 7, 4, 5, 8, 4, 5, 9, 0, 6, 0, 4, 6, 1, 0, 6, 2, 4, 6, 3, 4, 6, 4, 4, 6, 5, 0, 6, 6, 4, 6, 7, 4, 6, 8, 0, 6, 9, 0, 7, 0, 4, 7, 1, 0, 7, 2, 4, 7, 3, 0, 7, 4, 0, 7, 5, 0, 7, 6, 0, 7, 7, 4, 7, 8, 4, 7, 9, 4, 8, 0, 4, 8, 1, 0, 8, 2, 0, 8, 3, 0, 8, 4, 4, 8, 5, 4, 8, 6, 0, 8, 7, 0, 8, 8, 0, 8, 9, 0, 9, 0, 0, 9, 1, 4, 9, 2, 4, 9, 3, 0, 9, 4, 0, 9, 5, 0, 9, 6, 0, 9, 7, 0, 9, 8, 0, 9, 9, 0) } script = ExtResource("2_hbe1v") non_walkable_items = Array[int]([4, 5]) [node name="Camera3D" type="Camera3D" parent="."] -transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 5, 30, 5) -visible = false +transform = Transform3D(-1, 0, -8.74228e-08, -6.2963e-08, 0.693754, 0.720212, 6.06499e-08, 0.720212, -0.693754, 5, 15, -10) environment = ExtResource("4_ky38j") fov = 35.5 -[node name="Camera3D2" type="Camera3D" parent="."] +[node name="Camera3D200" type="Camera3D" parent="."] transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 5, 30, 5) +visible = false environment = ExtResource("4_ky38j") fov = 35.5 diff --git a/scenes/player.gd b/scenes/player.gd index 2f90425..b13c66d 100644 --- a/scenes/player.gd +++ b/scenes/player.gd @@ -1,60 +1,55 @@ -extends Node3D # This script is attached to a Node3D +extends Node3D -# Export variables for inspector configuration -@export var enhanced_gridmap_path: NodePath = "/root/Main/EnhancedGridMap" # Path to the EnhancedGridMap node -var enhanced_gridmap: EnhancedGridMap # References to the EnhancedGridMap node -@export var current_position: Vector2i # Current grid position of the player -var is_player_moving: bool = false # Flag to prevent movement while already moving +@export var enhanced_gridmap_path: NodePath = "/root/Main/EnhancedGridMap" +var enhanced_gridmap: EnhancedGridMap +@export var current_position: Vector2i +var is_player_moving: bool = false -# Customizable cell size and offset -@export var cell_size: Vector3 = Vector3(2, 2, 2) # Size of each grid cell -@export var cell_offset: Vector3 = Vector3(0, 0, 0) # Offset for the grid +@export var cell_size: Vector3 = Vector3(2, 2, 2) +@export var cell_offset: Vector3 = Vector3(0, 0, 0) -# Center offset flags -@export var center_x: bool = false # Center the player on X axis -@export var center_y: bool = false # Center the player on Y axis -@export var center_z: bool = false # Center the player on Z axis +@export var center_x: bool = false +@export var center_y: bool = false +@export var center_z: bool = false -# Diagonal movement flag -@export var use_diagonal_movement: bool = false: # Allow diagonal movement +@export var use_diagonal_movement: bool = false: set(value): use_diagonal_movement = value if enhanced_gridmap: enhanced_gridmap.set_diagonal_movement(value) -# Turn management variables -@export var is_my_turn: bool = false: # Flag to indicate if it's this player's turn +@export var is_my_turn: bool = false: set(value): is_my_turn = value if is_my_turn and is_multiplayer_authority(): - rpc("display_message", "It's your turn!") # RPC call to display turn message -@export var has_moved_this_turn = false # Flag to track if player has moved this turn -@onready var main_scene = get_tree().current_scene # Reference to the main scene + rpc("display_message", "It's your turn!") +@export var has_moved_this_turn = false +@onready var main_scene = get_tree().current_scene -func _ready(): # Called when the node enters the scene tree - name = str(get_multiplayer_authority()) # Set the node name to the multiplayer authority ID - $Name.text = str(name) # Set the displayed name +func _ready(): + name = str(get_multiplayer_authority()) + $Name.text = str(name) - enhanced_gridmap = get_node(enhanced_gridmap_path) # Get the EnhancedGridMap node + enhanced_gridmap = get_node(enhanced_gridmap_path) if main_scene: - enhanced_gridmap = main_scene.get_node("EnhancedGridMap") # Get EnhancedGridMap from main scene + enhanced_gridmap = main_scene.get_node("EnhancedGridMap") else: - push_error("Main scene not found") # Error if main scene not found + push_error("Main scene not found") if not enhanced_gridmap: push_error("EnhancedGridMap node not found. Please set the correct path in the inspector.") return - enhanced_gridmap.initialize_astar() # Initialize A* pathfinding - enhanced_gridmap.set_diagonal_movement(use_diagonal_movement) # Set diagonal movement option + enhanced_gridmap.initialize_astar() + enhanced_gridmap.set_diagonal_movement(use_diagonal_movement) - current_position = find_valid_starting_position() # Find a valid starting position - update_player_position(current_position) # Update player's position + current_position = find_valid_starting_position() + update_player_position(current_position) - set_process_unhandled_input(is_multiplayer_authority()) # Only process input for the authority + set_process_unhandled_input(is_multiplayer_authority()) -func find_valid_starting_position() -> Vector2i: # Find a valid starting position +func find_valid_starting_position() -> Vector2i: var rng = RandomNumberGenerator.new() rng.randomize() @@ -62,15 +57,15 @@ func find_valid_starting_position() -> Vector2i: # Find a valid starting positi var attempts = 0 while attempts < max_attempts: - current_position = Vector2i(0, rng.randi_range(0, 9)) # Generate random position + current_position = Vector2i(0, rng.randi_range(0, 9)) var cell_item = enhanced_gridmap.get_cell_item(Vector3i(current_position.x, 0, current_position.y)) if cell_item not in enhanced_gridmap.non_walkable_items: - return current_position # Return valid position + return current_position attempts += 1 - return Vector2i(0, 0) # Default position if no valid position found + return Vector2i(0, 0) func find_random_valid_position() -> Vector2i: var rng = RandomNumberGenerator.new() @@ -85,17 +80,17 @@ func find_random_valid_position() -> Vector2i: var cell_item = enhanced_gridmap.get_cell_item(Vector3i(random_position.x, 0, random_position.y)) if cell_item not in enhanced_gridmap.non_walkable_items and random_position != current_position: - return random_position # Return valid position + return random_position attempts += 1 - return current_position # Return current position if no new valid position found + return current_position -func _physics_process(_delta): # Called every physics frame +func _physics_process(_delta): if is_multiplayer_authority(): - rpc("remote_set_position", global_position) # RPC call to sync position + rpc("remote_set_position", global_position) -func _unhandled_input(event): # Handle input events +func _unhandled_input(event): if not is_multiplayer_authority() or not is_my_turn or is_player_moving: return @@ -108,7 +103,7 @@ func _unhandled_input(event): # Handle input events if click_position != Vector2i(-1, -1): move_player_to_clicked_position(click_position) -func raycast_to_grid(from: Vector3, to: Vector3) -> Vector2i: # Convert 3D raycast to grid position +func raycast_to_grid(from: Vector3, to: Vector3) -> Vector2i: var plane = Plane(Vector3.UP, cell_offset.y) var intersection = plane.intersects_ray(from, to - from) @@ -123,9 +118,9 @@ func raycast_to_grid(from: Vector3, to: Vector3) -> Vector2i: # Convert 3D rayc grid_position.y >= 0 and grid_position.y < enhanced_gridmap.rows: return grid_position - return Vector2i(-1, -1) # Invalid position + return Vector2i(-1, -1) -func move_player_to_clicked_position(grid_position: Vector2i): # Move player to clicked position +func move_player_to_clicked_position(grid_position: Vector2i): var cell_item = enhanced_gridmap.get_cell_item(Vector3i(grid_position.x, 0, grid_position.y)) if cell_item in enhanced_gridmap.non_walkable_items: @@ -140,7 +135,7 @@ func move_player_to_clicked_position(grid_position: Vector2i): # Move player to else: print("No valid path found") -func move_player_along_path(path: Array): # Move player along calculated path +func move_player_along_path(path: Array): is_player_moving = true var tween = create_tween() tween.set_trans(Tween.TRANS_CUBIC) @@ -176,10 +171,10 @@ func move_bot_along_path(path: Array): end_turn() ) -func update_player_position(grid_position: Vector2i): # Update player's position +func update_player_position(grid_position: Vector2i): position = grid_to_world(grid_position) -func grid_to_world(grid_position: Vector2i) -> Vector3: # Convert grid position to world position +func grid_to_world(grid_position: Vector2i) -> Vector3: var world_position = Vector3( grid_position.x * cell_size.x, cell_size.y, @@ -198,24 +193,24 @@ func grid_to_world(grid_position: Vector2i) -> Vector3: # Convert grid position return world_position + cell_offset -func start_turn(): # Start player's turn +func start_turn(): has_moved_this_turn = false is_my_turn = true if is_multiplayer_authority(): - rpc("display_message", "It's your turn!") # RPC call to display turn message + rpc("display_message", "It's your turn!") -func end_turn(): # End player's turn +func end_turn(): is_my_turn = false has_moved_this_turn = false if is_multiplayer_authority(): - get_node("/root/Main").request_next_turn() # Request next turn from main scene + get_node("/root/Main").request_next_turn() @rpc("any_peer", "call_local", "unreliable") -func remote_set_position(authority_position): # RPC function to sync position +func remote_set_position(authority_position): global_position = authority_position @rpc("any_peer", "call_local") -func display_message(message): # RPC function to display messages +func display_message(message): $Bubble.show() $Bubble/Message.show() $Bubble/Message.text = str(message) diff --git a/scenes/player.tscn b/scenes/player.tscn index 2f60bc6..70a0e4e 100644 --- a/scenes/player.tscn +++ b/scenes/player.tscn @@ -1,7 +1,12 @@ -[gd_scene load_steps=7 format=3 uid="uid://1dbdbg3q5778"] +[gd_scene load_steps=12 format=3 uid="uid://1dbdbg3q5778"] [ext_resource type="Script" path="res://scenes/player.gd" id="1_qecr4"] +[ext_resource type="PackedScene" uid="uid://ejeamn0pyey4" path="res://assets/characters/Bob.glb" id="2_3e0d5"] [ext_resource type="Texture2D" uid="uid://b4y41h16q6m34" path="res://assets/textures/bub.png" id="2_5w327"] +[ext_resource type="PackedScene" uid="uid://1vk0mjnwkngi" path="res://assets/characters/Masbro.glb" id="2_mjsl8"] +[ext_resource type="PackedScene" uid="uid://d4cul3w3wem5w" path="res://assets/characters/Gatot.glb" id="4_3tlf6"] +[ext_resource type="PackedScene" uid="uid://bmln7v6v5kvxg" path="res://assets/characters/Oldpop.glb" id="5_alfd1"] +[ext_resource type="AnimationLibrary" uid="uid://c3pyopnwibckj" path="res://assets/characters/animations/animation-pack.res" id="6_5oq5w"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xqgey"] albedo_color = Color(0.85, 0.085, 0.238, 1) @@ -19,7 +24,29 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 0) script = ExtResource("1_qecr4") cell_size = Vector3(1, 1, 1) +[node name="Masbro" parent="." instance=ExtResource("2_mjsl8")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0) + +[node name="Bob" parent="." instance=ExtResource("2_3e0d5")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.484627, 0) +visible = false + +[node name="Gatot" parent="." instance=ExtResource("4_3tlf6")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0) +visible = false + +[node name="Oldpop" parent="." instance=ExtResource("5_alfd1")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0) +visible = false + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +root_node = NodePath("../Masbro") +libraries = { +"animation-pack": ExtResource("6_5oq5w") +} + [node name="MeshInstance3D" type="MeshInstance3D" parent="."] +visible = false mesh = SubResource("CapsuleMesh_l8ldl") [node name="CollisionShape3D" type="CollisionShape3D" parent="."]