Compare commits

..

2 commits

Author SHA1 Message Date
4deb8e5daf Adding .gitattributes 2023-01-31 08:02:46 +00:00
7bc189a976 „README.md“ ändern 2023-01-31 01:14:00 +00:00
52 changed files with 1466 additions and 6008 deletions

15
.gitignore vendored
View file

@ -1,2 +1,13 @@
# Godot 4+ specific ignores # ---> Godot
.godot/**/* # Godot-specific ignores
.import/
export.cfg
export_presets.cfg
# Imported translations (automatically generated from CSV files)
*.translation
# Mono-specific ignores
.mono/
data_*/

View file

@ -1 +0,0 @@

View file

@ -1,3 +0,0 @@
source_md5="10ed520358153267dfc60bf74dd09ce5"
dest_md5="ef87b1b2e8d74065d19c8269155ef51a"

View file

@ -1,3 +0,0 @@
source_md5="6eb78fe9767b4eba970e5e746fc22670"
dest_md5="5bd7f492aa4701dde1ee2965b1d4897c"

View file

@ -1,3 +0,0 @@
source_md5="f2378d583d8e011487f50b3f6e434c55"
dest_md5="d1875ea8b9cb6586a76da23ca3297804"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ctjc4gqtv3qc6"
path="res://.godot/imported/colony-brown.png-d928b571d768ac6c176f3573fe704ab7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/Tilesets/colony-brown.png"
dest_files=["res://.godot/imported/colony-brown.png-d928b571d768ac6c176f3573fe704ab7.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: 22 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b30swkk8pl8r3"
path="res://.godot/imported/colony-db32.png-15441baa6f893f3d7ac9b44cad974223.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/Tilesets/colony-db32.png"
dest_files=["res://.godot/imported/colony-db32.png-15441baa6f893f3d7ac9b44cad974223.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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: 7.1 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cjkgicvayjjol"
path="res://.godot/imported/colony-gray.png-9a34ec3b88057b1852fb487901160fe8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/Tilesets/colony-gray.png"
dest_files=["res://.godot/imported/colony-gray.png-9a34ec3b88057b1852fb487901160fe8.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: 7.4 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://chbqdp7mae1vu"
path="res://.godot/imported/colony-green.png-7ee3c69f1f46aa9cb608adfe2dc4035e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/Tilesets/colony-green.png"
dest_files=["res://.godot/imported/colony-green.png-7ee3c69f1f46aa9cb608adfe2dc4035e.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: 7.3 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dpqdlxd60d8be"
path="res://.godot/imported/colony-red.png-1c62c66c6ffbb95f273cd5ad854bf691.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/Tilesets/colony-red.png"
dest_files=["res://.godot/imported/colony-red.png-1c62c66c6ffbb95f273cd5ad854bf691.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: 139 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dx5k5qa1pwbfl"
path="res://.godot/imported/basic_enemy.png-86528a00f666ed79fdb26797653efdd4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/basic_enemy.png"
dest_files=["res://.godot/imported/basic_enemy.png-86528a00f666ed79fdb26797653efdd4.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: 195 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dp4tdg3fxe5bf"
path="res://.godot/imported/color_cube.png-4881adb426dcdbd1db4cca9d44eddf4a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/color_cube.png"
dest_files=["res://.godot/imported/color_cube.png-4881adb426dcdbd1db4cca9d44eddf4a.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

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cua6xdncubtid"
path="res://.godot/imported/ColorPallet.png-d411989842053c34062059f3968fb7f0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Guidelines/ColorPallet.png"
dest_files=["res://.godot/imported/ColorPallet.png-d411989842053c34062059f3968fb7f0.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,399 +0,0 @@
[gd_resource type="Resource" load_steps=67 format=2]
[ext_resource path="res://src/Palette/PaletteColor.gd" type="Script" id=1]
[ext_resource path="res://src/Palette/Palette.gd" type="Script" id=2]
[sub_resource type="Resource" id=1]
script = ExtResource( 1 )
color = Color( 0.901961, 0.360784, 0.4, 1 )
index = 0
[sub_resource type="Resource" id=2]
script = ExtResource( 1 )
color = Color( 0.901961, 0.592157, 0.360784, 1 )
index = 1
[sub_resource type="Resource" id=3]
script = ExtResource( 1 )
color = Color( 0.894118, 0.901961, 0.360784, 1 )
index = 2
[sub_resource type="Resource" id=4]
script = ExtResource( 1 )
color = Color( 0.360784, 0.901961, 0.360784, 1 )
index = 3
[sub_resource type="Resource" id=5]
script = ExtResource( 1 )
color = Color( 0.360784, 0.901961, 0.733333, 1 )
index = 4
[sub_resource type="Resource" id=6]
script = ExtResource( 1 )
color = Color( 0.360784, 0.815686, 0.901961, 1 )
index = 5
[sub_resource type="Resource" id=7]
script = ExtResource( 1 )
color = Color( 0.360784, 0.423529, 0.901961, 1 )
index = 6
[sub_resource type="Resource" id=8]
script = ExtResource( 1 )
color = Color( 0.545098, 0.360784, 0.901961, 1 )
index = 7
[sub_resource type="Resource" id=9]
script = ExtResource( 1 )
color = Color( 0.74902, 0.298039, 0.329412, 1 )
index = 8
[sub_resource type="Resource" id=10]
script = ExtResource( 1 )
color = Color( 0.74902, 0.490196, 0.298039, 1 )
index = 9
[sub_resource type="Resource" id=11]
script = ExtResource( 1 )
color = Color( 0.741176, 0.74902, 0.298039, 1 )
index = 10
[sub_resource type="Resource" id=12]
script = ExtResource( 1 )
color = Color( 0.298039, 0.74902, 0.298039, 1 )
index = 11
[sub_resource type="Resource" id=13]
script = ExtResource( 1 )
color = Color( 0.298039, 0.74902, 0.611765, 1 )
index = 12
[sub_resource type="Resource" id=14]
script = ExtResource( 1 )
color = Color( 0.298039, 0.682353, 0.74902, 1 )
index = 13
[sub_resource type="Resource" id=15]
script = ExtResource( 1 )
color = Color( 0.298039, 0.352941, 0.74902, 1 )
index = 14
[sub_resource type="Resource" id=16]
script = ExtResource( 1 )
color = Color( 0.458824, 0.298039, 0.74902, 1 )
index = 15
[sub_resource type="Resource" id=17]
script = ExtResource( 1 )
color = Color( 0.501961, 0.2, 0.223529, 1 )
index = 16
[sub_resource type="Resource" id=18]
script = ExtResource( 1 )
color = Color( 0.501961, 0.32549, 0.2, 1 )
index = 17
[sub_resource type="Resource" id=19]
script = ExtResource( 1 )
color = Color( 0.498039, 0.501961, 0.2, 1 )
index = 18
[sub_resource type="Resource" id=20]
script = ExtResource( 1 )
color = Color( 0.2, 0.501961, 0.2, 1 )
index = 19
[sub_resource type="Resource" id=21]
script = ExtResource( 1 )
color = Color( 0.2, 0.501961, 0.411765, 1 )
index = 20
[sub_resource type="Resource" id=22]
script = ExtResource( 1 )
color = Color( 0.2, 0.45098, 0.501961, 1 )
index = 21
[sub_resource type="Resource" id=23]
script = ExtResource( 1 )
color = Color( 0.2, 0.235294, 0.501961, 1 )
index = 22
[sub_resource type="Resource" id=24]
script = ExtResource( 1 )
color = Color( 0.305882, 0.2, 0.501961, 1 )
index = 23
[sub_resource type="Resource" id=25]
script = ExtResource( 1 )
color = Color( 0.4, 0.160784, 0.180392, 1 )
index = 24
[sub_resource type="Resource" id=26]
script = ExtResource( 1 )
color = Color( 0.4, 0.262745, 0.160784, 1 )
index = 25
[sub_resource type="Resource" id=27]
script = ExtResource( 1 )
color = Color( 0.396078, 0.4, 0.160784, 1 )
index = 26
[sub_resource type="Resource" id=28]
script = ExtResource( 1 )
color = Color( 0.160784, 0.4, 0.160784, 1 )
index = 27
[sub_resource type="Resource" id=29]
script = ExtResource( 1 )
color = Color( 0.160784, 0.4, 0.32549, 1 )
index = 28
[sub_resource type="Resource" id=30]
script = ExtResource( 1 )
color = Color( 0.160784, 0.364706, 0.4, 1 )
index = 29
[sub_resource type="Resource" id=31]
script = ExtResource( 1 )
color = Color( 0.160784, 0.188235, 0.4, 1 )
index = 30
[sub_resource type="Resource" id=32]
script = ExtResource( 1 )
color = Color( 0.243137, 0.160784, 0.4, 1 )
index = 31
[sub_resource type="Resource" id=33]
script = ExtResource( 1 )
color = Color( 0.278431, 0.113725, 0.12549, 1 )
index = 32
[sub_resource type="Resource" id=34]
script = ExtResource( 1 )
color = Color( 0.278431, 0.184314, 0.113725, 1 )
index = 33
[sub_resource type="Resource" id=35]
script = ExtResource( 1 )
color = Color( 0.27451, 0.278431, 0.113725, 1 )
index = 34
[sub_resource type="Resource" id=36]
script = ExtResource( 1 )
color = Color( 0.113725, 0.278431, 0.113725, 1 )
index = 35
[sub_resource type="Resource" id=37]
script = ExtResource( 1 )
color = Color( 0.113725, 0.278431, 0.231373, 1 )
index = 36
[sub_resource type="Resource" id=38]
script = ExtResource( 1 )
color = Color( 0.113725, 0.254902, 0.278431, 1 )
index = 37
[sub_resource type="Resource" id=39]
script = ExtResource( 1 )
color = Color( 0.113725, 0.129412, 0.278431, 1 )
index = 38
[sub_resource type="Resource" id=40]
script = ExtResource( 1 )
color = Color( 0.168627, 0.113725, 0.278431, 1 )
index = 39
[sub_resource type="Resource" id=41]
script = ExtResource( 1 )
color = Color( 0.2, 0.0823529, 0.0901961, 1 )
index = 40
[sub_resource type="Resource" id=42]
script = ExtResource( 1 )
color = Color( 0.2, 0.129412, 0.0823529, 1 )
index = 41
[sub_resource type="Resource" id=43]
script = ExtResource( 1 )
color = Color( 0.2, 0.2, 0.0823529, 1 )
index = 42
[sub_resource type="Resource" id=44]
script = ExtResource( 1 )
color = Color( 0.0823529, 0.2, 0.0823529, 1 )
index = 43
[sub_resource type="Resource" id=45]
script = ExtResource( 1 )
color = Color( 0.0823529, 0.2, 0.164706, 1 )
index = 44
[sub_resource type="Resource" id=46]
script = ExtResource( 1 )
color = Color( 0.0823529, 0.184314, 0.2, 1 )
index = 45
[sub_resource type="Resource" id=47]
script = ExtResource( 1 )
color = Color( 0.0823529, 0.0941176, 0.2, 1 )
index = 46
[sub_resource type="Resource" id=48]
script = ExtResource( 1 )
color = Color( 0.121569, 0.0823529, 0.2, 1 )
index = 47
[sub_resource type="Resource" id=49]
script = ExtResource( 1 )
color = Color( 0.14902, 0.0627451, 0.0705882, 1 )
index = 48
[sub_resource type="Resource" id=50]
script = ExtResource( 1 )
color = Color( 0.14902, 0.0980392, 0.0627451, 1 )
index = 49
[sub_resource type="Resource" id=51]
script = ExtResource( 1 )
color = Color( 0.14902, 0.14902, 0.0627451, 1 )
index = 50
[sub_resource type="Resource" id=52]
script = ExtResource( 1 )
color = Color( 0.0627451, 0.14902, 0.0627451, 1 )
index = 51
[sub_resource type="Resource" id=53]
script = ExtResource( 1 )
color = Color( 0.0627451, 0.14902, 0.121569, 1 )
index = 52
[sub_resource type="Resource" id=54]
script = ExtResource( 1 )
color = Color( 0.0627451, 0.137255, 0.14902, 1 )
index = 53
[sub_resource type="Resource" id=55]
script = ExtResource( 1 )
color = Color( 0.0627451, 0.0705882, 0.14902, 1 )
index = 54
[sub_resource type="Resource" id=56]
script = ExtResource( 1 )
color = Color( 0.0862745, 0.0627451, 0.14902, 1 )
index = 55
[sub_resource type="Resource" id=57]
script = ExtResource( 1 )
color = Color( 0.901961, 0.901961, 0.901961, 1 )
index = 56
[sub_resource type="Resource" id=58]
script = ExtResource( 1 )
color = Color( 0.74902, 0.74902, 0.74902, 1 )
index = 57
[sub_resource type="Resource" id=59]
script = ExtResource( 1 )
color = Color( 0.501961, 0.501961, 0.501961, 1 )
index = 58
[sub_resource type="Resource" id=60]
script = ExtResource( 1 )
color = Color( 0.4, 0.4, 0.4, 1 )
index = 59
[sub_resource type="Resource" id=61]
script = ExtResource( 1 )
color = Color( 0.278431, 0.278431, 0.278431, 1 )
index = 60
[sub_resource type="Resource" id=62]
script = ExtResource( 1 )
color = Color( 0.2, 0.2, 0.2, 1 )
index = 61
[sub_resource type="Resource" id=63]
script = ExtResource( 1 )
color = Color( 0.14902, 0.14902, 0.14902, 1 )
index = 62
[sub_resource type="Resource" id=64]
script = ExtResource( 1 )
color = Color( 0.101961, 0.101961, 0.101961, 1 )
index = 63
[resource]
resource_name = "ColorPallet"
script = ExtResource( 2 )
name = "Color Pallet"
comment = ""
width = 8
height = 8
colors = {
0: SubResource( 1 ),
1: SubResource( 2 ),
2: SubResource( 3 ),
3: SubResource( 4 ),
4: SubResource( 5 ),
5: SubResource( 6 ),
6: SubResource( 7 ),
7: SubResource( 8 ),
8: SubResource( 9 ),
9: SubResource( 10 ),
10: SubResource( 11 ),
11: SubResource( 12 ),
12: SubResource( 13 ),
13: SubResource( 14 ),
14: SubResource( 15 ),
15: SubResource( 16 ),
16: SubResource( 17 ),
17: SubResource( 18 ),
18: SubResource( 19 ),
19: SubResource( 20 ),
20: SubResource( 21 ),
21: SubResource( 22 ),
22: SubResource( 23 ),
23: SubResource( 24 ),
24: SubResource( 25 ),
25: SubResource( 26 ),
26: SubResource( 27 ),
27: SubResource( 28 ),
28: SubResource( 29 ),
29: SubResource( 30 ),
30: SubResource( 31 ),
31: SubResource( 32 ),
32: SubResource( 33 ),
33: SubResource( 34 ),
34: SubResource( 35 ),
35: SubResource( 36 ),
36: SubResource( 37 ),
37: SubResource( 38 ),
38: SubResource( 39 ),
39: SubResource( 40 ),
40: SubResource( 41 ),
41: SubResource( 42 ),
42: SubResource( 43 ),
43: SubResource( 44 ),
44: SubResource( 45 ),
45: SubResource( 46 ),
46: SubResource( 47 ),
47: SubResource( 48 ),
48: SubResource( 49 ),
49: SubResource( 50 ),
50: SubResource( 51 ),
51: SubResource( 52 ),
52: SubResource( 53 ),
53: SubResource( 54 ),
54: SubResource( 55 ),
55: SubResource( 56 ),
56: SubResource( 57 ),
57: SubResource( 58 ),
58: SubResource( 59 ),
59: SubResource( 60 ),
60: SubResource( 61 ),
61: SubResource( 62 ),
62: SubResource( 63 ),
63: SubResource( 64 )
}
colors_max = 64

View file

@ -1,2 +0,0 @@
- Base Sprite Size is 16x16
- Small Sprite Size is 8x8

View file

@ -1,25 +1,12 @@
# 2DHackAndSlay # 2DHackAndSlay
## Branches ## Branches
- [stable](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/stable) - This is the Most stable branch and only will get PRs from [nightly](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/nightly) - [stable](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/stable) - This is the Most stable branch and only will get PRs from [nightly](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/nightly)
- [nightly](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/nightly) - This Branch will only get PRs from [dev-base](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/dev-base)its meant for testing - [nightly](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/nightly) - This Branch will only get PRs from [dev-base](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/dev-base)its meant for testing
- [dev-base](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/dev-base) - On This branch the Diffrent dev branches will be merged and code may be written to combine everything. when this branch is at a somewhat stable branch it gets a PR to [nightly](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/nightly) - [dev-base](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/dev-base) - On This branch the Diffrent dev branches will be merged and code may be written to combine everything. when this branch is at a somewhat stable branch it gets a PR to [nightly](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/nightly)
- dev-* - Dev branches with their respective goal which will be merged into dev-base - dev-* - Dev branches with their respective goal which will be merged into dev-base
## Code Linting Rules
### Use Tabs
Tabs are just cooler
### Use Sign-Form instead of Text-Form
#### Why
There are a lot of Operators in godot, and most are based around signs, so for consistency we stay at the Sign-Forms
#### Boolean operators
- `&&` instead of `and`
- `||` instead of `or`
- `!` instead of `not`
## Resources used: ## Resources used:
### Game Art ### Game Art

File diff suppressed because one or more lines are too long

View file

@ -1,132 +0,0 @@
extends RigidBody2D
@export_group("Movement Properties")
@export var speed := 100.0
@export var turn_speed := 25.0
@export_group("Vision Properties")
@export var ray : RayCast2D
@export_flags_2d_physics var player_collision_layer := 2
@export var max_view_distance := 120.0
@export_range(0.0, 360.0) var angle_cone_of_vision := 120.0
@export_range(0, 72) var sweeping_steps := 34.0
@export var debug_vision := false
@export_group("Behaviour Properties")
@export var follow_keep_distance := 30.0
enum STATES {
IDLE,
TARGETING
}
var state : STATES
var target_positons : Array
var target_distance : float
func _ready():
# Set Raycast into view Direction
ray.target_position = Vector2(max_view_distance, 0)
pass
func swipe_view() -> Array:
# Set Raycast to starting position
ray.rotation_degrees = -angle_cone_of_vision / 2
# Create Array to Store Angles of Hits
var hit_angles : Array
# Clear Player Positions Array
target_positons.clear()
# Reset Targets distance to Infinity
target_distance = INF
for step in sweeping_steps + 1:
# Check Ray
ray.force_raycast_update()
if ray.is_colliding():
# Get Collider
var collider = ray.get_collider()
var collider_class = collider.get_class()
var collision_layer : int
# Get Collision Layer
if collider_class == "TileMap":
collider = collider as TileMap
collision_layer = collider.tile_set.get_physics_layer_collision_layer(0)
else:
collision_layer = collider.get_collision_layer()
# Break if No relevant Collision
if collision_layer & player_collision_layer > 0:
# Checking Collision Layer
hit_angles.append(ray.rotation_degrees)
target_positons.append(to_local(ray.get_collision_point()))
# Check distance
target_distance = min(target_distance, ray.get_collision_point().distance_to(self.global_position))
# Rotate Ray
ray.rotation_degrees += angle_cone_of_vision / sweeping_steps
return hit_angles
func look_at_player(delta : float) -> float:
# Get All Angles at which the Player can be seen
var hit_angles = swipe_view()
# If The Player cant be seen, return and do nothing
if hit_angles.size() <= 0:
state = STATES.IDLE
return 0
state = STATES.TARGETING
# Calculate Average Angle Of Player
var average_angle : float
for angle in hit_angles:
average_angle += angle
average_angle /= hit_angles.size()
# Rotate towards Player, but limit it by rotation speed
self.rotation_degrees += clampf(average_angle, -2 * PI * delta * turn_speed, 2 * PI * delta * turn_speed)
return average_angle
func follow_player(angle : float, delta : float):
if(target_distance > follow_keep_distance):
self.apply_central_force(Vector2.RIGHT.rotated(self.rotation).rotated(deg_to_rad(angle)) * speed * delta * 60)
pass
func _physics_process(delta: float):
var angle := look_at_player(delta)
match state:
STATES.TARGETING:
follow_player(angle, delta)
STATES.IDLE:
# Do Idle Stuff
print("Dam, Nice a pause, time for a Coffee")
pass
func _process(delta: float):
if debug_vision:
queue_redraw()
pass
func _draw():
# Draw a Debug Arc in case that Debug Vision is enabled
if debug_vision:
# Draw All Ray Positions
var angle = -angle_cone_of_vision / 2
for step in sweeping_steps + 1:
self.draw_line(Vector2(), Vector2(max_view_distance,0).rotated(deg_to_rad(angle)), Color.DARK_RED, 0.5, false)
angle += angle_cone_of_vision / sweeping_steps
# Draw Ray Arc
self.draw_arc(Vector2(), max_view_distance, deg_to_rad(-angle_cone_of_vision / 2), deg_to_rad(angle_cone_of_vision / 2), sweeping_steps + 1, Color.RED, 0.5, false)
# Draw A Circle Around the Player if hes seen
for pos in target_positons:
self.draw_circle(pos, 1, Color.RED)
pass

View file

@ -1,9 +0,0 @@
extends Node
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

View file

@ -1,24 +0,0 @@
extends CharacterBody2D
@export var speed = 100
@export_range(0, 1) var damping_factor := 0.6
func get_move_vector():
var input_direction = Input.get_vector("move_left", "move_right", "move_up", "move_down").normalized()
return input_direction
func move_player(delta : float):
if get_move_vector() == Vector2.ZERO:
# Damp Players Velocity if no Input
self.velocity = self.velocity * (1 - min(1, damping_factor * 60 * delta))
else:
# Set Players Velocity to the Input Direction in the Players Speed
self.velocity = get_move_vector() * speed * delta * 60
# Update The Players Physics Calculations
self.move_and_slide()
pass
func _physics_process(delta : float):
move_player(delta)
pass

Binary file not shown.

View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016-2022 The Godot Engine community
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
[general]
load_once=true
symbol_prefix="godot_"
reloadable=false
singleton=false
[entry]
OSX.64="res://addons/godot-git-plugin/osx/libgitapi.dylib"
Windows.64="res://addons/godot-git-plugin/win64/libgitapi.dll"
X11.64="res://addons/godot-git-plugin/linux/libgitapi.so"
[dependencies]
OSX.64=[ ]
Windows.64=[ ]
X11.64=[ ]

View file

@ -0,0 +1,9 @@
[gd_resource type="NativeScript" load_steps=2 format=2]
[ext_resource path="res://addons/godot-git-plugin/git_api.gdnlib" type="GDNativeLibrary" id=1]
[resource]
resource_name = "GitAPI"
class_name = "GitAPI"
library = ExtResource( 1 )
script_class_name = "GitAPI"

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
[plugin]
name="Godot Git Plugin"
description="This plugin lets you interact with Git without leaving the Godot editor. More information can be found at https://github.com/godotengine/godot-git-plugin/wiki"
author="ChronicallySerious"
version="v2.1.0"
script="git_api.gdns"

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,6 +1,6 @@
[gd_resource type="Environment" load_steps=2 format=2] [gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="Sky" id=1] [sub_resource type="ProceduralSky" id=1]
[resource] [resource]
background_mode = 2 background_mode = 2

View file

@ -1,106 +0,0 @@
[preset.0]
name="Linux/X11"
platform="Linux/X11"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../../Downloads/2d Hack And Slay.x86_64"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_encryption_key=""
[preset.0.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_script=1
binary_format/embed_pck=false
texture_format/bptc=true
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""
[preset.1]
name="Windows Desktop"
platform="Windows Desktop"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_encryption_key=""
[preset.1.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_script=1
binary_format/embed_pck=false
texture_format/bptc=true
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/identity_type=0
codesign/identity=""
codesign/password=""
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon=""
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

35
icon.png.import Normal file
View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View file

@ -6,80 +6,36 @@
; [section] ; section goes between [] ; [section] ; section goes between []
; param=value ; assign values to parameters ; param=value ; assign values to parameters
config_version=5 config_version=4
_global_script_classes=[ {
"base": "EditorVCSInterface",
"class": "GitAPI",
"language": "NativeScript",
"path": "res://addons/godot-git-plugin/git_api.gdns"
} ]
_global_script_class_icons={
"GitAPI": ""
}
[application] [application]
config/name="2d Hack And Slay" config/name="2d Hack And Slay"
run/main_scene="res://Scenes/Test Scene.tscn" config/icon="res://icon.png"
config/features=PackedStringArray("4.0")
[autoload]
GameManager="*res://Scripts/GameManager.gd"
[display]
window/stretch/mode="viewport"
window/stretch/aspect="expand"
window/stretch/scale=0.7
[editor] [editor]
version_control_autoload_on_startup=true version_control_autoload_on_startup=true
version_control_plugin_name="GitAPI" version_control_plugin_name="GitAPI"
[editor_plugins]
enabled=PackedStringArray()
[gui] [gui]
common/drop_mouse_on_gui_input_disabled=true common/drop_mouse_on_gui_input_disabled=true
[input]
move_up={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
move_down={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
move_left={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
move_right={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
do_shake={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null)
]
}
[layer_names]
2d_physics/layer_1="Map"
2d_physics/layer_2="Player"
2d_physics/layer_3="Enemys"
[physics] [physics]
common/enable_pause_aware_picking=true common/enable_pause_aware_picking=true
[rendering] [rendering]
textures/canvas_textures/default_texture_filter=0
environment/default_environment="res://default_env.tres" environment/default_environment="res://default_env.tres"

0
scripts/.gitkeep Normal file
View file