-feat: implement ai fighter movement

This commit is contained in:
rsxri 2025-04-18 02:07:51 +01:00
parent ffd765245a
commit 70862d3903
44 changed files with 357 additions and 838 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ofevjaw7ld0a"
path="res://.godot/imported/ShipBlue.png-cd14757644b01588d12a6eb832fd1efc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Fighter/ShipBlue.png"
dest_files=["res://.godot/imported/ShipBlue.png-cd14757644b01588d12a6eb832fd1efc.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://blqvjtcgpuxdn"
path="res://.godot/imported/ShipGreen.png-4683a88a79b16f00eeed238920a2cb80.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Fighter/ShipGreen.png"
dest_files=["res://.godot/imported/ShipGreen.png-4683a88a79b16f00eeed238920a2cb80.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b7o4042jfdt8p"
path="res://.godot/imported/ShipRed.png-5e34849ecea1aafb66881a3ef49f514d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Fighter/ShipRed.png"
dest_files=["res://.godot/imported/ShipRed.png-5e34849ecea1aafb66881a3ef49f514d.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://6x3pfshof4gl"
path="res://.godot/imported/playerShip1_blue.png-393d5019d9dd4edeb3df00abd08b1ee9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Figher/playerShip1_blue.png"
dest_files=["res://.godot/imported/playerShip1_blue.png-393d5019d9dd4edeb3df00abd08b1ee9.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dmuik5ojcio86"
path="res://.godot/imported/playerShip1_green.png-4a111c4367f7545a32a26c4f5cd7dbac.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Figher/playerShip1_green.png"
dest_files=["res://.godot/imported/playerShip1_green.png-4a111c4367f7545a32a26c4f5cd7dbac.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://1ho7845wb3k6"
path="res://.godot/imported/playerShip1_red.png-50882e0f56277706bb68977733d211bb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Figher/playerShip1_red.png"
dest_files=["res://.godot/imported/playerShip1_red.png-50882e0f56277706bb68977733d211bb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cfa4ngisquwe4"
path="res://.godot/imported/ShipBlue.png-414f648817c1ef5cabe0621ce3819d98.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Guardian/ShipBlue.png"
dest_files=["res://.godot/imported/ShipBlue.png-414f648817c1ef5cabe0621ce3819d98.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cka0ryhhd2mqh"
path="res://.godot/imported/ShipGreen.png-8ca4338078ea8f7a47135103f3a182eb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Guardian/ShipGreen.png"
dest_files=["res://.godot/imported/ShipGreen.png-8ca4338078ea8f7a47135103f3a182eb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://vdjq5sinchfg"
path="res://.godot/imported/ShipRed.png-624c7bc4a9744294ec3a62022b59b03a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Guardian/ShipRed.png"
dest_files=["res://.godot/imported/ShipRed.png-624c7bc4a9744294ec3a62022b59b03a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bqqwicot5ewk8"
path="res://.godot/imported/ShipBlue.png-1b6f527470d0923f0261cb7803069015.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Interceptor/ShipBlue.png"
dest_files=["res://.godot/imported/ShipBlue.png-1b6f527470d0923f0261cb7803069015.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dwoq2aeeja26d"
path="res://.godot/imported/ShipGreen.png-ef270f2f11e422c606ec7718163a9cc5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Interceptor/ShipGreen.png"
dest_files=["res://.godot/imported/ShipGreen.png-ef270f2f11e422c606ec7718163a9cc5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cb7mhkx65hau6"
path="res://.godot/imported/ShipRed.png-9cabbec88e2ba57e00a067e15c5234f9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/Interceptor/ShipRed.png"
dest_files=["res://.godot/imported/ShipRed.png-9cabbec88e2ba57e00a067e15c5234f9.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://lcb2vm87qo30"
path="res://.godot/imported/playerShip1_blue.png-92237cfcf64db4f678b0d0de1236dc63.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/PNG/playerShip1_blue.png"
dest_files=["res://.godot/imported/playerShip1_blue.png-92237cfcf64db4f678b0d0de1236dc63.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://kcrxxose60rm"
path="res://.godot/imported/playerShip1_green.png-b0521797598d8c4961dd63258de6a452.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/PNG/playerShip1_green.png"
dest_files=["res://.godot/imported/playerShip1_green.png-b0521797598d8c4961dd63258de6a452.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bhsxng0gu0wqr"
path="res://.godot/imported/playerShip1_orange.png-d5b70e68997e6c0f7c9a8e98a30ff1f4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/unused/playerShip1_orange.png"
dest_files=["res://.godot/imported/playerShip1_orange.png-d5b70e68997e6c0f7c9a8e98a30ff1f4.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://8b4ipv621t74"
path="res://.godot/imported/playerShip1_red.png-15c6662470f6e3c291f9cec5cbb8672a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/PNG/playerShip1_red.png"
dest_files=["res://.godot/imported/playerShip1_red.png-15c6662470f6e3c291f9cec5cbb8672a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://borf4yp7px3im"
path="res://.godot/imported/playerShip2_blue.png-aff6d14ebfe89d5371ecac9eadad319d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/PNG/playerShip2_blue.png"
dest_files=["res://.godot/imported/playerShip2_blue.png-aff6d14ebfe89d5371ecac9eadad319d.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bxr8dloaykbih"
path="res://.godot/imported/playerShip2_green.png-caf1b18b1213180f5cfe9146c3b9216b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/PNG/playerShip2_green.png"
dest_files=["res://.godot/imported/playerShip2_green.png-caf1b18b1213180f5cfe9146c3b9216b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://vsl1cm3qr5rh"
path="res://.godot/imported/playerShip2_orange.png-cbe9fbb912f36eb1c69ece7960f4e0ad.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/unused/playerShip2_orange.png"
dest_files=["res://.godot/imported/playerShip2_orange.png-cbe9fbb912f36eb1c69ece7960f4e0ad.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bt42wxm5m5fjn"
path="res://.godot/imported/playerShip2_red.png-f93b4119b6564f203619e17620166947.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/PNG/playerShip2_red.png"
dest_files=["res://.godot/imported/playerShip2_red.png-f93b4119b6564f203619e17620166947.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dfglwloidiffr"
path="res://.godot/imported/playerShip3_blue.png-29e6a1d820b7bb321ba8d98117c663de.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/PNG/playerShip3_blue.png"
dest_files=["res://.godot/imported/playerShip3_blue.png-29e6a1d820b7bb321ba8d98117c663de.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dlsh30mn2sfqa"
path="res://.godot/imported/playerShip3_green.png-f04b5e13d4e4f208a8b9d642f39c02f0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/PNG/playerShip3_green.png"
dest_files=["res://.godot/imported/playerShip3_green.png-f04b5e13d4e4f208a8b9d642f39c02f0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dp3locb4nhho4"
path="res://.godot/imported/playerShip3_orange.png-0cc64e019227fe01773b9ffdb0fa16fb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Player/unused/playerShip3_orange.png"
dest_files=["res://.godot/imported/playerShip3_orange.png-0cc64e019227fe01773b9ffdb0fa16fb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://uj1jwow41swa"
path="res://.godot/imported/playerShip3_red.png-0dcba5ee2d2eeed4ef9ab88ecd94adf9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/PNG/playerShip3_red.png"
dest_files=["res://.godot/imported/playerShip3_red.png-0dcba5ee2d2eeed4ef9ab88ecd94adf9.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -0,0 +1,24 @@
[gd_scene load_steps=4 format=3 uid="uid://3e6fmds2x8q5"]
[ext_resource type="Texture2D" uid="uid://soden53qtfxf" path="res://assets/Ships/Fighters/Enemy/enemyFighter.png" id="1_4l75b"]
[ext_resource type="Script" path="res://script/ai_fighter.cs" id="1_kyds1"]
[sub_resource type="CircleShape2D" id="CircleShape2D_6vq6f"]
radius = 41.0488
[node name="AI_Fighter" type="CharacterBody2D"]
motion_mode = 1
script = ExtResource("1_kyds1")
type = 1
faction = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_6vq6f")
[node name="ShipSprite" type="Sprite2D" parent="."]
texture = ExtResource("1_4l75b")
[node name="LaserSpawn" type="Node2D" parent="."]
position = Vector2(0, -58)
[node name="EffectSpawn" type="Node2D" parent="."]

View file

@ -0,0 +1,22 @@
[gd_scene load_steps=4 format=3 uid="uid://cpiy3kiwt8pdi"]
[ext_resource type="Texture2D" uid="uid://soden53qtfxf" path="res://assets/Ships/Fighters/Enemy/enemyFighter.png" id="1_aomjn"]
[ext_resource type="Script" path="res://script/enemy_fighter.cs" id="1_rkm3y"]
[sub_resource type="CircleShape2D" id="CircleShape2D_6vq6f"]
radius = 41.0488
[node name="EnemyFighter" type="CharacterBody2D"]
script = ExtResource("1_rkm3y")
faction = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_6vq6f")
[node name="ShipSprite" type="Sprite2D" parent="."]
texture = ExtResource("1_aomjn")
[node name="LaserSpawn" type="Node2D" parent="."]
position = Vector2(0, -58)
[node name="EffectSpawn" type="Node2D" parent="."]

View file

@ -1,9 +1,10 @@
[gd_scene load_steps=5 format=3 uid="uid://635xs5haibcn"] [gd_scene load_steps=6 format=3 uid="uid://635xs5haibcn"]
[ext_resource type="PackedScene" uid="uid://ckh362yqjkpi0" path="res://scenes/player.tscn" id="1_1w06w"] [ext_resource type="PackedScene" uid="uid://ckh362yqjkpi0" path="res://scenes/player.tscn" id="1_1w06w"]
[ext_resource type="Script" path="res://script/game.cs" id="1_dukjm"] [ext_resource type="Script" path="res://script/game.cs" id="1_dukjm"]
[ext_resource type="PackedScene" uid="uid://b6myj160l6vf8" path="res://scenes/hud.tscn" id="2_xbhg5"] [ext_resource type="PackedScene" uid="uid://b6myj160l6vf8" path="res://scenes/hud.tscn" id="2_xbhg5"]
[ext_resource type="PackedScene" uid="uid://dnvcics1ni4pa" path="res://scenes/asteroid.tscn" id="3_b8wlr"] [ext_resource type="PackedScene" uid="uid://dnvcics1ni4pa" path="res://scenes/asteroid.tscn" id="3_b8wlr"]
[ext_resource type="PackedScene" uid="uid://3e6fmds2x8q5" path="res://scenes/ai_fighter.tscn" id="5_nkk10"]
[node name="Game" type="Node2D"] [node name="Game" type="Node2D"]
script = ExtResource("1_dukjm") script = ExtResource("1_dukjm")
@ -12,11 +13,6 @@ script = ExtResource("1_dukjm")
[node name="HUD" parent="UI" instance=ExtResource("2_xbhg5")] [node name="HUD" parent="UI" instance=ExtResource("2_xbhg5")]
[node name="Player" parent="." instance=ExtResource("1_1w06w")]
position = Vector2(800, 450)
scale = Vector2(0.6, 0.6)
collision_layer = 8
[node name="Lasers" type="Node" parent="."] [node name="Lasers" type="Node" parent="."]
[node name="Asteroids" type="Node" parent="."] [node name="Asteroids" type="Node" parent="."]
@ -38,11 +34,33 @@ position = Vector2(769, 202)
[node name="Asteroid5" parent="Asteroids" instance=ExtResource("3_b8wlr")] [node name="Asteroid5" parent="Asteroids" instance=ExtResource("3_b8wlr")]
position = Vector2(387, 230) position = Vector2(387, 230)
[connection signal="HealthUpdate" from="Player" to="." method="OnPlayerHealthUpdate"] [node name="Ships" type="Node" parent="."]
[connection signal="LaserShot" from="Player" to="." method="OnPlayerLaserShot"]
[connection signal="PlayerDeath" from="Player" to="." method="OnPlayerDeath"] [node name="Friendly" type="Node" parent="Ships"]
[node name="Player" parent="Ships/Friendly" instance=ExtResource("1_1w06w")]
position = Vector2(800, 450)
scale = Vector2(0.6, 0.6)
collision_layer = 8
type = 1
[node name="AI_Fighter" parent="Ships/Friendly" instance=ExtResource("5_nkk10")]
position = Vector2(989, 330)
scale = Vector2(0.6, 0.6)
type = 0
faction = 1
[node name="Enemy" type="Node" parent="Ships"]
[node name="AI_Fighter" parent="Ships/Enemy" instance=ExtResource("5_nkk10")]
position = Vector2(992, 205)
scale = Vector2(0.6, 0.6)
[connection signal="Exploded" from="Asteroids/Asteroid" to="." method="OnAsteroidExploded"] [connection signal="Exploded" from="Asteroids/Asteroid" to="." method="OnAsteroidExploded"]
[connection signal="Exploded" from="Asteroids/Asteroid2" to="." method="OnAsteroidExploded"] [connection signal="Exploded" from="Asteroids/Asteroid2" to="." method="OnAsteroidExploded"]
[connection signal="Exploded" from="Asteroids/Asteroid3" to="." method="OnAsteroidExploded"] [connection signal="Exploded" from="Asteroids/Asteroid3" to="." method="OnAsteroidExploded"]
[connection signal="Exploded" from="Asteroids/Asteroid4" to="." method="OnAsteroidExploded"] [connection signal="Exploded" from="Asteroids/Asteroid4" to="." method="OnAsteroidExploded"]
[connection signal="Exploded" from="Asteroids/Asteroid5" to="." method="OnAsteroidExploded"] [connection signal="Exploded" from="Asteroids/Asteroid5" to="." method="OnAsteroidExploded"]
[connection signal="HealthUpdate" from="Ships/Friendly/Player" to="." method="OnPlayerHealthUpdate"]
[connection signal="LaserShot" from="Ships/Friendly/Player" to="." method="OnPlayerLaserShot"]
[connection signal="PlayerDeath" from="Ships/Friendly/Player" to="." method="OnPlayerDeath"]

View file

@ -7,6 +7,7 @@
radius = 41.0488 radius = 41.0488
[node name="Ship" type="CharacterBody2D"] [node name="Ship" type="CharacterBody2D"]
motion_mode = 1
script = ExtResource("1_u8ww1") script = ExtResource("1_u8ww1")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]

241
MB_FYP/script/ai_fighter.cs Normal file
View file

@ -0,0 +1,241 @@
using Godot;
using System;
public partial class ai_fighter : ship
{
[Export]
public float AggroRange = 500f;
[Export]
public float FireCooldown = 2f;
[Export]
public int ScorePayout = 50;
[Export]
public float EngageDistance = 300f;
//retreat logic
private float previousDistance = 0f;
private float stuckTime = 0f;
private const float stuckThreshold = 0.5f; // how many seconds to count as “stuck”
private const float distanceTolerance = 5f; // how little the distance must change
private Node2D currentTarget;
private float fireTimer = 0f;
public override void _Ready()
{
SetShipStats();
SetupVisual();
Sprite.Texture = GD.Load<Texture2D>(spritePath);
LaserSpawn = GetNode<Node2D>("LaserSpawn");
}
public override void _PhysicsProcess(double delta)
{
UpdateMovement(delta);
GD.Print(Name, ": MainSpeed = ", MainSpeed, " Velocity = ", Velocity.Length());
}
// SETUP
private void SetupAI()
{
}
// COMBAT
private void FireWeapons()
{
}
// TARGETING
private Node2D FindClosestTarget()
{
Node2D closest = null;
float closestDistance = Mathf.Inf;
Node shipParent = null;
if (faction == ShipFaction.FRIENDLY)
{
shipParent = GetTree().Root.GetNode("Game/Ships/Enemy");
}
else if (faction == ShipFaction.ENEMY || faction == ShipFaction.ACE)
{
shipParent = GetTree().Root.GetNode("Game/Ships/Friendly");
}
if (shipParent == null)
{
GD.Print("No shipParent found");
return null;
}
foreach (Node node in shipParent.GetChildren())
{
if (node is ship target && target.Health > 0)
{
float dist = GlobalPosition.DistanceTo(target.GlobalPosition);
if (dist < closestDistance)
{
closest = target;
closestDistance = dist;
}
}
}
return closest;
}
private bool EnsureTarget()
{
if (currentTarget == null || !IsInstanceValid(currentTarget))
{
currentTarget = FindClosestTarget();
return false;
}
return true;
}
private void UpdateDistanceTracking(float distance)
{
if (MathF.Abs(distance - previousDistance) < distanceTolerance)
{
stuckTime += (float)GetProcessDeltaTime();
}
else
{
stuckTime = 0f;
}
previousDistance = distance;
}
private void HandleThrust(Vector2 direction, float angleDiff, float distance)
{
float retreatThreshold = EngageDistance * 0.75f;
if (Mathf.Abs(angleDiff) < 1f && Velocity.Length() < MaxSpeed - MainSpeed)
{
if (distance > EngageDistance)
{
Velocity += -Transform.Y * MainSpeed;
}
else if (distance < retreatThreshold)
{
if (stuckTime > stuckThreshold)
{
Vector2 away = (GlobalPosition - currentTarget.GlobalPosition).Normalized();
Velocity += away * MainSpeed;
}
else
{
Velocity += Transform.X * StrafeSpeed;
}
}
}
}
private void RotateToTarget(Vector2 direction, double delta)
{
float targetAngle = direction.Angle() + Mathf.Pi / 2;
float angleDiff = Mathf.AngleDifference(Rotation, targetAngle);
Rotation += Mathf.Clamp(angleDiff, -RotationSpeed * (float)delta, RotationSpeed * (float)delta);
}
private void UpdateMovement(double delta)
{
if (!EnsureTarget())
{
return;
}
Vector2 direction = (currentTarget.GlobalPosition - GlobalPosition).Normalized();
float angleToTarget = direction.Angle() + MathF.PI / 2;
float angleDiff = Mathf.AngleDifference(Rotation, angleToTarget);
float distance = GlobalPosition.DistanceTo(currentTarget.GlobalPosition);
UpdateDistanceTracking(distance);
HandleThrust(direction, angleDiff, distance);
RotateToTarget(direction, delta);
Velocity = Velocity.MoveToward(Vector2.Zero, 2.5f); //2.5f FA value (on for AI)
Velocity = Velocity.LimitLength(MaxSpeed);
MoveAndSlide();
}
/*private void UpdateMovement(double delta)
{
if (currentTarget == null || !IsInstanceValid(currentTarget))
{
currentTarget = FindClosestTarget();
return;
}
Vector2 direction = (currentTarget.GlobalPosition - GlobalPosition).Normalized();
float distance = GlobalPosition.DistanceTo(currentTarget.GlobalPosition);
float retreatThreshold = EngageDistance * 0.75f;
//Velocity += direction * MainSpeed;
float angleToTarget = direction.Angle() + Mathf.Pi / 2;
float angleDiff = Mathf.AngleDifference(Rotation, angleToTarget);
float currentDistance = GlobalPosition.DistanceTo(currentTarget.GlobalPosition);
if (Mathf.Abs(currentDistance - previousDistance) < distanceTolerance)
stuckTime += (float)delta;
else
stuckTime = 0f;
previousDistance = currentDistance;
//GD.Print("angleDiff: ", Mathf.RadToDeg(angleDiff));
//GD.Print("rotation: ", Mathf.RadToDeg(Rotation), " target: ", Mathf.RadToDeg(angleToTarget));
if (Mathf.Abs(angleDiff) < 1f && Velocity.Length() < MaxSpeed - MainSpeed)
{
if (distance > EngageDistance)
{
Velocity += -Transform.Y * MainSpeed;
}
else if (distance < retreatThreshold)
{
if (stuckTime > stuckThreshold){
Velocity += Transform.Y * MainSpeed;
}
else
{
Velocity += Transform.X * StrafeSpeed;
}
//Velocity += Transform.Y * MainSpeed;
//Velocity += Transform.X * StrafeSpeed;
}
}
Velocity = Velocity.MoveToward(Vector2.Zero, 2.5f);
//GD.Print(MainSpeed);
//GD.Print(Velocity);
//Rotation = direction.Angle() + Mathf.Pi / 2; // Keeps ship pointing right way
angleDiff = Mathf.AngleDifference(Rotation, direction.Angle() + Mathf.Pi / 2);
Rotation += Mathf.Clamp(angleDiff, -RotationSpeed * (float)delta, RotationSpeed * (float)delta);
Velocity.LimitLength(MaxSpeed);
MoveAndSlide();
}*/
}

View file

@ -7,6 +7,12 @@ public partial class game : Node2D
public CharacterBody2D Player = null; public CharacterBody2D Player = null;
public Node Asteroids = null; public Node Asteroids = null;
public Node Friendlies = null;
public Node Enemies = null;
public Node Ships = null;
public Control HUD = null; public Control HUD = null;
public Label ScoreLabel = null; public Label ScoreLabel = null;
@ -31,7 +37,10 @@ public partial class game : Node2D
Asteroids = GetNode<Node>("Asteroids"); Asteroids = GetNode<Node>("Asteroids");
Lasers = GetNode<Node>("Lasers"); Lasers = GetNode<Node>("Lasers");
Player = GetNode<CharacterBody2D>("Player"); Ships = GetNode<Node>("Ships");
Enemies = GetNode<Node>("Ships/Enemy");
Friendlies = GetNode<Node>("Ships/Friendly");
Player = GetNode<CharacterBody2D>("Ships/Friendly/Player");
//var p = new player(); //var p = new player();
//p.LaserShot += OnPlayerLaserShot; //p.LaserShot += OnPlayerLaserShot;
} }

View file

@ -104,6 +104,10 @@ public partial class player : ship // Inherits from base ship class
Rotation += _rotationDirection * RotationSpeed * (float)delta; Rotation += _rotationDirection * RotationSpeed * (float)delta;
Velocity.LimitLength(MaxSpeed); Velocity.LimitLength(MaxSpeed);
//GD.Print(MainSpeed);
//GD.Print("v ",Velocity, "v");
GD.Print(Name, ": MainSpeed = ", MainSpeed, " Velocity = ", Velocity.Length());
MoveAndSlide(); MoveAndSlide();
/* /*

View file

@ -13,17 +13,19 @@ public partial class ship : CharacterBody2D
//[Export] //[Export]
//public Vector2 ScreenSize; //public Vector2 ScreenSize;
[Export] [Export]
public int Health { get; set; } = 100; public int Health { get; set; }
[Export] [Export]
public int MaxHealth { get; set; } = 100; public int MaxHealth { get; set; }
[Export] [Export]
public int MaxSpeed { get; set;} = 300; public int MaxSpeed { get; set;}
[Export] [Export]
public int MainSpeed { get; set; } = 20; public int MainSpeed { get; set; }
[Export] [Export]
public int StrafeSpeed { get; set; } = 5; public int StrafeSpeed { get; set; }
[Export] [Export]
public float RotationSpeed { get; set; } = 2f; public float RotationSpeed { get; set; }
[Export]
public int Damage {get; set;}
[Export] [Export]
public ShipType type; public ShipType type;
[Export] [Export]
@ -47,7 +49,7 @@ public partial class ship : CharacterBody2D
EmitSignal(SignalName.LaserShot, Laser); EmitSignal(SignalName.LaserShot, Laser);
} }
public void SetupVisual() protected virtual void SetupVisual()
{ {
Sprite = GetNode<Sprite2D>("ShipSprite"); Sprite = GetNode<Sprite2D>("ShipSprite");
spritePath = ""; // Have to initialise as "" because of switch statements spritePath = ""; // Have to initialise as "" because of switch statements
@ -135,20 +137,34 @@ public partial class ship : CharacterBody2D
{ {
switch (type) switch (type)
{ {
case ShipType.FIGHTER:
Health = 100;
MaxSpeed = 300;
MainSpeed = 20;
StrafeSpeed = 10;
RotationSpeed = 2f;
MaxHealth = 100;
Damage = 40;
break;
case ShipType.INTERCEPTOR: case ShipType.INTERCEPTOR:
Health = 75;
MaxSpeed = 450; MaxSpeed = 450;
MainSpeed = 35; MainSpeed = 35;
StrafeSpeed = 10; StrafeSpeed = 15;
RotationSpeed = 4f; RotationSpeed = 4f;
MaxHealth = 75; MaxHealth = 75;
Damage = 20;
break; break;
case ShipType.GUARDIAN: case ShipType.GUARDIAN:
Health = 200;
MaxSpeed = 200; MaxSpeed = 200;
MainSpeed = 10; MainSpeed = 15;
StrafeSpeed = 3; StrafeSpeed = 7;
RotationSpeed = 1f; RotationSpeed = 1.5f;
MaxHealth = 250; MaxHealth = 200;
Damage = 60;
break; break;
} }
} }