Initial commit

This commit is contained in:
2020-10-01 19:53:08 +02:00
parent dea479a784
commit ace4593b46
82 changed files with 2570 additions and 0 deletions

17
.gitattributes vendored Normal file
View File

@@ -0,0 +1,17 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.cpp text
*.c text
*.h text
*.gd text
*.cs text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary

7
.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
# Import cache
.import/
# Binaries
bin/
build/
lib/

BIN
Characters/Kek/Idle_01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Idle_01.png-af98f07b125195850281aae5917a68dc.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Kek/Idle_01.png"
dest_files=[ "res://.import/Idle_01.png-af98f07b125195850281aae5917a68dc.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
Characters/Kek/Idle_01.xcf Normal file

Binary file not shown.

BIN
Characters/Kek/Idle_02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Idle_02.png-d0e53a50db12af9436fbb7806f10fa51.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Kek/Idle_02.png"
dest_files=[ "res://.import/Idle_02.png-d0e53a50db12af9436fbb7806f10fa51.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=false
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
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

BIN
Characters/Kek/Idle_03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Idle_03.png-a4814ee812b51479b3fb7150c2bc8ab0.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Kek/Idle_03.png"
dest_files=[ "res://.import/Idle_03.png-a4814ee812b51479b3fb7150c2bc8ab0.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

22
Characters/Kek/Kek.tscn Normal file
View File

@@ -0,0 +1,22 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Characters/Kek/Idle_01.png" type="Texture" id=1]
[ext_resource path="res://Characters/Kek/Idle_02.png" type="Texture" id=2]
[ext_resource path="res://Characters/Kek/Idle_03.png" type="Texture" id=3]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 1 ), ExtResource( 2 ), ExtResource( 3 ) ],
"loop": true,
"name": "idle",
"speed": 2.0
} ]
[node name="KinematicBody2D" type="KinematicBody2D"]
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 1 )
animation = "idle"
playing = true

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_01.png-22b341c31e1acc050309d331123c9ad7.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Aimo/Run_01.png"
dest_files=[ "res://.import/Run_01.png-22b341c31e1acc050309d331123c9ad7.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_02.png-c1da789cc8533b88c225beb556589805.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Aimo/Run_02.png"
dest_files=[ "res://.import/Run_02.png-c1da789cc8533b88c225beb556589805.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_03.png-c615c086917a91d2f26a550ffc8be947.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Aimo/Run_03.png"
dest_files=[ "res://.import/Run_03.png-c615c086917a91d2f26a550ffc8be947.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_04.png-927ff860d3bbb32392b12b7860ee5012.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Aimo/Run_04.png"
dest_files=[ "res://.import/Run_04.png-927ff860d3bbb32392b12b7860ee5012.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_05.png-aaf97dcbb273cb54d79bdba861970ac8.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Aimo/Run_05.png"
dest_files=[ "res://.import/Run_05.png-aaf97dcbb273cb54d79bdba861970ac8.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_06.png-28a77d88dd0ba0c1a28387c110b92c2f.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Aimo/Run_06.png"
dest_files=[ "res://.import/Run_06.png-28a77d88dd0ba0c1a28387c110b92c2f.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Idle_01.png-697718a653e9730ffa60e19cf3c510a4.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Idle_01.png"
dest_files=[ "res://.import/Idle_01.png-697718a653e9730ffa60e19cf3c510a4.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Idle_02.png-8077daaf15e82f7c9a9e5afd2d2872b2.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Idle_02.png"
dest_files=[ "res://.import/Idle_02.png-8077daaf15e82f7c9a9e5afd2d2872b2.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Idle_03.png-affb442aa95274285dab4251345184e4.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Idle_03.png"
dest_files=[ "res://.import/Idle_03.png-affb442aa95274285dab4251345184e4.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Idle_04.png-462140885ad5cccfcef4c070c2b6aa68.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Idle_04.png"
dest_files=[ "res://.import/Idle_04.png-462140885ad5cccfcef4c070c2b6aa68.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Jump_01.png-e25a7966d8c4a2c2fb2593fa07510ff6.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Jump_01.png"
dest_files=[ "res://.import/Jump_01.png-e25a7966d8c4a2c2fb2593fa07510ff6.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_01.png-ee592032d720a597fdd2f19f54874e1d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Run_01.png"
dest_files=[ "res://.import/Run_01.png-ee592032d720a597fdd2f19f54874e1d.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=false
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
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_02.png-16f845953710f5859b4ce9f04d6606a5.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Run_02.png"
dest_files=[ "res://.import/Run_02.png-16f845953710f5859b4ce9f04d6606a5.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_03.png-a983debcb92f828ef4989f6ea2cad9ec.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Run_03.png"
dest_files=[ "res://.import/Run_03.png-a983debcb92f828ef4989f6ea2cad9ec.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_04.png-4aa78c5c5d86fbabf4f9fff6b0eb6385.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Run_04.png"
dest_files=[ "res://.import/Run_04.png-4aa78c5c5d86fbabf4f9fff6b0eb6385.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_05.png-83aa92aa8c2ddefb873fb1db2ebab99c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Run_05.png"
dest_files=[ "res://.import/Run_05.png-83aa92aa8c2ddefb873fb1db2ebab99c.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Run_06.png-d2f9d398d1ced6442ed7699b5f4d7f54.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Characters/Player/Bit/Run_06.png"
dest_files=[ "res://.import/Run_06.png-d2f9d398d1ced6442ed7699b5f4d7f54.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -0,0 +1,110 @@
[gd_scene load_steps=19 format=2]
[ext_resource path="res://Characters/Player/player.gd" type="Script" id=1]
[ext_resource path="res://Characters/Player/Bit/Idle_01.png" type="Texture" id=2]
[ext_resource path="res://Characters/Player/Bit/Idle_02.png" type="Texture" id=3]
[ext_resource path="res://Characters/Player/Bit/Idle_03.png" type="Texture" id=4]
[ext_resource path="res://Characters/Player/Bit/Idle_04.png" type="Texture" id=5]
[ext_resource path="res://Characters/Player/Bit/Jump_01.png" type="Texture" id=6]
[ext_resource path="res://Characters/Player/Bit/Run_01.png" type="Texture" id=7]
[ext_resource path="res://Characters/Player/Bit/Run_02.png" type="Texture" id=8]
[ext_resource path="res://Characters/Player/Bit/Run_03.png" type="Texture" id=9]
[ext_resource path="res://Characters/Player/Bit/Run_04.png" type="Texture" id=10]
[ext_resource path="res://Characters/Player/Bit/Run_05.png" type="Texture" id=11]
[ext_resource path="res://Characters/Player/Bit/Run_06.png" type="Texture" id=12]
[ext_resource path="res://Lightmaps/PlayerLight.png" type="Texture" id=13]
[ext_resource path="res://Lightmaps/CompleteWhite.png" type="Texture" id=14]
[sub_resource type="CapsuleShape2D" id=1]
radius = 11.2128
height = 0.0
[sub_resource type="SpriteFrames" id=2]
animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "idle",
"speed": 3.0
}, {
"frames": [ ExtResource( 6 ) ],
"loop": true,
"name": "jump",
"speed": 0.0
}, {
"frames": [ ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ), ExtResource( 12 ) ],
"loop": true,
"name": "run",
"speed": 10.0
} ]
[sub_resource type="CircleShape2D" id=3]
radius = 121.239
[sub_resource type="CircleShape2D" id=4]
radius = 139.247
[node name="Player" type="KinematicBody2D"]
position = Vector2( 0.377872, 0.100608 )
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
BASE_CAMERA_ZOOM = 0.4
VIEW_SMOOTH_FACTOR = 0.1
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -1.38898, 7.56054 )
rotation = 1.5708
scale = Vector2( 0.574, 0.604 )
shape = SubResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( -1.21067, 0.601201 )
frames = SubResource( 2 )
animation = "idle"
frame = 1
playing = true
[node name="Label" type="Label" parent="."]
margin_left = -61.0
margin_top = -35.0
margin_right = 64.0
margin_bottom = -21.0
text = "SIXTEENCHARACTER"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Light2D" type="Light2D" parent="."]
position = Vector2( -0.495953, 13.2623 )
z_index = 2
texture = ExtResource( 13 )
texture_scale = 0.95
energy = 0.7
shadow_enabled = true
shadow_filter = 4
shadow_filter_smooth = 4.9
[node name="Darken" type="Light2D" parent="."]
texture = ExtResource( 14 )
texture_scale = 7.7
energy = 0.7
mode = 1
shadow_filter = 2
[node name="View" type="Area2D" parent="."]
modulate = Color( 0.192157, 0.239216, 0.713726, 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="View"]
shape = SubResource( 3 )
disabled = true
[node name="Receive" type="Area2D" parent="."]
modulate = Color( 0.658824, 0.984314, 0.227451, 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Receive"]
modulate = Color( 0.439216, 0.427451, 0.427451, 1 )
shape = SubResource( 4 )
[connection signal="body_entered" from="View" to="." method="_on_Area2D_body_entered"]
[connection signal="body_exited" from="View" to="." method="_on_Area2D_body_exited"]

158
Characters/Player/player.gd Normal file
View File

@@ -0,0 +1,158 @@
extends KinematicBody2D
# Constains for movement
const MOVE_SPEED = 3.0
const RUN_MULTIPLIER = 2
const GRAVITY = 10
const JUMP_POWER = -180
const FLOOR = Vector2(0, -1)
export var BASE_CAMERA_ZOOM: float = 0.7
export var VIEW_SMOOTH_FACTOR: float = 0.5
enum MoveDirection { UP, DOWN, LEFT, RIGHT, NONE }
# Networking
slave var slave_position = Vector2()
slave var slave_movement = MoveDirection.NONE
slave var slave_transparency = 0
slave var slave_gone = false
var velocity = Vector2()
var isRunning = false
var look_direction = Vector2(1, 0)
var minimap = false
var zoom_interpolation = 0
# Get camara
onready var camera_focus = $"/root/Node2D/Game/Focus" as Position2D
onready var camera = $"/root/Node2D/Game/Focus/Camera" as Camera2D
onready var gui = $"/root/Node2D/GUI" as CanvasLayer
onready var client = $"/root/Node2D/Game/Connection" as Node2D
func _process(delta):
pass
func _physics_process(delta):
# Check if game is visable
if(get_node("../../Game").is_visible() == false):
return
for player in Networking.players:
if player != int(name):
var p = (get_node("/root/Node2D/Game/" + String(player)) as KinematicBody2D)
if p != self:
var distance = p.position.distance_to(position)
var transparency = (distance - ($View/CollisionShape2D as CollisionShape2D).shape.radius + 10) * VIEW_SMOOTH_FACTOR
# Clip values
if transparency > 1:
transparency = 1
if transparency < 0:
transparency = 0
rset_id(player, "slave_transparency", transparency)
modulate.a = 1-slave_transparency
"""
MAP OVERVIEW
"""
# Put focus on player if not in minimap
var start = Vector2(BASE_CAMERA_ZOOM, BASE_CAMERA_ZOOM)
var end = Vector2(1.5, 1.5)
if !minimap:
camera_focus.position = position
if zoom_interpolation <= 1.1:
zoom_interpolation -= 0.05
camera.set_zoom(start.cubic_interpolate(end, start/2, end/2, zoom_interpolation))
# Stop zooming in
if zoom_interpolation <= 0:
camera.smoothing_speed = 6
zoom_interpolation = 0
else:
# Update camera zoom
if zoom_interpolation <= 1:
zoom_interpolation += 0.05
camera.set_zoom(start.cubic_interpolate(end, start/2, end/2, zoom_interpolation))
# View map
if Input.is_action_just_pressed("minimap"):
if !minimap:
minimap = true
camera.smoothing_speed = 2
camera_focus.position = get_node("/root/Node2D").position
else:
minimap = false
"""
MOVEMENT
"""
var direction = MoveDirection.NONE
var RIGHT = Input.is_action_pressed("ui_right")
var LEFT = Input.is_action_pressed("ui_left")
var JUMP = Input.is_action_pressed("ui_up")
var SNEAK = Input.is_action_pressed("ui_down")
var RUN = Input.is_action_pressed("ui_shift")
if get_tree().network_peer != null and is_network_master():
if LEFT:
direction = MoveDirection.LEFT
elif RIGHT:
direction = MoveDirection.RIGHT
elif JUMP:
direction = MoveDirection.UP
elif SNEAK:
direction = MoveDirection.DOWN
"""
for player in Networking.players:
if player != int(name):
var p = Networking.get_player_node(int(player))
if $Receive.overlaps_body(p):
# Send everyone in receive area the current position
rset_unreliable_id(int(player), 'slave_position', position)
rset_id(int(player), 'slave_movement', direction)
else:
# Hide from everyone else
rset_id(int(player), 'slave_movement', MoveDirection.NONE)"""
if Networking.move:
rset_unreliable('slave_position', position)
rset('slave_movement', direction)
_move(direction)
else:
_move(slave_movement)
position = slave_position
if get_tree().network_peer != null and get_tree().is_network_server():
Networking.update_position(int(name), position)
func _move(direction):
match direction:
MoveDirection.NONE:
return
MoveDirection.UP:
move_and_collide(Vector2(0, -MOVE_SPEED))
$AnimatedSprite.play("jump")
MoveDirection.DOWN:
move_and_collide(Vector2(0, MOVE_SPEED))
velocity.x = 0
$AnimatedSprite.play("idle")
MoveDirection.LEFT:
move_and_collide(Vector2(-MOVE_SPEED, 0))
$AnimatedSprite.play("run")
$AnimatedSprite.set_flip_h(true);
look_direction = Vector2(-1, 0)
MoveDirection.RIGHT:
move_and_collide(Vector2(MOVE_SPEED, 0))
look_direction = Vector2(1, 0)
$AnimatedSprite.play("run")
$AnimatedSprite.set_flip_h(false);
if(isRunning):
velocity.x = MOVE_SPEED*RUN_MULTIPLIER
else:
velocity.x = MOVE_SPEED

71
Items/Wifi/Wifi.gd Normal file
View File

@@ -0,0 +1,71 @@
extends Node2D
onready var interact_message = get_node("/root/Node2D/Hints/KeyPress/Interact") as HBoxContainer
onready var task = get_node("Task/UI") as Control
onready var progressbar = get_node("Task/UI/ProgressBar") as ProgressBar
onready var timer = get_node("Timer") as Timer
var rng = RandomNumberGenerator.new()
func _ready():
rng.randomize()
task.visible = false
pass
func _physics_process(delta):
# Handle when player is around task
for player in $Area2D.get_overlapping_bodies():
if player is KinematicBody2D:
# Open task if user presses E
if Input.is_action_just_pressed("interact") and interact_message.visible and $Area2D.overlaps_body(player):
print("Show!")
Networking.move = false
task.visible = !task.visible
var distance = position.distance_to(player.position) * 0.004
# GUI
if distance < 0.11:
interact_message.visible = true
else:
interact_message.visible = false
# Light texture scale
if distance < 0.2:
$Light2D.energy = sqrt(4 * distance + 0.1)
if distance >= 0.1:
$Light2D.texture_scale = distance
func _on_Area2D_body_entered(body):
interact_message.visible = true
func _on_Area2D_body_exited(body):
interact_message.visible = false
func _on_Close_pressed():
timer.stop()
progressbar.value = 0
task.visible = false
Networking.move = true
$Task/UI/Begin.disabled = false
# Change progressbar
func _on_Timer_timeout():
# We finished!
if progressbar.value >= 100:
$Light2D.visible = false
$Area2D/CollisionShape2D.disabled = true
_on_Close_pressed()
timer.wait_time = rng.randf_range(0.1, 0.5)
progressbar.value += rng.randf_range(1, 4.3)
if progressbar.value >= 100:
$Task/UI/Close.visible = false
timer.wait_time = 3
# Download button was pressed
func _on_Begin_pressed():
$Task/UI/Begin.disabled = true
timer.start()

93
Items/Wifi/Wifi.tscn Normal file
View File

@@ -0,0 +1,93 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://Lightmaps/PlayerLight.png" type="Texture" id=1]
[ext_resource path="res://Items/Wifi/Wifi.gd" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 75.0
[node name="Wifi" type="Node2D"]
script = ExtResource( 2 )
[node name="Area2D" type="Area2D" parent="." groups=[
"Wifi",
]]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 1 )
[node name="Light2D" type="Light2D" parent="."]
position = Vector2( -0.561218, 0 )
texture = ExtResource( 1 )
texture_scale = 0.2
color = Color( 0.996078, 0, 0, 1 )
energy = 0.9
[node name="Task" type="CanvasLayer" parent="."]
layer = 4
[node name="UI" type="Control" parent="Task"]
margin_right = 1021.0
margin_bottom = 603.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect" type="ColorRect" parent="Task/UI"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -333.5
margin_top = -154.0
margin_right = 333.5
margin_bottom = 154.0
color = Color( 0.176471, 0.176471, 0.176471, 0.792157 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ProgressBar" type="ProgressBar" parent="Task/UI"]
anchor_left = 0.37904
anchor_top = 0.475954
anchor_right = 0.62096
anchor_bottom = 0.524046
margin_left = -1.0
margin_top = -53.0
margin_right = -1.0
margin_bottom = -53.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Begin" type="Button" parent="Task/UI"]
margin_left = 446.546
margin_top = 284.817
margin_right = 573.546
margin_bottom = 310.817
text = "Download"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Close" type="Button" parent="Task/UI"]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -23.5
margin_top = -221.839
margin_right = 23.5
margin_bottom = -201.839
text = "Close"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Timer" type="Timer" parent="."]
wait_time = 0.228
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_Area2D_body_exited"]
[connection signal="pressed" from="Task/UI/Begin" to="." method="_on_Begin_pressed"]
[connection signal="pressed" from="Task/UI/Close" to="." method="_on_Close_pressed"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]

32
Items/interactables.gd Normal file
View File

@@ -0,0 +1,32 @@
extends TileMap
var timer = false
var animate_forwards = true
func _ready():
# Spawn new light for all tablets
for cell in get_used_cells_by_id(0):
var wifi = load("res://Items/Wifi/Wifi.tscn").instance() as Node2D
var center = Vector2(8, 8) + cell * 16
wifi.position = center
add_child(wifi)
func _process(delta):
if timer:
for cell in get_used_cells_by_id(0):
var tile = get_cell_autotile_coord(cell.x, cell.y)
if int(tile.x + 1) % 3 == 0 and animate_forwards:
animate_forwards = false
if int(tile.x) % 3 == 0 and !animate_forwards:
animate_forwards = true
if animate_forwards:
set_cell(cell.x, cell.y, 0, false, false, false, Vector2(tile.x+1, tile.y))
else:
set_cell(cell.x, cell.y, 0, false, false, false, Vector2(tile.x-1, tile.y))
timer = false
func _on_Timer_timeout():
timer = true

BIN
Lightmaps/CompleteWhite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/CompleteWhite.png-3d3fa20e4e0c0b91e525ccac5769c847.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Lightmaps/CompleteWhite.png"
dest_files=[ "res://.import/CompleteWhite.png-3d3fa20e4e0c0b91e525ccac5769c847.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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
Lightmaps/PlayerLight.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/PlayerLight.png-be1ee7446a6124be22c4483b5ebb894b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Lightmaps/PlayerLight.png"
dest_files=[ "res://.import/PlayerLight.png-be1ee7446a6124be22c4483b5ebb894b.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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

344
Main.tscn Normal file
View File

@@ -0,0 +1,344 @@
[gd_scene load_steps=14 format=2]
[ext_resource path="res://Tilemaps/Office_walls_floors_48x48.png" type="Texture" id=1]
[ext_resource path="res://client.gd" type="Script" id=2]
[ext_resource path="res://Tilemaps/Interactables.png" type="Texture" id=3]
[ext_resource path="res://Tilemaps/Office_interiors_shadowless_48x48.png" type="Texture" id=4]
[ext_resource path="res://Items/interactables.gd" type="Script" id=5]
[sub_resource type="ConvexPolygonShape2D" id=5]
points = PoolVector2Array( 48, 96, 0, 96, 0, 0, 48, 0 )
[sub_resource type="ConvexPolygonShape2D" id=3]
points = PoolVector2Array( 48, 96, 0, 96, 0, 0, 48, 0 )
[sub_resource type="ConvexPolygonShape2D" id=4]
points = PoolVector2Array( 32, 64, 16, 64, 16, 0, 32, 0 )
[sub_resource type="TileSet" id=2]
0/name = "Office_walls_floors_48x48.png 0"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 96, 192, 48, 48 )
0/tile_mode = 0
0/occluder_offset = Vector2( 0, 0 )
0/navigation_offset = Vector2( 0, 0 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape_one_way = false
0/shape_one_way_margin = 0.0
0/shapes = [ ]
0/z_index = 0
1/name = "Wall Type 1"
1/texture = ExtResource( 1 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 96, 48, 48, 96 )
1/tile_mode = 0
1/occluder_offset = Vector2( 0, 0 )
1/navigation_offset = Vector2( 0, 0 )
1/shape_offset = Vector2( 0, 0 )
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
1/shape = SubResource( 5 )
1/shape_one_way = false
1/shape_one_way_margin = 1.0
1/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 5 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
1/z_index = 0
2/name = "Wall Type 2"
2/texture = ExtResource( 1 )
2/tex_offset = Vector2( 0, 0 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 48, 48, 48, 96 )
2/tile_mode = 0
2/occluder_offset = Vector2( 0, 0 )
2/navigation_offset = Vector2( 0, 0 )
2/shape_offset = Vector2( 0, 0 )
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
2/shape = SubResource( 3 )
2/shape_one_way = false
2/shape_one_way_margin = 1.0
2/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 3 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
2/z_index = 0
3/name = "Wall Corner"
3/texture = ExtResource( 1 )
3/tex_offset = Vector2( 0, 0 )
3/modulate = Color( 1, 1, 1, 1 )
3/region = Rect2( 16, 48, 32, 16 )
3/tile_mode = 0
3/occluder_offset = Vector2( 0, 0 )
3/navigation_offset = Vector2( 0, 0 )
3/shape_offset = Vector2( 0, 0 )
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
3/shape_one_way = false
3/shape_one_way_margin = 0.0
3/shapes = [ ]
3/z_index = 0
4/name = "Wall Edge"
4/texture = ExtResource( 1 )
4/tex_offset = Vector2( 0, 0 )
4/modulate = Color( 1, 1, 1, 1 )
4/region = Rect2( 16, 80, 32, 64 )
4/tile_mode = 0
4/occluder_offset = Vector2( 0, 0 )
4/navigation_offset = Vector2( 0, 0 )
4/shape_offset = Vector2( 0, 0 )
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
4/shape = SubResource( 4 )
4/shape_one_way = false
4/shape_one_way_margin = 1.0
4/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 4 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
4/z_index = 0
[sub_resource type="TileSet" id=1]
0/name = "Interactables.png 0"
0/texture = ExtResource( 3 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 0, 0, 48, 16 )
0/tile_mode = 1
0/autotile/bitmask_mode = 0
0/autotile/bitmask_flags = [ ]
0/autotile/icon_coordinate = Vector2( 0, 0 )
0/autotile/tile_size = Vector2( 16, 16 )
0/autotile/spacing = 0
0/autotile/occluder_map = [ ]
0/autotile/navpoly_map = [ ]
0/autotile/priority_map = [ ]
0/autotile/z_index_map = [ ]
0/occluder_offset = Vector2( 0, 0 )
0/navigation_offset = Vector2( 0, 0 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape_one_way = false
0/shape_one_way_margin = 0.0
0/shapes = [ ]
0/z_index = 0
[sub_resource type="OccluderPolygon2D" id=8]
polygon = PoolVector2Array( 30.049, 8.3645, 66.097, 8.3645, 65.9032, 11.2716, 69.0041, 11.4654, 69.1979, 13.9849, 71.7174, 13.9849, 72.105, 41.1179, 69.1979, 40.924, 69.0041, 46.7382, 71.7174, 46.932, 71.9112, 44.2188, 77.9192, 44.4125, 78.113, 47.1259, 81.0201, 47.1259, 81.4077, 67.8632, 78.113, 68.2508, 78.113, 71.7393, 72.105, 71.5455, 71.9112, 76.1968, 69.3917, 76.7783, 69.3917, 80.2668, 56.9881, 80.2668, 56.9881, 82.5925, 60.2828, 82.7863, 60.2828, 85.8871, 62.8022, 86.081, 63.1899, 88.9881, 66.097, 89.1819, 66.097, 94.8023, 57.1819, 94.6085, 57.1819, 92.089, 54.4686, 92.089, 54.081, 89.1819, 51.1739, 89.1819, 50.7863, 86.4686, 44.7783, 86.2748, 44.5844, 89.1819, 42.2588, 89.3757, 42.2588, 92.6704, 39.3517, 92.089, 39.1578, 95.1899, 29.8551, 94.9961, 30.049, 89.3757, 32.9561, 88.9881, 32.7622, 86.4686, 36.0569, 86.081, 36.0569, 83.5615, 38.7702, 82.98, 38.7702, 80.2668, 26.948, 80.073, 26.7542, 77.5535, 24.4285, 77.3597, 23.8471, 71.7393, 18.4205, 71.1578, 18.0329, 68.0569, 15.1258, 68.0569, 14.932, 47.3196, 17.8391, 47.3196, 18.033, 44.4125, 23.8471, 44.0249, 24.041, 47.1258, 26.9481, 46.932, 26.9481, 41.3116, 24.041, 40.924, 24.2347, 13.9849, 26.9481, 14.1787, 26.9481, 11.2716, 30.049, 11.2716 )
[sub_resource type="ConvexPolygonShape2D" id=7]
points = PoolVector2Array( 80, 96, 16, 96, 16, 0, 80, 0 )
[sub_resource type="TileSet" id=6]
0/name = "Office_interiors_shadowless_48x48.png 0"
0/texture = ExtResource( 4 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 384, 352, 96, 96 )
0/tile_mode = 0
0/occluder_offset = Vector2( 0, 0 )
0/occluder = SubResource( 8 )
0/navigation_offset = Vector2( 0, 0 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape = SubResource( 7 )
0/shape_one_way = false
0/shape_one_way_margin = 1.0
0/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 7 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
0/z_index = 0
[node name="Node2D" type="Node2D"]
[node name="GUI" type="CanvasLayer" parent="."]
layer = 2
[node name="Control" type="Control" parent="GUI"]
margin_left = -3.0
margin_right = 1024.0
margin_bottom = 600.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Join" type="Button" parent="GUI/Control"]
margin_left = 448.0
margin_top = 302.3
margin_right = 536.0
margin_bottom = 322.3
text = "Join"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Create" type="Button" parent="GUI/Control"]
margin_left = 448.0
margin_top = 337.361
margin_right = 536.0
margin_bottom = 357.361
text = "Create"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="IP" type="TextEdit" parent="GUI/Control"]
margin_left = 448.0
margin_top = 207.487
margin_right = 540.0
margin_bottom = 228.487
text = "127.0.0.1"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Username" type="TextEdit" parent="GUI/Control"]
margin_left = 448.0
margin_top = 256.962
margin_right = 540.0
margin_bottom = 277.962
text = "Unknown"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LIP" type="Label" parent="GUI/Control"]
margin_left = 448.039
margin_top = 186.754
margin_right = 505.039
margin_bottom = 200.754
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Server IP"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Waiting" type="Label" parent="GUI/Control"]
visible = false
margin_left = 191.0
margin_top = 261.0
margin_right = 448.0
margin_bottom = 275.0
custom_colors/font_color = Color( 0.203922, 0.796078, 0.407843, 1 )
text = "Waiting for players to join ..."
align = 1
[node name="Chat" type="VBoxContainer" parent="GUI/Control"]
margin_left = 17.1571
margin_top = 13.7346
margin_right = 57.1572
margin_bottom = 53.7346
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LUsername" type="Label" parent="GUI/Control"]
margin_left = 448.039
margin_top = 242.962
margin_right = 514.039
margin_bottom = 256.962
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Username"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Hints" type="CanvasLayer" parent="."]
[node name="KeyPress" type="Control" parent="Hints"]
margin_top = 539.0
margin_right = 1026.0
margin_bottom = 600.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Interact" type="HBoxContainer" parent="Hints/KeyPress"]
visible = false
margin_left = 435.515
margin_top = 17.4899
margin_right = 551.515
margin_bottom = 31.4899
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="Hints/KeyPress/Interact"]
margin_right = 35.0
margin_bottom = 14.0
text = "Press"
[node name="Label2" type="Label" parent="Hints/KeyPress/Interact"]
margin_left = 39.0
margin_right = 46.0
margin_bottom = 14.0
custom_colors/font_color = Color( 0.0588235, 0.952941, 0.0509804, 1 )
custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 )
text = "E"
[node name="Label3" type="Label" parent="Hints/KeyPress/Interact"]
margin_left = 50.0
margin_right = 116.0
margin_bottom = 14.0
text = "to interact"
[node name="Game" type="Node2D" parent="."]
[node name="Map" type="TileMap" parent="Game"]
tile_set = SubResource( 2 )
cell_size = Vector2( 48, 48 )
compatibility_mode = true
format = 1
tile_data = PoolIntArray( -262149, 536870914, 0, -262148, 536870914, 0, -262147, 536870914, 0, -262146, 536870914, 0, -262145, 536870914, 0, -327680, 536870914, 0, -327679, 536870914, 0, -327678, 536870914, 0, -327677, 536870914, 0, -327676, 536870914, 0, -131077, 536870912, 0, -131076, 536870912, 0, -131075, 536870912, 0, -131074, 536870912, 0, -131073, 536870912, 0, -196608, 536870912, 0, -196607, 536870912, 0, -196606, 536870912, 0, -196605, 536870912, 0, -196604, 536870912, 0, -65541, 536870912, 0, -65540, 536870912, 0, -65539, 536870912, 0, -65538, 536870912, 0, -65537, 536870912, 0, -131072, 536870912, 0, -131071, 536870912, 0, -131070, 536870912, 0, -131069, 536870912, 0, -131068, 536870912, 0, -5, 536870912, 0, -4, 536870912, 0, -3, 536870912, 0, -2, 536870912, 0, -1, 536870912, 0, -65536, 536870912, 0, -65535, 536870912, 0, -65534, 536870912, 0, -65533, 536870912, 0, -65532, 536870912, 0, 65531, 536870912, 0, 65532, 536870912, 0, 65533, 536870912, 0, 65534, 536870912, 0, 65535, 536870912, 0, 0, 536870912, 0, 1, 536870912, 0, 2, 536870912, 0, 3, 536870912, 0, 4, 536870912, 0, 131067, 536870912, 0, 131068, 536870912, 0, 131069, 536870912, 0, 131070, 536870912, 0, 131071, 536870912, 0, 65536, 536870912, 0, 65537, 536870912, 0, 65538, 536870912, 0, 65539, 536870912, 0, 65540, 536870912, 0, 196603, 536870912, 0, 196604, 536870912, 0, 196605, 536870912, 0, 196606, 536870912, 0, 196607, 536870912, 0, 131072, 536870912, 0, 131073, 536870912, 0, 131074, 536870912, 0, 131075, 536870912, 0, 131076, 536870912, 0, 262139, 536870912, 0, 262140, 536870912, 0, 262141, 536870912, 0, 262142, 536870912, 0, 262143, 536870912, 0, 196608, 536870912, 0, 196609, 536870912, 0, 196610, 536870912, 0, 196611, 536870912, 0, 196612, 536870912, 0 )
[node name="Interactables" type="TileMap" parent="Game"]
tile_set = SubResource( 1 )
cell_size = Vector2( 16, 16 )
format = 1
tile_data = PoolIntArray( 131080, 0, 0, 524289, 0, 0, 851978, 0, 0 )
script = ExtResource( 5 )
[node name="Timer" type="Timer" parent="Game/Interactables"]
autostart = true
[node name="Interior" type="TileMap" parent="Game"]
tile_set = SubResource( 6 )
cell_size = Vector2( 48, 48 )
format = 1
tile_data = PoolIntArray( -1, 536870912, 0 )
[node name="Connection" type="Node" parent="Game"]
script = ExtResource( 2 )
[node name="Spawn" type="Node2D" parent="Game"]
position = Vector2( -129.097, 30.837 )
[node name="Sprite" type="Sprite" parent="Game"]
[node name="Focus" type="Position2D" parent="Game"]
__meta__ = {
"_editor_description_": ""
}
[node name="Camera" type="Camera2D" parent="Game/Focus"]
current = true
zoom = Vector2( 0.4, 0.4 )
smoothing_enabled = true
smoothing_speed = 6.0
[connection signal="pressed" from="GUI/Control/Join" to="Game/Connection" method="_on_Join_pressed"]
[connection signal="pressed" from="GUI/Control/Create" to="Game/Connection" method="_on_Create_pressed"]
[connection signal="timeout" from="Game/Interactables/Timer" to="Game/Interactables" method="_on_Timer_timeout"]

15
Server/server.py Normal file
View File

@@ -0,0 +1,15 @@
import websockets
import asyncio
async def server(websocket, path):
while (True):
data = await websocket.recv()
print("Message received: ", data)
await websocket.send("Thanks for your message")
start_server = websockets.serve(server, "localhost", 55055)
asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()

BIN
Tilemaps/DungeonTileset.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/DungeonTileset.png-50eea03de5760c71d9597bd8a34b3bcd.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Tilemaps/DungeonTileset.png"
dest_files=[ "res://.import/DungeonTileset.png-50eea03de5760c71d9597bd8a34b3bcd.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
Tilemaps/Interactables.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Interactables.png-dd1f5ef07d1653ba93733fb79f637b78.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Tilemaps/Interactables.png"
dest_files=[ "res://.import/Interactables.png-dd1f5ef07d1653ba93733fb79f637b78.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

377
Tilemaps/Main.tres Normal file
View File

@@ -0,0 +1,377 @@
[gd_resource type="TileSet" load_steps=8 format=2]
[ext_resource path="res://Tilemaps/DungeonTileset.png" type="Texture" id=1]
[sub_resource type="OccluderPolygon2D" id=1]
polygon = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=2]
points = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=3]
points = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=4]
points = PoolVector2Array( 16, 7.94553, 0, 8.01044, 0, 6.9936, 15.9081, 6.9936 )
[sub_resource type="OccluderPolygon2D" id=5]
polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=6]
points = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 )
[resource]
0/name = "DungeonTileset.png 0"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 139, 43, 0, 0 )
0/tile_mode = 1
0/autotile/bitmask_mode = 0
0/autotile/bitmask_flags = [ ]
0/autotile/icon_coordinate = Vector2( 0, 0 )
0/autotile/tile_size = Vector2( 16, 16 )
0/autotile/spacing = 0
0/autotile/occluder_map = [ ]
0/autotile/navpoly_map = [ ]
0/autotile/priority_map = [ ]
0/autotile/z_index_map = [ ]
0/occluder_offset = Vector2( 0, 0 )
0/navigation_offset = Vector2( 0, 0 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape_one_way = false
0/shape_one_way_margin = 0.0
0/shapes = [ ]
0/z_index = 0
1/name = "DungeonTileset.png 1"
1/texture = ExtResource( 1 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 0, 0, 16, 48 )
1/tile_mode = 1
1/autotile/bitmask_mode = 0
1/autotile/bitmask_flags = [ ]
1/autotile/icon_coordinate = Vector2( 0, 0 )
1/autotile/tile_size = Vector2( 16, 16 )
1/autotile/spacing = 0
1/autotile/occluder_map = [ Vector2( 0, 1 ), SubResource( 1 ) ]
1/autotile/navpoly_map = [ ]
1/autotile/priority_map = [ ]
1/autotile/z_index_map = [ Vector3( 0, 0, 2 ), Vector3( 0, 1, 1 ) ]
1/occluder_offset = Vector2( 0, 0 )
1/navigation_offset = Vector2( 0, 0 )
1/shape_offset = Vector2( 0, 0 )
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
1/shape = SubResource( 2 )
1/shape_one_way = false
1/shape_one_way_margin = 1.0
1/shapes = [ {
"autotile_coord": Vector2( 0, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 2 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
1/z_index = 0
2/name = "DungeonTileset.png 2"
2/texture = ExtResource( 1 )
2/tex_offset = Vector2( 0, 0 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 16, 0, 16, 16 )
2/tile_mode = 0
2/occluder_offset = Vector2( 0, 0 )
2/navigation_offset = Vector2( 0, 0 )
2/shape_offset = Vector2( 0, 0 )
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
2/shape_one_way = false
2/shape_one_way_margin = 0.0
2/shapes = [ ]
2/z_index = 0
3/name = "DungeonTileset.png 3"
3/texture = ExtResource( 1 )
3/tex_offset = Vector2( 0, 0 )
3/modulate = Color( 1, 1, 1, 1 )
3/region = Rect2( 32, 0, 16, 16 )
3/tile_mode = 0
3/occluder_offset = Vector2( 0, 0 )
3/navigation_offset = Vector2( 0, 0 )
3/shape_offset = Vector2( 0, 0 )
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
3/shape_one_way = false
3/shape_one_way_margin = 0.0
3/shapes = [ ]
3/z_index = 0
4/name = "DungeonTileset.png 4"
4/texture = ExtResource( 1 )
4/tex_offset = Vector2( 0, 0 )
4/modulate = Color( 1, 1, 1, 1 )
4/region = Rect2( 0, 0, 16, 16 )
4/tile_mode = 0
4/occluder_offset = Vector2( 0, 0 )
4/navigation_offset = Vector2( 0, 0 )
4/shape_offset = Vector2( 0, 0 )
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
4/shape_one_way = false
4/shape_one_way_margin = 0.0
4/shapes = [ ]
4/z_index = 0
5/name = "DungeonTileset.png 5"
5/texture = ExtResource( 1 )
5/tex_offset = Vector2( 0, 0 )
5/modulate = Color( 1, 1, 1, 1 )
5/region = Rect2( 0, 16, 16, 16 )
5/tile_mode = 0
5/occluder_offset = Vector2( 0, 0 )
5/navigation_offset = Vector2( 0, 0 )
5/shape_offset = Vector2( 0, 0 )
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
5/shape = SubResource( 4 )
5/shape_one_way = false
5/shape_one_way_margin = 1.0
5/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 4 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
5/z_index = 0
6/name = "DungeonTileset.png 6"
6/texture = ExtResource( 1 )
6/tex_offset = Vector2( 0, 0 )
6/modulate = Color( 1, 1, 1, 1 )
6/region = Rect2( 16, 16, 16, 16 )
6/tile_mode = 0
6/occluder_offset = Vector2( 0, 0 )
6/occluder = SubResource( 5 )
6/navigation_offset = Vector2( 0, 0 )
6/shape_offset = Vector2( 0, 0 )
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
6/shape = SubResource( 6 )
6/shape_one_way = false
6/shape_one_way_margin = 1.0
6/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 6 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
6/z_index = 0
7/name = "DungeonTileset.png 7"
7/texture = ExtResource( 1 )
7/tex_offset = Vector2( 0, 0 )
7/modulate = Color( 1, 1, 1, 1 )
7/region = Rect2( 16, 16, 16, 16 )
7/tile_mode = 0
7/occluder_offset = Vector2( 0, 0 )
7/navigation_offset = Vector2( 0, 0 )
7/shape_offset = Vector2( 0, 0 )
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
7/shape_one_way = false
7/shape_one_way_margin = 0.0
7/shapes = [ ]
7/z_index = 0
8/name = "DungeonTileset.png 8"
8/texture = ExtResource( 1 )
8/tex_offset = Vector2( 0, 0 )
8/modulate = Color( 1, 1, 1, 1 )
8/region = Rect2( 0, 96, 64, 48 )
8/tile_mode = 1
8/autotile/bitmask_mode = 0
8/autotile/bitmask_flags = [ ]
8/autotile/icon_coordinate = Vector2( 0, 0 )
8/autotile/tile_size = Vector2( 16, 16 )
8/autotile/spacing = 0
8/autotile/occluder_map = [ ]
8/autotile/navpoly_map = [ ]
8/autotile/priority_map = [ ]
8/autotile/z_index_map = [ ]
8/occluder_offset = Vector2( 0, 0 )
8/navigation_offset = Vector2( 0, 0 )
8/shape_offset = Vector2( 0, 0 )
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
8/shape_one_way = false
8/shape_one_way_margin = 0.0
8/shapes = [ ]
8/z_index = 1
9/name = "DungeonTileset.png 9"
9/texture = ExtResource( 1 )
9/tex_offset = Vector2( 0, 0 )
9/modulate = Color( 1, 1, 1, 1 )
9/region = Rect2( 32, 48, 16, 16 )
9/tile_mode = 0
9/occluder_offset = Vector2( 0, 0 )
9/navigation_offset = Vector2( 0, 0 )
9/shape_offset = Vector2( 0, 0 )
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
9/shape_one_way = false
9/shape_one_way_margin = 0.0
9/shapes = [ ]
9/z_index = 0
10/name = "DungeonTileset.png 10"
10/texture = ExtResource( 1 )
10/tex_offset = Vector2( 0, 0 )
10/modulate = Color( 1, 1, 1, 1 )
10/region = Rect2( 32, 16, 16, 16 )
10/tile_mode = 0
10/occluder_offset = Vector2( 0, 0 )
10/navigation_offset = Vector2( 0, 0 )
10/shape_offset = Vector2( 0, 0 )
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
10/shape = SubResource( 3 )
10/shape_one_way = false
10/shape_one_way_margin = 1.0
10/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 3 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
10/z_index = 0
11/name = "DungeonTileset.png 11"
11/texture = ExtResource( 1 )
11/tex_offset = Vector2( 0, 0 )
11/modulate = Color( 1, 1, 1, 1 )
11/region = Rect2( 32, 32, 16, 16 )
11/tile_mode = 0
11/occluder_offset = Vector2( 0, 0 )
11/navigation_offset = Vector2( 0, 0 )
11/shape_offset = Vector2( 0, 0 )
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
11/shape_one_way = false
11/shape_one_way_margin = 0.0
11/shapes = [ ]
11/z_index = 0
12/name = "DungeonTileset.png 12"
12/texture = ExtResource( 1 )
12/tex_offset = Vector2( 0, 0 )
12/modulate = Color( 1, 1, 1, 1 )
12/region = Rect2( 16, 32, 16, 16 )
12/tile_mode = 0
12/occluder_offset = Vector2( 0, 0 )
12/navigation_offset = Vector2( 0, 0 )
12/shape_offset = Vector2( 0, 0 )
12/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
12/shape_one_way = false
12/shape_one_way_margin = 0.0
12/shapes = [ ]
12/z_index = 0
13/name = "DungeonTileset.png 13"
13/texture = ExtResource( 1 )
13/tex_offset = Vector2( 0, 0 )
13/modulate = Color( 1, 1, 1, 1 )
13/region = Rect2( 16, 32, 16, 16 )
13/tile_mode = 0
13/occluder_offset = Vector2( 0, 0 )
13/navigation_offset = Vector2( 0, 0 )
13/shape_offset = Vector2( 0, 0 )
13/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
13/shape_one_way = false
13/shape_one_way_margin = 0.0
13/shapes = [ ]
13/z_index = 0
14/name = "DungeonTileset.png 14"
14/texture = ExtResource( 1 )
14/tex_offset = Vector2( 0, 0 )
14/modulate = Color( 1, 1, 1, 1 )
14/region = Rect2( 0, 0, 16, 16 )
14/tile_mode = 1
14/autotile/bitmask_mode = 0
14/autotile/bitmask_flags = [ ]
14/autotile/icon_coordinate = Vector2( 0, 0 )
14/autotile/tile_size = Vector2( 16, 16 )
14/autotile/spacing = 0
14/autotile/occluder_map = [ ]
14/autotile/navpoly_map = [ ]
14/autotile/priority_map = [ ]
14/autotile/z_index_map = [ ]
14/occluder_offset = Vector2( 0, 0 )
14/navigation_offset = Vector2( 0, 0 )
14/shape_offset = Vector2( 0, 0 )
14/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
14/shape_one_way = false
14/shape_one_way_margin = 0.0
14/shapes = [ ]
14/z_index = 0
15/name = "DungeonTileset.png 15"
15/texture = ExtResource( 1 )
15/tex_offset = Vector2( 0, 0 )
15/modulate = Color( 1, 1, 1, 1 )
15/region = Rect2( 48, 112, 16, 16 )
15/tile_mode = 1
15/autotile/bitmask_mode = 0
15/autotile/bitmask_flags = [ ]
15/autotile/icon_coordinate = Vector2( 0, 0 )
15/autotile/tile_size = Vector2( 16, 16 )
15/autotile/spacing = 0
15/autotile/occluder_map = [ ]
15/autotile/navpoly_map = [ ]
15/autotile/priority_map = [ ]
15/autotile/z_index_map = [ ]
15/occluder_offset = Vector2( 0, 0 )
15/navigation_offset = Vector2( 0, 0 )
15/shape_offset = Vector2( 0, 0 )
15/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
15/shape_one_way = false
15/shape_one_way_margin = 0.0
15/shapes = [ ]
15/z_index = 0
16/name = "DungeonTileset.png 16"
16/texture = ExtResource( 1 )
16/tex_offset = Vector2( 0, 0 )
16/modulate = Color( 1, 1, 1, 1 )
16/region = Rect2( 0, 64, 16, 16 )
16/tile_mode = 0
16/occluder_offset = Vector2( 0, 0 )
16/navigation_offset = Vector2( 0, 0 )
16/shape_offset = Vector2( 0, 0 )
16/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
16/shape_one_way = false
16/shape_one_way_margin = 0.0
16/shapes = [ ]
16/z_index = 0
17/name = "DungeonTileset.png 17"
17/texture = ExtResource( 1 )
17/tex_offset = Vector2( 0, 0 )
17/modulate = Color( 1, 1, 1, 1 )
17/region = Rect2( 0, 96, 64, 48 )
17/tile_mode = 0
17/occluder_offset = Vector2( 0, 0 )
17/navigation_offset = Vector2( 0, 0 )
17/shape_offset = Vector2( 0, 0 )
17/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
17/shape_one_way = false
17/shape_one_way_margin = 0.0
17/shapes = [ ]
17/z_index = 0
18/name = "DungeonTileset.png 18"
18/texture = ExtResource( 1 )
18/tex_offset = Vector2( 0, 0 )
18/modulate = Color( 1, 1, 1, 1 )
18/region = Rect2( 16, 96, 16, 16 )
18/tile_mode = 0
18/occluder_offset = Vector2( 0, 0 )
18/navigation_offset = Vector2( 0, 0 )
18/shape_offset = Vector2( 0, 0 )
18/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
18/shape_one_way = false
18/shape_one_way_margin = 0.0
18/shapes = [ ]
18/z_index = 0
19/name = "DungeonTileset.png 19"
19/texture = ExtResource( 1 )
19/tex_offset = Vector2( 0, 0 )
19/modulate = Color( 1, 1, 1, 1 )
19/region = Rect2( 160, 112, 32, 32 )
19/tile_mode = 0
19/occluder_offset = Vector2( 0, 0 )
19/navigation_offset = Vector2( 0, 0 )
19/shape_offset = Vector2( 0, 0 )
19/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
19/shape_one_way = false
19/shape_one_way_margin = 0.0
19/shapes = [ ]
19/z_index = 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Office_interiors_shadowless_48x48.png-ad82aa7600027d57cc4503b5bf72b764.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Tilemaps/Office_interiors_shadowless_48x48.png"
dest_files=[ "res://.import/Office_interiors_shadowless_48x48.png-ad82aa7600027d57cc4503b5bf72b764.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Office_walls_floors_48x48.png-434e3e625a0784e8979c9eca645ed09f.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Tilemaps/Office_walls_floors_48x48.png"
dest_files=[ "res://.import/Office_walls_floors_48x48.png-434e3e625a0784e8979c9eca645ed09f.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=false
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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
Tilemaps/Prototype.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Prototype.png-532062dde8698ebd2d1cbe8a7b2c50ce.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Tilemaps/Prototype.png"
dest_files=[ "res://.import/Prototype.png-532062dde8698ebd2d1cbe8a7b2c50ce.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=false
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
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

BIN
Tilemaps/Prototype.xcf Normal file

Binary file not shown.

BIN
afu_linux.pck Normal file

Binary file not shown.

BIN
afu_linux.x86_64 Normal file

Binary file not shown.

7
camera.gd Normal file
View File

@@ -0,0 +1,7 @@
extends Camera2D
var player: KinematicBody2D = null
func _ready():
# Find player we control
player = get_node(String(get_tree().get_network_unique_id()))

11
client.gd Normal file
View File

@@ -0,0 +1,11 @@
extends Node
func _on_Create_pressed():
print(get_tree().network_peer)
if(get_tree().get_network_peer() == null):
Networking.start_server()
func _on_Join_pressed():
if(get_tree().get_network_peer() == null):
Networking.connect_to_server()

8
default_env.tres Normal file
View File

@@ -0,0 +1,8 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )
ambient_light_energy = 0.19

48
export_presets.cfg Normal file
View File

@@ -0,0 +1,48 @@
[preset.0]
name="Linux/X11"
platform="Linux/X11"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="./afu_linux.x86_64"
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.0.options]
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=true
binary_format/embed_pck=false
custom_template/release=""
custom_template/debug=""
[preset.1]
name="HTML5"
platform="HTML5"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.1.options]
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/custom_html_shell=""
html/head_include=""
custom_template/release=""
custom_template/debug=""

BIN
favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

34
favicon.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/favicon.png-05a5f25b7b35b567a640a7daf7751a8e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://favicon.png"
dest_files=[ "res://.import/favicon.png-05a5f25b7b35b567a640a7daf7751a8e.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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

16
git_api.gdnlib Normal file
View File

@@ -0,0 +1,16 @@
[general]
singleton=true
load_once=true
symbol_prefix="godot_"
reloadable=false
[entry]
Windows.64="res://bin/win64/release/libgitapi.dll"
X11.64="res://bin/x11/release/libgitapi.so"
[dependencies]
Windows.64=[ ]
X11.64=[ ]

9
git_api.gdns Normal file
View File

@@ -0,0 +1,9 @@
[gd_resource type="NativeScript" load_steps=2 format=2]
[ext_resource path="res://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.

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

34
icon.png.import Normal file
View File

@@ -0,0 +1,34 @@
[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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

153
networking.gd Normal file
View File

@@ -0,0 +1,153 @@
extends Node
signal player_disconnected
signal server_disconnected
export var SERVER_IP: String = "127.0.0.1"
export var SERVER_PORT: int = 55055
export var MAX_PLAYERS: int = 10
export var BASE_PATH: String = "/root/Node2D";
onready var gui_username: TextEdit = get_node(BASE_PATH + "/GUI/Control/Username")
onready var gui_lusername: Label = get_node(BASE_PATH + "/GUI/Control/LUsername")
onready var gui_create: Button = get_node(BASE_PATH + "/GUI/Control/Create")
onready var gui_join: Button = get_node(BASE_PATH + "/GUI/Control/Join")
onready var gui_waiting: Label = get_node(BASE_PATH + "/GUI/Control/Waiting")
onready var gui_lip: Label = get_node(BASE_PATH + "/GUI/Control/LIP")
onready var gui_ip: TextEdit = get_node(BASE_PATH + "/GUI/Control/IP")
onready var gui_chat: VBoxContainer = get_node(BASE_PATH + "/GUI/Control/Chat")
onready var spawn: Node2D = get_node(BASE_PATH + "/Game/Spawn") as Node2D
var players = {}
# If true, the player can't move. Accessed by tasks.
var move = true
var self_data = { name = '', position = Vector2(66, 175) }
func _ready():
get_tree().connect('network_peer_disconnected', self, '_on_player_disconnected')
get_tree().connect('network_peer_connected', self, '_on_player_connected')
#######################
### SERVER CODE
#######################
# Called when the node enters the scene tree for the first time.
func start_server():
var admin_name = gui_username.text
self_data.name = admin_name
self_data.position = spawn.position
players[1] = self_data # ID of server is always 1
var peer = NetworkedMultiplayerENet.new()
peer.create_server(SERVER_PORT, MAX_PLAYERS)
get_tree().network_peer = peer
add_to_chat("Server is now running!", Color(0, 100, 0, 1))
gui_create.text = "Cancel"
gui_join.visible = false
gui_waiting.visible = true
# Create admin player
create_new_player(1, players[1])
hideLobby()
func _on_player_connected(connected_player_id):
print("Client connected!")
add_to_chat("User " + String(connected_player_id) + " joined the game!")
rpc_id(1, '_request_players')
func _on_player_disconnected(id):
var player = get_node("/root/Node2D/Game/" + str(id))
player.get_parent().remove_child(player)
add_to_chat("User " + String(id) + " left the game!")
players.erase(id)
# This function get's called by each client on join.
# It will loop though all players (except the requester) and will force the client
# to execute _send_player_info to create the local player objects
remote func _request_players():
var request_from_id = get_tree().get_rpc_sender_id()
if get_tree().is_network_server():
for peer_id in players:
#if( peer_id != request_from_id):
rpc_id(request_from_id, '_send_player_info', peer_id, players[peer_id])
remote func _request_player_info(request_from_id, player_id):
if get_tree().is_network_server():
rpc_id(request_from_id, '_send_player_info', player_id, players[player_id])
remote func _send_player_info(id, info):
print("Create player ", id, "with: ", info)
players[id] = info
create_new_player(id, info)
func update_position(id, position):
#print("Update position of", id, ":", position)
players[id].position = position
#######################
### CLIENT CODE
#######################
func connect_to_server():
var player_name = gui_username.text
self_data.name = player_name
get_tree().connect("connected_to_server", self, '_connected_to_server')
var peer = NetworkedMultiplayerENet.new()
peer.create_client(SERVER_IP, SERVER_PORT)
get_tree().network_peer = peer
func _connected_to_server():
var id = get_tree().get_network_unique_id()
print("Connected to server with id ", id)
players[get_tree().get_network_unique_id()] = self_data
rpc_id(1, '_send_player_info', get_tree().get_network_unique_id(), self_data)
rpc_id(1, '_request_players')
print("==== END CONNECT ====")
hideLobby()
###
### HELPER
###
func hideLobby():
(get_node(BASE_PATH + "/Game")).visible = true
gui_username.visible = false
gui_lusername.visible = false
gui_create.visible = false
gui_join.visible = false
gui_lip.visible = false
gui_ip.visible = false
gui_waiting.visible = false
func add_to_chat(message: String, color = Color(100, 100, 100, 1)):
var label: Label = Label.new()
label.text = message
if color != null:
label.add_color_override("font_color", color)
gui_chat.add_child(label)
func get_player_node(name: int):
return get_node("/root/Node2D/Game/" + String(name))
func create_new_player(id: int, info):
if get_node(BASE_PATH + "/Game/" + str(id)) != null:
return # Do not create a new player (duplicate)
var new_player = (load('res://Characters/Player/Player.tscn').instance() as KinematicBody2D)
new_player.position = info.position
new_player.name = str(id)
new_player.set_network_master(id)
if get_tree().get_network_unique_id() != id:
(new_player.get_node("./Light2D") as Light2D).enabled = false
(new_player.get_node("./Darken") as Light2D).enabled = false
new_player.get_node("Label").text = info.name
get_node(BASE_PATH + "/Game").add_child(new_player)
print("New player with master:", new_player.get_network_master())

86
project.godot Normal file
View File

@@ -0,0 +1,86 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
_global_script_classes=[ {
"base": "",
"class": "GitAPI",
"language": "NativeScript",
"path": "res://git_api.gdns"
} ]
_global_script_class_icons={
"GitAPI": ""
}
[application]
config/name="MultiplayerTest"
run/main_scene="res://Main.tscn"
config/icon="res://icon.png"
[autoload]
Networking="*res://networking.gd"
[display]
window/vsync/use_vsync=false
[gdnative]
singletons=[ "res://git_api.gdnlib" ]
[input]
ui_left={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_right={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_up={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_down={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_shift={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"unicode":0,"echo":false,"script":null)
]
}
minimap={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null)
]
}
interact={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"unicode":0,"echo":false,"script":null)
]
}
[rendering]
quality/2d/use_nvidia_rect_flicker_workaround=true
quality/2d/use_pixel_snap=true
environment/default_clear_color=Color( 0.0784314, 0.0784314, 0.0784314, 1 )
environment/default_environment="res://default_env.tres"