From dbb0f17743982243f8fe27379e8ed28c370e97e4 Mon Sep 17 00:00:00 2001 From: gemdude46 <> Date: Thu, 26 Jan 2023 18:25:40 +0000 Subject: [PATCH] Initial Commit --- Graphics/.DS_Store | Bin 0 -> 6148 bytes Graphics/Animations/NPCWalk.tres | 12 + Graphics/Animations/PlayerDash.tres | 12 + Graphics/Animations/PlayerWalk.tres | 12 + Graphics/Tiles/.DS_Store | Bin 0 -> 6148 bytes Graphics/Tiles/PalaceTileSet.png | Bin 0 -> 4856 bytes Graphics/Tiles/PalaceTileSet.png.import | 34 ++ Graphics/Tiles/ledge/LedgeLeft.png | Bin 0 -> 166 bytes Graphics/Tiles/ledge/LedgeLeft.png.import | 34 ++ Graphics/Tiles/ledge/LedgeMiddle.png | Bin 0 -> 162 bytes Graphics/Tiles/ledge/LedgeMiddle.png.import | 34 ++ Graphics/Tiles/ledge/LedgeRight.png | Bin 0 -> 166 bytes Graphics/Tiles/ledge/LedgeRight.png.import | 34 ++ Graphics/Tiles/ledge/LedgeSingle.png | Bin 0 -> 127 bytes Graphics/Tiles/ledge/LedgeSingle.png.import | 34 ++ Graphics/Tiles/slope/.DS_Store | Bin 0 -> 6148 bytes Graphics/Tiles/slope/SlopeLeft2Borderless.png | Bin 0 -> 242 bytes .../slope/SlopeLeft2Borderless.png.import | 34 ++ Graphics/Tiles/slope/SlopeLeftBorder.png | Bin 0 -> 252 bytes .../Tiles/slope/SlopeLeftBorder.png.import | 34 ++ Graphics/Tiles/slope/SlopeRightBorder.png | Bin 0 -> 246 bytes .../Tiles/slope/SlopeRightBorder.png.import | 34 ++ Graphics/Tiles/slope/SlopeRightBorderless.png | Bin 0 -> 244 bytes .../slope/SlopeRightBorderless.png.import | 34 ++ Graphics/Units/.DS_Store | Bin 0 -> 6148 bytes Graphics/Units/NPC.png | Bin 0 -> 304 bytes Graphics/Units/NPC.png.import | 34 ++ Graphics/Units/NPCJump1.png | Bin 0 -> 304 bytes Graphics/Units/NPCJump1.png.import | 34 ++ Graphics/Units/NPCJump2.png | Bin 0 -> 310 bytes Graphics/Units/NPCJump2.png.import | 34 ++ Graphics/Units/NPCWalk.png | Bin 0 -> 318 bytes Graphics/Units/NPCWalk.png.import | 34 ++ Graphics/Units/Player.png | Bin 0 -> 304 bytes Graphics/Units/Player.png.import | 34 ++ Graphics/Units/PlayerJump1.png | Bin 0 -> 304 bytes Graphics/Units/PlayerJump1.png.import | 34 ++ Graphics/Units/PlayerJump2.png | Bin 0 -> 309 bytes Graphics/Units/PlayerJump2.png.import | 34 ++ Graphics/Units/PlayerRecoil.png | Bin 0 -> 305 bytes Graphics/Units/PlayerRecoil.png.import | 34 ++ Graphics/Units/PlayerWalk.png | Bin 0 -> 318 bytes Graphics/Units/PlayerWalk.png.import | 34 ++ LICENSE | 172 +++++++++ README.md | 54 ++- SUPPORTERS.md | 36 ++ Scenes/SandboxScene.tscn | 26 ++ Scripts/Constants.gd | 197 ++++++++++ Scripts/GameScene.gd | 153 ++++++++ Scripts/GameUtils.gd | 64 ++++ Scripts/StageEnvironment.gd | 306 ++++++++++++++++ Scripts/Unit.gd | 282 +++++++++++++++ Scripts/Units/NPCExample.gd | 8 + Scripts/Units/NPCUnit.gd | 79 +++++ Scripts/Units/Player.gd | 92 +++++ Tile Sets/TestTileSet.tres | 335 ++++++++++++++++++ Units/NPC.tscn | 46 +++ Units/Player.tscn | 47 +++ VERSION.md | 205 +++++++++++ default_env.tres | 7 + icon.png | Bin 0 -> 3305 bytes icon.png.import | 35 ++ project.godot | 90 +++++ 63 files changed, 2881 insertions(+), 1 deletion(-) create mode 100644 Graphics/.DS_Store create mode 100644 Graphics/Animations/NPCWalk.tres create mode 100644 Graphics/Animations/PlayerDash.tres create mode 100644 Graphics/Animations/PlayerWalk.tres create mode 100644 Graphics/Tiles/.DS_Store create mode 100644 Graphics/Tiles/PalaceTileSet.png create mode 100644 Graphics/Tiles/PalaceTileSet.png.import create mode 100644 Graphics/Tiles/ledge/LedgeLeft.png create mode 100644 Graphics/Tiles/ledge/LedgeLeft.png.import create mode 100644 Graphics/Tiles/ledge/LedgeMiddle.png create mode 100644 Graphics/Tiles/ledge/LedgeMiddle.png.import create mode 100644 Graphics/Tiles/ledge/LedgeRight.png create mode 100644 Graphics/Tiles/ledge/LedgeRight.png.import create mode 100644 Graphics/Tiles/ledge/LedgeSingle.png create mode 100644 Graphics/Tiles/ledge/LedgeSingle.png.import create mode 100644 Graphics/Tiles/slope/.DS_Store create mode 100644 Graphics/Tiles/slope/SlopeLeft2Borderless.png create mode 100644 Graphics/Tiles/slope/SlopeLeft2Borderless.png.import create mode 100644 Graphics/Tiles/slope/SlopeLeftBorder.png create mode 100644 Graphics/Tiles/slope/SlopeLeftBorder.png.import create mode 100644 Graphics/Tiles/slope/SlopeRightBorder.png create mode 100644 Graphics/Tiles/slope/SlopeRightBorder.png.import create mode 100644 Graphics/Tiles/slope/SlopeRightBorderless.png create mode 100644 Graphics/Tiles/slope/SlopeRightBorderless.png.import create mode 100644 Graphics/Units/.DS_Store create mode 100644 Graphics/Units/NPC.png create mode 100644 Graphics/Units/NPC.png.import create mode 100644 Graphics/Units/NPCJump1.png create mode 100644 Graphics/Units/NPCJump1.png.import create mode 100644 Graphics/Units/NPCJump2.png create mode 100644 Graphics/Units/NPCJump2.png.import create mode 100644 Graphics/Units/NPCWalk.png create mode 100644 Graphics/Units/NPCWalk.png.import create mode 100644 Graphics/Units/Player.png create mode 100644 Graphics/Units/Player.png.import create mode 100644 Graphics/Units/PlayerJump1.png create mode 100644 Graphics/Units/PlayerJump1.png.import create mode 100644 Graphics/Units/PlayerJump2.png create mode 100644 Graphics/Units/PlayerJump2.png.import create mode 100644 Graphics/Units/PlayerRecoil.png create mode 100644 Graphics/Units/PlayerRecoil.png.import create mode 100644 Graphics/Units/PlayerWalk.png create mode 100644 Graphics/Units/PlayerWalk.png.import create mode 100644 LICENSE create mode 100644 SUPPORTERS.md create mode 100644 Scenes/SandboxScene.tscn create mode 100644 Scripts/Constants.gd create mode 100644 Scripts/GameScene.gd create mode 100644 Scripts/GameUtils.gd create mode 100644 Scripts/StageEnvironment.gd create mode 100644 Scripts/Unit.gd create mode 100644 Scripts/Units/NPCExample.gd create mode 100644 Scripts/Units/NPCUnit.gd create mode 100644 Scripts/Units/Player.gd create mode 100644 Tile Sets/TestTileSet.tres create mode 100644 Units/NPC.tscn create mode 100644 Units/Player.tscn create mode 100644 VERSION.md create mode 100644 default_env.tres create mode 100644 icon.png create mode 100644 icon.png.import create mode 100644 project.godot diff --git a/Graphics/.DS_Store b/Graphics/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2b444b0082290461ec669cbed3c3e7191884c0ab GIT binary patch literal 6148 zcmeHKy-ve05I#c+ZV;ja5{y~c7)o0eF(8Ek0~=EK8345jsc57$MomfuB`B`}Z^RSu zI^5YV0tzbvXFs1HX*{I=eRP;E9c(5AV)zm|n(#5HW4I1V=a>Ll@FulwJq12ypZ{xQ?SV zt5#pw%&b+Ko9Eo-_M&~^^~A`_{A`%E{J|OZ4*jebX!{5keY5@GBpRjNn5)pVh5^ICM+Rn9 zw?gm#{`d9&#~{-)3>XIf6$8xL^Y&Vpl73sKlB2iQLG7TDkYAxthG3(gV`QZ0+I&P7zTcnfmh68r2hZ_ literal 0 HcmV?d00001 diff --git a/Graphics/Animations/NPCWalk.tres b/Graphics/Animations/NPCWalk.tres new file mode 100644 index 0000000..413ed86 --- /dev/null +++ b/Graphics/Animations/NPCWalk.tres @@ -0,0 +1,12 @@ +[gd_resource type="SpriteFrames" load_steps=3 format=2] + +[ext_resource path="res://Graphics/Units/NPCWalk.png" type="Texture" id=1] +[ext_resource path="res://Graphics/Units/NPC.png" type="Texture" id=2] + +[resource] +animations = [ { +"frames": [ ExtResource( 2 ), ExtResource( 1 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +} ] diff --git a/Graphics/Animations/PlayerDash.tres b/Graphics/Animations/PlayerDash.tres new file mode 100644 index 0000000..4a11e64 --- /dev/null +++ b/Graphics/Animations/PlayerDash.tres @@ -0,0 +1,12 @@ +[gd_resource type="SpriteFrames" load_steps=3 format=2] + +[ext_resource path="res://Graphics/Units/PlayerWalk.png" type="Texture" id=1] +[ext_resource path="res://Graphics/Units/Player.png" type="Texture" id=2] + +[resource] +animations = [ { +"frames": [ ExtResource( 2 ), ExtResource( 1 ) ], +"loop": true, +"name": "default", +"speed": 20.0 +} ] diff --git a/Graphics/Animations/PlayerWalk.tres b/Graphics/Animations/PlayerWalk.tres new file mode 100644 index 0000000..6904450 --- /dev/null +++ b/Graphics/Animations/PlayerWalk.tres @@ -0,0 +1,12 @@ +[gd_resource type="SpriteFrames" load_steps=3 format=2] + +[ext_resource path="res://Graphics/Units/PlayerWalk.png" type="Texture" id=1] +[ext_resource path="res://Graphics/Units/Player.png" type="Texture" id=2] + +[resource] +animations = [ { +"frames": [ ExtResource( 2 ), ExtResource( 1 ) ], +"loop": true, +"name": "default", +"speed": 10.0 +} ] diff --git a/Graphics/Tiles/.DS_Store b/Graphics/Tiles/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..dc65c28d05768183893179e3a777d34d9556f41d GIT binary patch literal 6148 zcmeHK%}T>S5T32AZYyFBf<5Nqt%v%9;z0ggfz4Ma{NvP^da;|Y2S~9kHN2gKaSF@)p}#4g>q$aiSrt- zt<_yEDA@R`r4sLGA~NPfl7{o5JN7{qa+X` zM+}o7Rr9!dfb%M^cIu7scx$)Sw6=Hl@}@Q3-$Hw5dpFOke0^i{;Q0FX{$c!>KRs*0 z8SYFas|F|Vg2vPmr+4m@`_3ICu}HcYJeg=R0U literal 0 HcmV?d00001 diff --git a/Graphics/Tiles/PalaceTileSet.png b/Graphics/Tiles/PalaceTileSet.png new file mode 100644 index 0000000000000000000000000000000000000000..56a9b33fbee13c043f515c4bbfdd2d9dc4100a5b GIT binary patch literal 4856 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 literal 0 HcmV?d00001 diff --git a/Graphics/Tiles/PalaceTileSet.png.import b/Graphics/Tiles/PalaceTileSet.png.import new file mode 100644 index 0000000..718cfe1 --- /dev/null +++ b/Graphics/Tiles/PalaceTileSet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/PalaceTileSet.png-b6855e565d4f2243473eb1aaecf68c90.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Tiles/PalaceTileSet.png" +dest_files=[ "res://.import/PalaceTileSet.png-b6855e565d4f2243473eb1aaecf68c90.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 diff --git a/Graphics/Tiles/ledge/LedgeLeft.png b/Graphics/Tiles/ledge/LedgeLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..b41f9bc8e7147cde903627346bd1d2291322b0b0 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VTavfC3&Vd9T(EcfWS|IVfk$L9 z0|U1(2s1Lwnj--eWH0gbb!C6XBFHZyy{~$1BT&fL)5S5w;&gIKLc)*p4z33d9XN1c z!_uF&j;-SUaSEp#)Y!C|1v3_}|Jl_vDH>=YiT8JYD@<);T3K F0RZ~JFVO%1 literal 0 HcmV?d00001 diff --git a/Graphics/Tiles/ledge/LedgeLeft.png.import b/Graphics/Tiles/ledge/LedgeLeft.png.import new file mode 100644 index 0000000..fe16188 --- /dev/null +++ b/Graphics/Tiles/ledge/LedgeLeft.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/LedgeLeft.png-2775825292c38ce4aee031538f9a8d1a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Tiles/ledge/LedgeLeft.png" +dest_files=[ "res://.import/LedgeLeft.png-2775825292c38ce4aee031538f9a8d1a.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 diff --git a/Graphics/Tiles/ledge/LedgeMiddle.png b/Graphics/Tiles/ledge/LedgeMiddle.png new file mode 100644 index 0000000000000000000000000000000000000000..7e3c428c06cdcaf74e2f6149625afd57b516e168 GIT binary patch literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VTavfC3&Vd9T(EcfWS|IVfk$L9 z0|U1(2s1Lwnj--eWH0gbb!C6XBFHZ)y*y#f0ick+r;B5V#p&dfgoGdG9b6A=TKdyA zkV}8w9)~GbYHV7~f*A_RTaznAdYS?axHd2`aOkkjUE0%s3#gUB)78&qol`;+0O92; AmH+?% literal 0 HcmV?d00001 diff --git a/Graphics/Tiles/ledge/LedgeMiddle.png.import b/Graphics/Tiles/ledge/LedgeMiddle.png.import new file mode 100644 index 0000000..afbbc7b --- /dev/null +++ b/Graphics/Tiles/ledge/LedgeMiddle.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/LedgeMiddle.png-d5b49d2c5e68957aa07502bf0062ad5e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Tiles/ledge/LedgeMiddle.png" +dest_files=[ "res://.import/LedgeMiddle.png-d5b49d2c5e68957aa07502bf0062ad5e.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 diff --git a/Graphics/Tiles/ledge/LedgeRight.png b/Graphics/Tiles/ledge/LedgeRight.png new file mode 100644 index 0000000000000000000000000000000000000000..548ddcb16fe3be2a8f6d4a0cf4afa37a010adf08 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VTavfC3&Vd9T(EcfWS|IVfk$L9 z0|U1(2s1Lwnj--eWH0gbb!C6XBFHbwp?vSH98k#E)5S5w;&gIKLc)*p4z33_E&XX5 z$fZATk3)d(S21@sH8!ng!3+iEt;v-lJxzfITpO4eZ235N#kRy>1ZrpSboFyt=akR{ E09{inFaQ7m literal 0 HcmV?d00001 diff --git a/Graphics/Tiles/ledge/LedgeRight.png.import b/Graphics/Tiles/ledge/LedgeRight.png.import new file mode 100644 index 0000000..98d91a5 --- /dev/null +++ b/Graphics/Tiles/ledge/LedgeRight.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/LedgeRight.png-2c6c93c700fa63ad5da147390da161ab.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Tiles/ledge/LedgeRight.png" +dest_files=[ "res://.import/LedgeRight.png-2c6c93c700fa63ad5da147390da161ab.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 diff --git a/Graphics/Tiles/ledge/LedgeSingle.png b/Graphics/Tiles/ledge/LedgeSingle.png new file mode 100644 index 0000000000000000000000000000000000000000..af0b27905f4e1a2220999e96757a65d1991d1064 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~OHUWa5R2aA zl!SyI=N()R96E5|z=owiZ5><1{o@o?EUW5PW)^;$=ftXf!NHA9>-Z-P3D(64A_=Sv YCS@GFGrs$H01aXAboFyt=akR{048-MD*ylh literal 0 HcmV?d00001 diff --git a/Graphics/Tiles/ledge/LedgeSingle.png.import b/Graphics/Tiles/ledge/LedgeSingle.png.import new file mode 100644 index 0000000..40dab04 --- /dev/null +++ b/Graphics/Tiles/ledge/LedgeSingle.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/LedgeSingle.png-de1403dec78f2a50996682f24644fe14.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Tiles/ledge/LedgeSingle.png" +dest_files=[ "res://.import/LedgeSingle.png-de1403dec78f2a50996682f24644fe14.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 diff --git a/Graphics/Tiles/slope/.DS_Store b/Graphics/Tiles/slope/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0#a~$}>yygLa#qxsQbBq1<0Ug5N>FVdQ&MBb@06*AP1ONa4 literal 0 HcmV?d00001 diff --git a/Graphics/Tiles/slope/SlopeLeft2Borderless.png.import b/Graphics/Tiles/slope/SlopeLeft2Borderless.png.import new file mode 100644 index 0000000..104cb2c --- /dev/null +++ b/Graphics/Tiles/slope/SlopeLeft2Borderless.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/SlopeLeft2Borderless.png-19102a916845e610ebf4d804861b1aea.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Tiles/slope/SlopeLeft2Borderless.png" +dest_files=[ "res://.import/SlopeLeft2Borderless.png-19102a916845e610ebf4d804861b1aea.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 diff --git a/Graphics/Tiles/slope/SlopeLeftBorder.png b/Graphics/Tiles/slope/SlopeLeftBorder.png new file mode 100644 index 0000000000000000000000000000000000000000..2b41317528126bcfd179c8ccd2bcc6e6e66ca758 GIT binary patch literal 252 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`j)5C}6~x?A@LC@5Xx z8c`CQpH@5ji&fUIoR$>=(ie?|lxJuKiKrU(J-$`->A8lIM5s#ZVuwjg49*Udidxx!@BMkO zgYiSN<}k literal 0 HcmV?d00001 diff --git a/Graphics/Tiles/slope/SlopeRightBorder.png.import b/Graphics/Tiles/slope/SlopeRightBorder.png.import new file mode 100644 index 0000000..741cd4f --- /dev/null +++ b/Graphics/Tiles/slope/SlopeRightBorder.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/SlopeRightBorder.png-ef1afb62ea64fbb50d9291353bb9682e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Tiles/slope/SlopeRightBorder.png" +dest_files=[ "res://.import/SlopeRightBorder.png-ef1afb62ea64fbb50d9291353bb9682e.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 diff --git a/Graphics/Tiles/slope/SlopeRightBorderless.png b/Graphics/Tiles/slope/SlopeRightBorderless.png new file mode 100644 index 0000000000000000000000000000000000000000..d109404186942a5c1eb28d44a4245faf3b8cb38b GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`j)5C}6~x?A@LC@5Xx z8c`CQpH@xGCfO6_OPT)txn4Z_6u-Spc2F;OXk;vd$@?2>>4#P^ka_ literal 0 HcmV?d00001 diff --git a/Graphics/Tiles/slope/SlopeRightBorderless.png.import b/Graphics/Tiles/slope/SlopeRightBorderless.png.import new file mode 100644 index 0000000..b709a58 --- /dev/null +++ b/Graphics/Tiles/slope/SlopeRightBorderless.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/SlopeRightBorderless.png-44c3e94f0a25597de76d63bdf0f35bb4.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Tiles/slope/SlopeRightBorderless.png" +dest_files=[ "res://.import/SlopeRightBorderless.png-44c3e94f0a25597de76d63bdf0f35bb4.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 diff --git a/Graphics/Units/.DS_Store b/Graphics/Units/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T02BR0prCY# zYeY$Kep*R+Vo@rCb81d;WwAnVNoh)EzCuWTe$K(=4{LzRc6+)whIkx*d;K{(lN9Cm8Z}7b<9_5y4qvK)mG;W?!5jde|)xm xS@!KU4L+^A=c*L#P`$0S2BR0prCY# zYeY$Kep*R+Vo@rCb81d;WwAnVNoh)EzCuWTe$K(=4{LzRc6+)whIkx*d;K79g8~n0 zz<<8H$5uU0t@0l8eQi-(mQl}X;9{slum@6n~A1 zzN5Nl)g#ypSn_VBT@Sl{VO?}>c!HuN|H@YdKccSQW$Tz$c=K>h^v(xDU*bw1?hVhL x$uF;vqrI1X-NM-V#H_bRn$8|yB!1>K!&6?j-bZr0t literal 0 HcmV?d00001 diff --git a/Graphics/Units/NPCJump1.png.import b/Graphics/Units/NPCJump1.png.import new file mode 100644 index 0000000..f3bdae9 --- /dev/null +++ b/Graphics/Units/NPCJump1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/NPCJump1.png-7642ac14379c2a312ae5db9fc6caea56.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Units/NPCJump1.png" +dest_files=[ "res://.import/NPCJump1.png-7642ac14379c2a312ae5db9fc6caea56.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 diff --git a/Graphics/Units/NPCJump2.png b/Graphics/Units/NPCJump2.png new file mode 100644 index 0000000000000000000000000000000000000000..7dfc7cb7c631119433053100c2d9342fb7bbccf2 GIT binary patch literal 310 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3oCO|{#S9GGLLkg|>2BR0prCY# zYeY$Kep*R+Vo@rCb81d;WwAnVNoh)EzCuWTe$K(=4{LzR4tlychIkx*d;K79ivbVI zf!lH~p50owCc8cF#li1fP7{U8*3PhLQ0F+tX3b}?xxa{^Am6~)<9y;nro7jW;{N|D z(`4XcOVGW*-EdI<;cB17GlLDfwIa(Oa-4dk|EHiLD%8Jq`Pvw+bBlyx{Fe#2L@Hh7 zY&{Wi=h{<-^Ne?xs+%2Wp8vG^TfqAmt2t(3q7gS+d76W_+3D`kTeW3XUh0}{K@xpi z&QGvgXI}qO@_SV!SIy~3mRhd`-qgOnVwYC;AmRuA@8{ZA#5UeZ1bT+S)78&qol`;+ E0NEFO8vp2BR0prCY# zYeY$Kep*R+Vo@rCb81d;WwAnVNoh)EzCuWTe$K(=4{LzRPI|gHhIkx*d;KDBvjGoF zKpy+HmsUMTt#U5Q-dP_q^{GjDo>K_pe3uVN>NgnEwrPkrd|)(g{vs!)_h94Nhd+|* zy@VGeFoZEL<}|1f&U2mBJEti!r1O{d9LLB%ZTfuvx3302%$(|dFfyd6HeGA7hHB8; zfD>DeCP&|Y@SMf3vEH*->#AvptxQRy@!LX)J6`|m-DTDmPCs?jrRLPSZ-UdR5ARQ| z{}J53?d7DGmu*Gz7G~}BD_x!;zWTM!_vHCu_Sa2BR0prCY# zYeY$Kep*R+Vo@rCb81d;WwAnVNoh)EzCuWTe$K(=4{LzRc6+)whIkx*d;K!$a%3T?gM%}j?rDJCOD^H*E>zJ?BbhXEdtF6u%+2BR0prCY# zYeY$Kep*R+Vo@rCb81d;WwAnVNoh)EzCuWTe$K(=4{LzRc6+)whIkx*d;K79g8~n0 zz<<8JM+!Z!6#5?VeQi-(=26dU;i^mK`=qH-)+8 zB^P>r=A6dJ(>On8bN1@&jO%OnX>XX&(;iZ4QM2|{9<$5o9d8o1t&J(*tXjY8!@bp8 y&$ROkY@2$I`TB)*`wh01B^^9|e3AH>*9?2Z^{#Lg&1?sHgTd3)&t;ucLK6UBv3JV= literal 0 HcmV?d00001 diff --git a/Graphics/Units/PlayerJump1.png.import b/Graphics/Units/PlayerJump1.png.import new file mode 100644 index 0000000..b4d9835 --- /dev/null +++ b/Graphics/Units/PlayerJump1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/PlayerJump1.png-35abd22d5526cf19e8d6544ce176e9e1.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Units/PlayerJump1.png" +dest_files=[ "res://.import/PlayerJump1.png-35abd22d5526cf19e8d6544ce176e9e1.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 diff --git a/Graphics/Units/PlayerJump2.png b/Graphics/Units/PlayerJump2.png new file mode 100644 index 0000000000000000000000000000000000000000..f3fa990d60f1d6b15ae9a01704673bc79d83e7b1 GIT binary patch literal 309 zcmV-50m}Y~P)YAX9X8WNB|8RBvx=!KdMT0002M zNklBxUBO9{s!<0>2BR0prCY# zYeY$Kep*R+Vo@rCb81d;WwAnVNoh)EzCuWTe$K(=4{LzR_ISEDhIkx*d+juDg8>J_ zg-y+iEjkvLP3XHM`@zMDFSYYG z+|B-?iIG7!z`CK${P0qbY~}Y&*@616)ON6M{lF~$Lq2rx-(oMrc7JQ}{%vgAFFbs- zsO&_v#{TDj7q+dQgTe~DWM4fmfLu1 literal 0 HcmV?d00001 diff --git a/Graphics/Units/PlayerRecoil.png.import b/Graphics/Units/PlayerRecoil.png.import new file mode 100644 index 0000000..e78668c --- /dev/null +++ b/Graphics/Units/PlayerRecoil.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/PlayerRecoil.png-3f8702925aa2548c6daf6c3a606018d2.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Units/PlayerRecoil.png" +dest_files=[ "res://.import/PlayerRecoil.png-3f8702925aa2548c6daf6c3a606018d2.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 diff --git a/Graphics/Units/PlayerWalk.png b/Graphics/Units/PlayerWalk.png new file mode 100644 index 0000000000000000000000000000000000000000..614a76c878b9ecec7901a9fe48d2093a1988af90 GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3oCO|{#S9GGLLkg|>2BR0prCY# zYeY$Kep*R+Vo@rCb81d;WwAnVNoh)EzCuWTe$K(=4{LzRPI|gHhIkx*d;KDBvjGpw zg?oHGhZK5FDabCh-VwiY!c&v-Jf{%G`7R%l)Ne4ReGAZIc*vZ__R>}-=0Iump^wl1 zO;U3>$gqaZO*r9$+MO;FX-n44D}=s=TQqO_!5c3#Z`aCGL3ruXmSOTR8pHQJ0!i>%Iw2t3JFx zx&B9R|F)NtUS75p$y=DU*ROPWhWP5&I^UD$huL3~UANTuS7-7EbM`NmSC&jt$^&|e N!PC{xWt~$(696oFfvo@l literal 0 HcmV?d00001 diff --git a/Graphics/Units/PlayerWalk.png.import b/Graphics/Units/PlayerWalk.png.import new file mode 100644 index 0000000..cfdc623 --- /dev/null +++ b/Graphics/Units/PlayerWalk.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/PlayerWalk.png-97cda3b7502828341bf53a9e56c0f251.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/Units/PlayerWalk.png" +dest_files=[ "res://.import/PlayerWalk.png-97cda3b7502828341bf53a9e56c0f251.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 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..11695f3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,172 @@ +Academic Free License ("AFL") v. 3.0 + +This Academic Free License (the "License") applies to any original work of +authorship (the "Original Work") whose owner (the "Licensor") has placed the +following licensing notice adjacent to the copyright notice for the Original +Work: + + Licensed under the Academic Free License version 3.0 + +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, +non-exclusive, sublicensable license, for the duration of the copyright, to do +the following: + + a) to reproduce the Original Work in copies, either alone or as part of a + collective work; + + b) to translate, adapt, alter, transform, modify, or arrange the Original + Work, thereby creating derivative works ("Derivative Works") based upon + the Original Work; + + c) to distribute or communicate copies of the Original Work and + Derivative Works to the public, under any license of your choice that + does not contradict the terms and conditions, including Licensor's + reserved rights and remedies, in this Academic Free License; + + d) to perform the Original Work publicly; and + + e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, +non-exclusive, sublicensable license, under patent claims owned or controlled +by the Licensor that are embodied in the Original Work as furnished by the +Licensor, for the duration of the patents, to make, use, sell, offer for sale, +have made, and import the Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred +form of the Original Work for making modifications to it and all available +documentation describing how to modify the Original Work. Licensor agrees to +provide a machine-readable copy of the Source Code of the Original Work along +with each copy of the Original Work that Licensor distributes. Licensor +reserves the right to satisfy this obligation by placing a machine-readable +copy of the Source Code in an information repository reasonably calculated to +permit inexpensive and convenient access by You for as long as Licensor +continues to distribute the Original Work. + +4) Exclusions From License Grant. Neither the names of Licensor, nor the names +of any contributors to the Original Work, nor any of their trademarks or +service marks, may be used to endorse or promote products derived from this +Original Work without express prior permission of the Licensor. Except as +expressly stated herein, nothing in this License grants any license to +Licensor's trademarks, copyrights, patents, trade secrets or any other +intellectual property. No patent license is granted to make, use, sell, offer +for sale, have made, or import embodiments of any patent claims other than the +licensed claims defined in Section 2. No license is granted to the trademarks +of Licensor even if such marks are included in the Original Work. Nothing in +this License shall be interpreted to prohibit Licensor from licensing under +terms different from this License any Original Work that Licensor otherwise +would have a right to license. + +5) External Deployment. The term "External Deployment" means the use, +distribution, or communication of the Original Work or Derivative Works in any +way such that the Original Work or Derivative Works may be used by anyone +other than You, whether those works are distributed or communicated to those +persons or made available as an application intended for use over a network. +As an express condition for the grants of license hereunder, You must treat +any External Deployment by You of the Original Work or a Derivative Work as a +distribution under section 1(c). + +6) Attribution Rights. You must retain, in the Source Code of any Derivative +Works that You create, all copyright, patent, or trademark notices from the +Source Code of the Original Work, as well as any notices of licensing and any +descriptive text identified therein as an "Attribution Notice." You must cause +the Source Code for any Derivative Works that You create to carry a prominent +Attribution Notice reasonably calculated to inform recipients that You have +modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that +the copyright in and to the Original Work and the patent rights granted herein +by Licensor are owned by the Licensor or are sublicensed to You under the +terms of this License with the permission of the contributor(s) of those +copyrights and patent rights. Except as expressly stated in the immediately +preceding sentence, the Original Work is provided under this License on an "AS +IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without +limitation, the warranties of non-infringement, merchantability or fitness for +a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK +IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this +License. No license to the Original Work is granted by this License except +under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, +whether in tort (including negligence), contract, or otherwise, shall the +Licensor be liable to anyone for any indirect, special, incidental, or +consequential damages of any character arising as a result of this License or +the use of the Original Work including, without limitation, damages for loss +of goodwill, work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses. This limitation of liability shall not +apply to the extent applicable law prohibits such limitation. + +9) Acceptance and Termination. If, at any time, You expressly assented to this +License, that assent indicates your clear and irrevocable acceptance of this +License and all of its terms and conditions. If You distribute or communicate +copies of the Original Work or a Derivative Work, You must make a reasonable +effort under the circumstances to obtain the express assent of recipients to +the terms of this License. This License conditions your rights to undertake +the activities listed in Section 1, including your right to create Derivative +Works based upon the Original Work, and doing so without honoring these terms +and conditions is prohibited by copyright law and international treaty. +Nothing in this License is intended to affect copyright exceptions and +limitations (including "fair use" or "fair dealing"). This License shall +terminate immediately and You may no longer exercise any of the rights granted +to You by this License upon your failure to honor the conditions in Section +1(c). + +10) Termination for Patent Action. This License shall terminate automatically +and You may no longer exercise any of the rights granted to You by this +License as of the date You commence an action, including a cross-claim or +counterclaim, against Licensor or any licensee alleging that the Original Work +infringes a patent. This termination provision shall not apply for an action +alleging patent infringement by combinations of the Original Work with other +software or hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this +License may be brought only in the courts of a jurisdiction wherein the +Licensor resides or in which Licensor conducts its primary business, and under +the laws of that jurisdiction excluding its conflict-of-law provisions. The +application of the United Nations Convention on Contracts for the +International Sale of Goods is expressly excluded. Any use of the Original +Work outside the scope of this License or after its termination shall be +subject to the requirements and penalties of copyright or patent law in the +appropriate jurisdiction. This section shall survive the termination of this +License. + +12) Attorneys' Fees. In any action to enforce the terms of this License or +seeking damages relating thereto, the prevailing party shall be entitled to +recover its costs and expenses, including, without limitation, reasonable +attorneys' fees and costs incurred in connection with such action, including +any appeal of such action. This section shall survive the termination of this +License. + +13) Miscellaneous. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent necessary +to make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, +whether in upper or lower case, means an individual or a legal entity +exercising rights under, and complying with all of the terms of, this License. +For legal entities, "You" includes any entity that controls, is controlled by, +or is under common control with you. For purposes of this definition, +"control" means (i) the power, direct or indirect, to cause the direction or +management of such entity, whether by contract or otherwise, or (ii) ownership +of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity. + +15) Right to Use. You may use the Original Work in all ways not otherwise +restricted or conditioned by this License or by law, and Licensor promises not +to interfere with or be responsible for such uses by You. + +16) Modification of This License. This License is Copyright © 2005 Lawrence +Rosen. Permission is granted to copy, distribute, or communicate this License +without modification. Nothing in this License permits You to modify this +License as applied to the Original Work or to Derivative Works. However, You +may modify the text of this License and copy, distribute or communicate your +modified version (the "Modified License") and apply it to other original works +of authorship subject to the following conditions: (i) You may not indicate in +any way that your Modified License is the "Academic Free License" or "AFL" and +you may not use those names in the name of your Modified License; (ii) You +must replace the notice specified in the first paragraph above with the notice +"Licensed under " or with a notice of your own +that is not confusingly similar to the notice in this License; and (iii) You +may not claim that your original works are open source software unless your +Modified License has been approved by Open Source Initiative (OSI) and You +comply with its license review and certification process. diff --git a/README.md b/README.md index 6d9c49b..3dc34b5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,54 @@ -# Jam10 +

+ + react + +

+ +This plugin is now supported in [Godot Extended Library Discord](https://discord.gg/JNrcucg), check out the [Godot Extended Library Project](https://github.com/godot-extended-libraries)! + + + +# GitHub Integration +A complete GitHub integration for your Godot Editor! Manage your project without even opening your browser. + +Author: *"Nicolo (fenix) Santilio"* +Version: *1.4.3* +Godot Version: *3.2.4-rc3* +Wiki: *[supported](https://github.com/fenix-hub/godot-engine.github-integration/wiki)* + + + +## What is this? +*GitHub Integration* is a addon for Godot Engine that I've created mainly for a personal purpose. +Pushing and Pulling repositories while I'm working on Godot (especially if I'm under a GameJam) could take some time and force me to save the project, open the brwoser/git bash/git gui, and do all the stuff. +With this little addon which works directly in the editor, managing all your repositories will be very easy. + +## What can it do? +*Github Integration* offers the main functionalities provided by GitHub (and git itself), in a more accessible way. +Currenlty, you can: +- Manage all of your public and private **repositories**, *including* the ones you share with organizations and the ones in which you are a collaborator (with proper permissions): create, delete, push and clone repositories within your Godot project +- Manage all of your public and private **gists**: delete, edit and create gists with a functional text editor +- Manage collaboration invitations, inviting user to your repositories or accept/decline invitations you have received + +## How does it work? +I'm currently working on a [Wiki](https://github.com/fenix-hub/godot-engine.github-integration/wiki) for this plugin. It is a process that will take some time to complete since I want to provide a well-organized wiki with some basic explanations about GitHub itself. Anyway, I'm working on a user-friendly plugin, so everything should be the very ease to use for GitHub experienced users, and a little intuitive for people who never used GitHub or are not so experienced. +If you want to see some screenshots you can find them here `addons/github-integration/screenshots` + +## Supporters page + + + + + +
@masterworm2
masterworm2
@auctru
autcru
+ +## :warning: Disclaimer +As a "work in progress" project, there is *no warranty* for any eventual issue and bug that may broke your project. +I don't assume any responsibility for possible corruptions of your project. It is always advisable to keep a copy of your project and check any changes you make in your Github repository. + +----------------- +> This text file was created via [TextEditor Integration](https://github.com/fenix-hub/godot-engine.text-editor) inside Godot Engine's Editor. + + + diff --git a/SUPPORTERS.md b/SUPPORTERS.md new file mode 100644 index 0000000..a08f573 --- /dev/null +++ b/SUPPORTERS.md @@ -0,0 +1,36 @@ +This is a list of people who decided to support my plugin with donations. Even though they are not explicitly requested, they would help me pay a part of my university fees and also encourage me to keep my projects updated and make new ones. +*A huge thank you to:* +- Russel aka [masterworm2](https://github.com/masterworm2) +- Autcru aka [autcru](https://github.com/autcru) +- Itch.io users (can't publish their name until their agreement) + + + + + + + + + + + + + + + + + + + + + + + + + + + +----------------- +> This text file was created via [TextEditor Integration](https://github.com/fenix-hub/godot-engine.text-editor) inside Godot Engine's Editor. + + diff --git a/Scenes/SandboxScene.tscn b/Scenes/SandboxScene.tscn new file mode 100644 index 0000000..85cbd8b --- /dev/null +++ b/Scenes/SandboxScene.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Tile Sets/TestTileSet.tres" type="TileSet" id=1] +[ext_resource path="res://Scripts/GameScene.gd" type="Script" id=5] +[ext_resource path="res://Units/Player.tscn" type="PackedScene" id=6] + +[node name="Scene" type="Node"] +script = ExtResource( 5 ) +tile_set_name = "TestTileSet" +spawning = { +Vector2( 12, 3 ): "NPC" +} + +[node name="Stage" type="TileMap" parent="."] +tile_set = ExtResource( 1 ) +cell_size = Vector2( 20, 20 ) +format = 1 +tile_data = PoolIntArray( -786410, 0, 0, -786409, 2, 0, -720874, 6, 0, -720873, 8, 0, -655335, 19, 0, -655334, 21, 0, -524272, 0, 0, -524271, 2, 0, -524262, 19, 0, -524261, 20, 0, -524260, 21, 0, -458736, 6, 0, -458735, 8, 0, -393193, 19, 0, -393192, 20, 0, -393191, 20, 0, -393190, 21, 0, -327660, 16, 0, -327648, 0, 0, -327647, 1, 0, -327646, 1, 0, -327645, 2, 0, -262128, 0, 0, -262127, 2, 0, -262126, 9, 0, -262125, 10, 0, -262124, 5, 0, -262113, 15, 0, -262112, 4, 0, -262111, 4, 0, -262110, 4, 0, -262109, 5, 0, -196596, 9, 0, -196595, 10, 0, -196594, 1, 0, -196593, 1, 0, -196592, 4, 0, -196591, 4, 0, -196590, 4, 0, -196589, 4, 0, -196588, 5, 0, -196586, 0, 0, -196585, 2, 0, -196578, 15, 0, -196577, 4, 0, -196576, 4, 0, -196575, 4, 0, -196574, 4, 0, -196573, 5, 0, -131061, 15, 0, -131060, 4, 0, -131059, 4, 0, -131058, 4, 0, -131057, 4, 0, -131056, 4, 0, -131055, 4, 0, -131054, 4, 0, -131053, 4, 0, -131052, 5, 0, -131050, 3, 0, -131049, 5, 0, -131043, 15, 0, -131042, 4, 0, -131041, 4, 0, -131040, 4, 0, -131039, 4, 0, -131038, 4, 0, -131037, 5, 0, -65532, 0, 0, -65531, 2, 0, -65527, 9, 0, -65526, 10, 0, -65525, 4, 0, -65524, 4, 0, -65523, 4, 0, -65522, 4, 0, -65521, 4, 0, -65520, 4, 0, -65519, 4, 0, -65518, 4, 0, -65517, 4, 0, -65516, 5, 0, -65514, 3, 0, -65513, 4, 0, -65512, 13, 0, -65511, 12, 0, -65508, 15, 0, -65507, 4, 0, -65506, 4, 0, -65505, 4, 0, -65504, 4, 0, -65503, 4, 0, -65502, 4, 0, -65501, 5, 0, 0, 0, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 4, 0, 5, 5, 0, 6, 22, 0, 7, 22, 0, 8, 0, 0, 9, 4, 0, 10, 4, 0, 11, 4, 0, 12, 4, 0, 13, 4, 0, 14, 4, 0, 15, 4, 0, 16, 4, 0, 17, 4, 0, 18, 4, 0, 19, 4, 0, 20, 5, 0, 22, 3, 0, 23, 4, 0, 24, 4, 0, 25, 4, 0, 26, 1, 0, 27, 1, 0, 28, 4, 0, 29, 4, 0, 30, 4, 0, 31, 4, 0, 32, 4, 0, 33, 4, 0, 34, 4, 0, 35, 5, 0 ) + +[node name="Player" parent="." instance=ExtResource( 6 )] +position = Vector2( 10, -150 ) + +[node name="Camera2D" type="Camera2D" parent="Player"] +offset = Vector2( 0, -15 ) +smoothing_enabled = true +smoothing_speed = 6.0 diff --git a/Scripts/Constants.gd b/Scripts/Constants.gd new file mode 100644 index 0000000..f2815f3 --- /dev/null +++ b/Scripts/Constants.gd @@ -0,0 +1,197 @@ +enum UnitType { + PLAYER, + NPC, +} + +enum ActionType { + JUMP, + MOVE, + RECOIL, +} + +enum UnitCondition { + CURRENT_ACTION, + IS_ON_GROUND, + MOVING_STATUS, + IS_INVINCIBLE, +} + +enum UnitCurrentAction { + IDLE, + JUMPING, + RECOILING, +} + +enum UnitMovingStatus { + IDLE, + MOVING, +} + +enum PlayerInput { + UP, + DOWN, + LEFT, + RIGHT, + GBA_A, + GBA_B, + GBA_START, + GBA_SELECT, +} + +enum Direction { + UP, + DOWN, + LEFT, + RIGHT, +} + +enum MapElemType { + SQUARE, + SLOPE_LEFT, + SLOPE_RIGHT, + SMALL_SLOPE_LEFT_1, + SMALL_SLOPE_LEFT_2, + SMALL_SLOPE_RIGHT_1, + SMALL_SLOPE_RIGHT_2, + LEDGE, +} + +enum SpriteClass { + IDLE, + WALK, + JUMP, + RECOIL, +} + +const UNIT_TYPE_ACTIONS = { + UnitType.PLAYER: [ + ActionType.JUMP, + ActionType.MOVE, + ActionType.RECOIL, + ], + UnitType.NPC: [ + ActionType.MOVE, + ], +} + +const UNIT_TYPE_CURRENT_ACTIONS = { + UnitType.PLAYER: [ + UnitCurrentAction.IDLE, + UnitCurrentAction.JUMPING, + UnitCurrentAction.RECOILING, + ], + UnitType.NPC: [ + UnitCurrentAction.IDLE, + ], +} + +# default conditions +const UNIT_TYPE_CONDITIONS = { + UnitType.PLAYER: { + UnitCondition.CURRENT_ACTION: UnitCurrentAction.IDLE, + UnitCondition.IS_ON_GROUND: false, + UnitCondition.MOVING_STATUS: UnitMovingStatus.IDLE, + UnitCondition.IS_INVINCIBLE: false, + }, + UnitType.NPC: { + UnitCondition.CURRENT_ACTION: UnitCurrentAction.IDLE, + UnitCondition.IS_ON_GROUND: false, + UnitCondition.MOVING_STATUS: UnitMovingStatus.IDLE, + }, +} + +# in seconds +const CURRENT_ACTION_TIMERS = { + UnitType.PLAYER: { + UnitCurrentAction.JUMPING: 0.4, + UnitCurrentAction.RECOILING: 0.67, + }, +} + +const UNIT_CONDITION_TIMERS = { + # condition type: [duration, on value, off value] + UnitType.PLAYER: { + UnitCondition.IS_INVINCIBLE: [2.5, true, false], + }, + UnitType.NPC: {}, +} + +# Position relative to player's origin, list of directions to check for collision +const ENV_COLLIDERS = { + UnitType.PLAYER: [ + [Vector2(0, 1.5), [Direction.LEFT, Direction.UP, Direction.RIGHT]], + [Vector2(-.25, .25), [Direction.LEFT]], + [Vector2(.25, .25), [Direction.RIGHT]], + [Vector2(-.25, 1.25), [Direction.LEFT]], + [Vector2(.25, 1.25), [Direction.RIGHT]], + # contact with ground is at (0, 0) + [Vector2(0, 0), [Direction.LEFT, Direction.DOWN, Direction.RIGHT]], + ], + UnitType.NPC: [ + [Vector2(0, 1.5), [Direction.LEFT, Direction.UP, Direction.RIGHT]], + [Vector2(-.25, .25), [Direction.LEFT]], + [Vector2(.25, .25), [Direction.RIGHT]], + [Vector2(-.25, 1.25), [Direction.LEFT]], + [Vector2(.25, 1.25), [Direction.RIGHT]], + [Vector2(0, 0), [Direction.LEFT, Direction.DOWN, Direction.RIGHT]], + ], +} + +const INPUT_MAP = { + PlayerInput.UP: "ui_up", + PlayerInput.DOWN: "ui_down", + PlayerInput.LEFT: "ui_left", + PlayerInput.RIGHT: "ui_right", + PlayerInput.GBA_A: "gba_a", + PlayerInput.GBA_B: "gba_b", + PlayerInput.GBA_START: "gba_start", + PlayerInput.GBA_SELECT: "gba_select", +} + +const TILE_SET_MAP_ELEMS = { + "TestTileSet": { + MapElemType.SQUARE: [0, 1, 2, 3, 4, 5, 6, 7, 8], + MapElemType.SLOPE_LEFT: [15, 16], + MapElemType.SLOPE_RIGHT: [17, 18], + MapElemType.SMALL_SLOPE_LEFT_1: [9], + MapElemType.SMALL_SLOPE_LEFT_2: [10, 11], + MapElemType.SMALL_SLOPE_RIGHT_1: [12], + MapElemType.SMALL_SLOPE_RIGHT_2: [13, 14], + MapElemType.LEDGE: [19, 20, 21, 22], + }, +} + +const UNIT_SPRITES = { + # Sprite-class: [Is-animation?, Nodes] + UnitType.PLAYER: { + SpriteClass.IDLE: [false, ["Idle"]], + SpriteClass.WALK: [true, ["Walk"]], + SpriteClass.JUMP: [false, ["Jump1", "Jump2"]], + SpriteClass.RECOIL: [false, ["Recoil"]], + }, + UnitType.NPC: { + SpriteClass.IDLE: [false, ["Idle"]], + SpriteClass.WALK: [true, ["Walk"]], + SpriteClass.JUMP: [false, ["Jump2"]], + }, +} + +const UNIT_TYPE_MOVE_SPEEDS = { + UnitType.PLAYER: 6, + UnitType.NPC: 3, +} + +const UNIT_TYPE_JUMP_SPEEDS = { + UnitType.PLAYER: 5, +} + +const SCALE_FACTOR = 3.5 +const GRID_SIZE = 20 # pixels +const GRAVITY = 30 +const MAX_FALL_SPEED = -12 +const ACCELERATION = 35 +const QUANTUM_DIST = 0.001 +const SPAWN_DISTANCE = 10 + +# specialized constants +const FLASH_CYCLE = 0.15 diff --git a/Scripts/GameScene.gd b/Scripts/GameScene.gd new file mode 100644 index 0000000..74e54ed --- /dev/null +++ b/Scripts/GameScene.gd @@ -0,0 +1,153 @@ +extends Node + +# _process(delta) is called by this class +# player input is handled here +# unit declares its intention in process_unit() +# stage environment interacts with the unit in interact() +# unit executes its resulting state in react() +# stage environment interacts with the unit once more in interact_post() +class_name GameScene + +export var tile_set_name: String +const Constants = preload("res://Scripts/Constants.gd") +const Unit = preload("res://Scripts/Unit.gd") +const UNIT_DIRECTORY = { + Constants.UnitType.NPC: preload("res://Units/NPC.tscn"), +} + +# positions to unit string +export var spawning : Dictionary +var spawning_map = {} # keeps track of what's alive + +var paused : bool = false + +var units = [] +var player : Player +var player_cam : Camera2D + +# [pressed?, just pressed?, just released?] +var input_table = { + Constants.PlayerInput.UP: [false, false, false], + Constants.PlayerInput.DOWN: [false, false, false], + Constants.PlayerInput.LEFT: [false, false, false], + Constants.PlayerInput.RIGHT: [false, false, false], + Constants.PlayerInput.GBA_A: [false, false, false], + Constants.PlayerInput.GBA_B: [false, false, false], + Constants.PlayerInput.GBA_SELECT: [false, false, false], +} +const I_T_PRESSED : int = 0 +const I_T_JUST_PRESSED : int = 1 +const I_T_JUST_RELEASED : int = 2 + +var stage_env + +var time_elapsed : float = 0 + +var rng = RandomNumberGenerator.new() + +# Called when the node enters the scene tree for the first time. +func _ready(): + units.append(get_node("Player")) + player = units[0] + player.init_unit_w_scene(self) + player_cam = player.get_node("Camera2D") + player_cam.make_current() + + stage_env = load("res://Scripts/StageEnvironment.gd").new(self) + player.get_node("Camera2D").make_current() + for spawning_key in spawning: + spawning_map[spawning_key] = null + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + # visual effects + if (player.facing == Constants.Direction.RIGHT): + player_cam.offset_h = 1 + else: + player_cam.offset_h = -1 + + read_paused() + if not paused: + # game logic + process_spawning() + for unit in units: + unit.reset_actions() + unit.handle_input(delta) + unit.process_unit(delta, time_elapsed) + stage_env.interact(unit, delta) + unit.react(delta) + time_elapsed += delta + +func read_paused(): + if Input.is_action_just_pressed(Constants.INPUT_MAP[Constants.PlayerInput.GBA_START]): + paused = !paused + +func process_spawning(): + for one_spawn in spawning.keys(): + if spawning_map[one_spawn] != null: + continue + if abs(one_spawn[0] - player.pos.x) >= Constants.SPAWN_DISTANCE + 1 or abs(one_spawn[1] - player.pos.y) >= Constants.SPAWN_DISTANCE + 1: + continue + if abs(one_spawn[0] - player.pos.x) <= Constants.SPAWN_DISTANCE: + continue + # NPCUnit + var npc_scene = UNIT_DIRECTORY[Constants.UnitType.get(spawning[one_spawn])] + var npc_instance = npc_scene.instance() + add_child(npc_instance) + units.append(npc_instance) + npc_instance.spawn_point = one_spawn + spawning_map[one_spawn] = npc_instance + npc_instance.pos.x = one_spawn[0] + npc_instance.pos.y = one_spawn[1] + npc_instance.position.x = npc_instance.pos.x * Constants.GRID_SIZE + npc_instance.position.y = -1 * npc_instance.pos.y * Constants.GRID_SIZE + npc_instance.init_unit_w_scene(self) + +func handle_player_input(): + # early exit + + if player.get_current_action() == Constants.UnitCurrentAction.RECOILING: + player.set_action(Constants.ActionType.RECOIL) + return + + for input_num in input_table.keys(): + if Input.is_action_pressed(Constants.INPUT_MAP[input_num]): + input_table[input_num][I_T_PRESSED] = true + input_table[input_num][I_T_JUST_RELEASED] = false + if Input.is_action_just_pressed(Constants.INPUT_MAP[input_num]): + input_table[input_num][I_T_JUST_PRESSED] = true + else: + input_table[input_num][I_T_JUST_PRESSED] = false + else: + input_table[input_num][I_T_PRESSED] = false + input_table[input_num][I_T_JUST_PRESSED] = false + if Input.is_action_just_released(Constants.INPUT_MAP[input_num]): + input_table[input_num][I_T_JUST_RELEASED] = true + else: + input_table[input_num][I_T_JUST_RELEASED] = false + + # process input_table + + if input_table[Constants.PlayerInput.LEFT][I_T_PRESSED] or input_table[Constants.PlayerInput.RIGHT][I_T_PRESSED]: + if input_table[Constants.PlayerInput.LEFT][I_T_PRESSED] and input_table[Constants.PlayerInput.RIGHT][I_T_PRESSED]: + input_table[Constants.PlayerInput.LEFT][I_T_PRESSED] = false + input_table[Constants.PlayerInput.LEFT][I_T_JUST_PRESSED] = false + var input_dir + if input_table[Constants.PlayerInput.LEFT][I_T_PRESSED]: + input_dir = Constants.Direction.LEFT + else: + input_dir = Constants.Direction.RIGHT + # if action-idle or action-jumping + if (player.get_current_action() == Constants.UnitCurrentAction.IDLE + or player.get_current_action() == Constants.UnitCurrentAction.JUMPING): + # set move + player.set_action(Constants.ActionType.MOVE) + # set facing + player.facing = input_dir + + if input_table[Constants.PlayerInput.GBA_A][I_T_PRESSED]: + if (player.get_current_action() == Constants.UnitCurrentAction.JUMPING + or (player.get_current_action() == Constants.UnitCurrentAction.IDLE + and player.unit_conditions[Constants.UnitCondition.IS_ON_GROUND] + and input_table[Constants.PlayerInput.GBA_A][I_T_JUST_PRESSED])): + player.set_action(Constants.ActionType.JUMP) diff --git a/Scripts/GameUtils.gd b/Scripts/GameUtils.gd new file mode 100644 index 0000000..6d38c78 --- /dev/null +++ b/Scripts/GameUtils.gd @@ -0,0 +1,64 @@ +extends Node + +# also returns x, y of intersection +static func path_intersects_border(path_from : Vector2, path_to : Vector2, border_pt_a : Vector2, border_pt_b : Vector2): + # y = mx + b + + # if path is vertical + if path_from.x == path_to.x: + # if border is vertical + if border_pt_a.x == border_pt_b.x: + return [false, Vector2()] + # if border is not vertical + else: + # if path x is not within range + if path_from.x < min(border_pt_a.x, border_pt_b.x) or path_from.x > max(border_pt_a.x, border_pt_b.x): + return [false, Vector2()] + # find m and b and solve for where border intersects with vertical line + var m = get_m(border_pt_b, border_pt_a) + var b = get_b(border_pt_a, m) + var intersect_y = m * path_from.x + b + var intersects : bool = intersect_y >= min(path_from.y, path_to.y) and intersect_y <= max(path_from.y, path_to.y) + return [intersects, Vector2(path_from.x, intersect_y)] + # else if border is vertical + elif border_pt_a.x == border_pt_b.x: + # if border x is not within range + if border_pt_a.x < min(path_from.x, path_to.x) or border_pt_a.x > max(path_from.x, path_to.x): + return [false, Vector2()] + # find m and b and solve for where border intersects with vertical line + var m = get_m(path_to, path_from) + var b = get_b(path_from, m) + var intersect_y = m * border_pt_a.x + b + return [intersect_y >= min(border_pt_a.y, border_pt_b.y) and intersect_y <= max(border_pt_a.y, border_pt_b.y), Vector2(border_pt_a.x, intersect_y)] + # else if path and border are parallel + elif get_m(path_to, path_from) == get_m(border_pt_b, border_pt_a): + return [false, Vector2()] + else: + var path_m = get_m(path_to, path_from) + var path_b = get_b(path_from, path_m) + var border_m = get_m(border_pt_b, border_pt_a) + var border_b = get_b(border_pt_a, border_m) + # m1x + b1 = m2x + b2 + # m1x - m2x = b2 - b1 + # x = (b2 - b1) / (m1 - m2) + var intersect_x = (border_b - path_b) / (path_m - border_m) + return [(intersect_x >= min(border_pt_a.x, border_pt_b.x) and intersect_x <= max(border_pt_a.x, border_pt_b.x) + and intersect_x >= min(path_from.x, path_to.x) and intersect_x <= max(path_from.x, path_to.x)), Vector2(intersect_x, path_m * intersect_x + path_b)] + +static func get_m(pt_a : Vector2, pt_b : Vector2): + return (pt_b.y - pt_a.y) / (pt_b.x - pt_a.x) + +static func get_b(pt : Vector2, m : float): + return pt.y - (m * pt.x) + +static func reangle_move(unit, angle_helper): + # pythagoras + var unit_magnitude = sqrt(pow(unit.h_speed, 2) + pow(unit.v_speed, 2)) + var helper_magnitude = sqrt(pow(angle_helper[1].x - angle_helper[0].x, 2) + pow(angle_helper[1].y - angle_helper[0].y, 2)) + if helper_magnitude == 0: + unit.h_speed = 0 + unit.v_speed = 0 + return + var factor = unit_magnitude / helper_magnitude + unit.h_speed = (angle_helper[1].x - angle_helper[0].x) * factor + unit.v_speed = (angle_helper[1].y - angle_helper[0].y) * factor diff --git a/Scripts/StageEnvironment.gd b/Scripts/StageEnvironment.gd new file mode 100644 index 0000000..4b52c19 --- /dev/null +++ b/Scripts/StageEnvironment.gd @@ -0,0 +1,306 @@ +# Handles unit-environment iteraction +extends Object + +const GameUtils = preload("res://Scripts/GameUtils.gd") +const Constants = preload("res://Scripts/Constants.gd") +const GameScene = preload("res://Scripts/GameScene.gd") +const Unit = preload("res://Scripts/Unit.gd") + +var scene : GameScene + +var colliders = [] +# if unit's move vector has at least one of these directional components, +# do the collision check +var collision_into_direction_arrays = [] # nested array + +var unit_collision_bounds = {} # maps unit type to [upper, lower, left, right] + +func _init(the_scene : GameScene): + scene = the_scene + var stage : TileMap = scene.get_node("Stage") + init_stage_grid(stage) + stage.scale.x = Constants.SCALE_FACTOR + stage.scale.y = Constants.SCALE_FACTOR + # populate unit_collision_bounds + for unit_type in Constants.ENV_COLLIDERS.keys(): + var initial_detect_pt = Constants.ENV_COLLIDERS[unit_type][0] + var upper : float = initial_detect_pt[0].y + var lower : float = initial_detect_pt[0].y + var left : float = initial_detect_pt[0].x + var right: float = initial_detect_pt[0].x + for detect_pt in Constants.ENV_COLLIDERS[unit_type]: + if (detect_pt[1].find(Constants.Direction.UP) != -1 + and detect_pt[0].y > upper): + upper = detect_pt[0].y + if (detect_pt[1].find(Constants.Direction.DOWN) != -1 + and detect_pt[0].y < lower): + lower = detect_pt[0].y + if (detect_pt[1].find(Constants.Direction.LEFT) != -1 + and detect_pt[0].x < left): + left = detect_pt[0].x + if (detect_pt[1].find(Constants.Direction.RIGHT) != -1 + and detect_pt[0].x > right): + right = detect_pt[0].x + unit_collision_bounds[unit_type] = [upper, lower, left, right] + +func init_stage_grid(tilemap : TileMap): + for map_elem in tilemap.get_used_cells(): + var stage_x = floor(tilemap.map_to_world(map_elem).x / Constants.GRID_SIZE) + var stage_y = floor(-1 * tilemap.map_to_world(map_elem).y / Constants.GRID_SIZE) - 1 + var map_elem_type : int + var cellv = tilemap.get_cellv(map_elem) + var found_map_elem_type : bool = false + for test_map_elem_type in [ + Constants.MapElemType.SQUARE, + Constants.MapElemType.SLOPE_LEFT, + Constants.MapElemType.SLOPE_RIGHT, + Constants.MapElemType.SMALL_SLOPE_LEFT_1, + Constants.MapElemType.SMALL_SLOPE_LEFT_2, + Constants.MapElemType.SMALL_SLOPE_RIGHT_1, + Constants.MapElemType.SMALL_SLOPE_RIGHT_2, + Constants.MapElemType.LEDGE]: + for test_cell_v in Constants.TILE_SET_MAP_ELEMS[scene.tile_set_name][test_map_elem_type]: + if test_cell_v == cellv: + map_elem_type = test_map_elem_type + found_map_elem_type = true + break + if found_map_elem_type: + break + match map_elem_type: + Constants.MapElemType.SQUARE: + insert_grid_collider(stage_x, stage_y, Constants.Direction.UP, 1) + insert_grid_collider(stage_x, stage_y, Constants.Direction.DOWN, 1) + insert_grid_collider(stage_x, stage_y, Constants.Direction.LEFT, 1) + insert_grid_collider(stage_x, stage_y, Constants.Direction.RIGHT, 1) + Constants.MapElemType.SLOPE_LEFT: + try_insert_collider( + Vector2(stage_x, stage_y), + Vector2(stage_x + 1, stage_y + 1), + [Constants.Direction.RIGHT, Constants.Direction.DOWN] + ) + insert_grid_collider(stage_x, stage_y, Constants.Direction.LEFT, 1) + insert_grid_collider(stage_x, stage_y, Constants.Direction.UP, 1) + Constants.MapElemType.SLOPE_RIGHT: + try_insert_collider( + Vector2(stage_x, stage_y + 1), + Vector2(stage_x + 1, stage_y), + [Constants.Direction.LEFT, Constants.Direction.DOWN] + ) + insert_grid_collider(stage_x, stage_y, Constants.Direction.RIGHT, 1) + insert_grid_collider(stage_x, stage_y, Constants.Direction.UP, 1) + Constants.MapElemType.SMALL_SLOPE_LEFT_1: + try_insert_collider( + Vector2(stage_x, stage_y), + Vector2(stage_x + 1, stage_y + .5), + [Constants.Direction.RIGHT, Constants.Direction.DOWN] + ) + insert_grid_collider(stage_x, stage_y, Constants.Direction.LEFT, .5) + insert_grid_collider(stage_x, stage_y, Constants.Direction.UP, 1) + Constants.MapElemType.SMALL_SLOPE_LEFT_2: + try_insert_collider( + Vector2(stage_x, stage_y + .5), + Vector2(stage_x + 1, stage_y + 1), + [Constants.Direction.RIGHT, Constants.Direction.DOWN] + ) + insert_grid_collider(stage_x, stage_y, Constants.Direction.RIGHT, .5) + insert_grid_collider(stage_x, stage_y, Constants.Direction.LEFT, 1) + insert_grid_collider(stage_x, stage_y, Constants.Direction.UP, 1) + Constants.MapElemType.SMALL_SLOPE_RIGHT_1: + try_insert_collider( + Vector2(stage_x, stage_y + .5), + Vector2(stage_x + 1, stage_y), + [Constants.Direction.LEFT, Constants.Direction.DOWN] + ) + insert_grid_collider(stage_x, stage_y, Constants.Direction.RIGHT, .5) + insert_grid_collider(stage_x, stage_y, Constants.Direction.UP, 1) + Constants.MapElemType.SMALL_SLOPE_RIGHT_2: + try_insert_collider( + Vector2(stage_x, stage_y + 1), + Vector2(stage_x + 1, stage_y + .5), + [Constants.Direction.LEFT, Constants.Direction.DOWN] + ) + insert_grid_collider(stage_x, stage_y, Constants.Direction.RIGHT, 1) + insert_grid_collider(stage_x, stage_y, Constants.Direction.LEFT, .5) + insert_grid_collider(stage_x, stage_y, Constants.Direction.UP, 1) + Constants.MapElemType.LEDGE: + insert_grid_collider(stage_x, stage_y, Constants.Direction.DOWN, 1) + +func insert_grid_collider(stage_x, stage_y, direction : int, fractional_height : float): + var check_colliders = [] + var insert_colliders = [] + var point_a : Vector2 + var point_b : Vector2 + match direction: + Constants.Direction.UP: + point_a = Vector2(stage_x, stage_y) + point_b = Vector2(stage_x + 1, stage_y) + Constants.Direction.DOWN: + point_a = Vector2(stage_x, stage_y + 1) + point_b = Vector2(stage_x + 1, stage_y + 1) + Constants.Direction.LEFT: + point_a = Vector2(stage_x + 1, stage_y + (1 * fractional_height)) + point_b = Vector2(stage_x + 1, stage_y) + Constants.Direction.RIGHT: + point_a = Vector2(stage_x, stage_y + (1 * fractional_height)) + point_b = Vector2(stage_x, stage_y) + try_insert_collider(point_a, point_b, [direction]) + +func try_insert_collider(point_a : Vector2, point_b : Vector2, directions : Array): + if directions.size() == 1: + # aligned with grid + for i in range(len(colliders)): + if (colliders[i][0] == point_a + and colliders[i][1] == point_b + and are_inverse_directions(collision_into_direction_arrays[i][0], directions[0])): + colliders.remove(i) + collision_into_direction_arrays.remove(i) + return + colliders.append([point_a, point_b]) + collision_into_direction_arrays.append(directions) + +func are_inverse_directions(d1, d2): + return ((d1 == Constants.Direction.LEFT and d2 == Constants.Direction.RIGHT) + or (d1 == Constants.Direction.RIGHT and d2 == Constants.Direction.LEFT) + or (d1 == Constants.Direction.UP and d2 == Constants.Direction.DOWN) + or (d1 == Constants.Direction.DOWN and d2 == Constants.Direction.UP)) + +func interact(unit : Unit, delta): + if unit.unit_conditions[Constants.UnitCondition.IS_ON_GROUND]: + if unit.v_speed < 0: + # reassign the move speeds so that it reflects the true movement + reangle_grounded_move(unit) + else: + # apply gravity + unit.v_speed = max(unit.v_speed - (Constants.GRAVITY * delta), Constants.MAX_FALL_SPEED) + if not unit.h_speed == 0 or not unit.v_speed == 0: + # regular collision + for i in range(colliders.size()): + if check_collision(unit, colliders[i], collision_into_direction_arrays[i], delta): + break + # Do this a second time in case the unit's new move displacement needs + # fixing + for i in range(colliders.size()): + if check_collision(unit, colliders[i], collision_into_direction_arrays[i], delta): + break + +func reangle_grounded_move(unit : Unit): + var has_ground_collision : bool = false + for i in range(colliders.size()): + var collider = colliders[i] + var collision_into_directions = collision_into_direction_arrays[i] + if collider[0].x == collider[1].x: + continue + if collision_early_exit(unit, collider, collision_into_directions): + continue + if collision_into_directions.find(Constants.Direction.DOWN) == -1: + continue + # returns [collision?, x, y] + var intersects_results = GameUtils.path_intersects_border( + Vector2(unit.pos.x, unit.pos.y), + Vector2(unit.pos.x, unit.pos.y - .5), + collider[0], + collider[1]) + if intersects_results[0]: + has_ground_collision = true + unit.pos.y = intersects_results[1].y + Constants.QUANTUM_DIST + unit.last_contacted_ground_collider = collider + reangle_move(unit, collider, true) + if !has_ground_collision: + reangle_move(unit, unit.last_contacted_ground_collider, true) + unit.set_unit_condition(Constants.UnitCondition.IS_ON_GROUND, false) + +# nullify_h_speed should be true if we are reangling a ground movement vector +func reangle_move(unit : Unit, collider, nullify_h_speed : bool): + var angle_helper + if unit.h_speed > 0: + angle_helper = collider + else: + angle_helper = [collider[1], collider[0]] + if nullify_h_speed: + unit.h_speed = 0 + GameUtils.reangle_move(unit, angle_helper) + +func check_collision(unit : Unit, collider, collision_into_directions, delta): + if collision_early_exit(unit, collider, collision_into_directions): + return false + var is_ground_collision : bool = collision_into_directions.find(Constants.Direction.DOWN) != -1 + for unit_env_collider in Constants.ENV_COLLIDERS[unit.unit_type]: + if unit_env_collider_early_exit(unit_env_collider[1], collision_into_directions): + continue + var collision_check_location : Vector2 = unit.pos + unit_env_collider[0] + var collision_check_try_location : Vector2 = collision_check_location + Vector2(unit.h_speed * delta, unit.v_speed * delta) + # returns [collision?, (x, y)] + var intersects_results = GameUtils.path_intersects_border( + collision_check_location, + collision_check_try_location, + collider[0], + collider[1]) + if intersects_results[0]: + if is_ground_collision: + if unit_env_collider[0] == Vector2(0, 0): + unit.pos.y = intersects_results[1].y + Constants.QUANTUM_DIST + unit.pos.x = intersects_results[1].x + if unit.unit_conditions[Constants.UnitCondition.IS_ON_GROUND]: + # preserve magnitude + reangle_move(unit, collider, false) + else: + if unit.get_current_action() != Constants.UnitCurrentAction.JUMPING: + unit.set_unit_condition(Constants.UnitCondition.IS_ON_GROUND, true) + # landed on ground, horizontal component to become magnitude + unit.v_speed = 0 + reangle_move(unit, collider, false) + else: + if collider[0].x == collider[1].x: + # vertical wall collision + var new_cc_x : float + if unit.h_speed < 0: + new_cc_x = intersects_results[1].x + Constants.QUANTUM_DIST + else: + new_cc_x = intersects_results[1].x - Constants.QUANTUM_DIST + var target_h_speed : float = (new_cc_x - collision_check_location.x) / delta + var factor : float = target_h_speed / unit.h_speed + unit.h_speed *= factor + if unit.get_condition(Constants.UnitCondition.IS_ON_GROUND, false): + # also shorten vertical component to preserve move vector direction + unit.v_speed *= factor + else: + # ceiling collision (horizontal only for now) + var new_cc_y : float = intersects_results[1].y - Constants.QUANTUM_DIST + unit.v_speed = (new_cc_y - collision_check_location.y) / delta + if unit.get_current_action() == Constants.UnitCurrentAction.JUMPING: + unit.set_current_action(Constants.UnitCurrentAction.IDLE) + if !is_ground_collision or unit_env_collider[0] == Vector2(0, 0): + # return true if there's a collision + # don't return true if it's a ground collision but the unit environment collider is not the (0, 0) collider + return true + return false + +func collision_early_exit(unit : Unit, collider, collision_into_directions): + if (collider[0].y > unit.pos.y + unit_collision_bounds[unit.unit_type][0] + 1 + and collider[1].y > unit.pos.y + unit_collision_bounds[unit.unit_type][0] + 1): + return true + if (collider[0].y < unit.pos.y + unit_collision_bounds[unit.unit_type][1] - 1 + and collider[1].y < unit.pos.y + unit_collision_bounds[unit.unit_type][1] - 1): + return true + if collider[1].x < unit.pos.x + unit_collision_bounds[unit.unit_type][2] - 1: + return true + if collider[0].x > unit.pos.x + unit_collision_bounds[unit.unit_type][3] + 1: + return true + for collision_into_direction in collision_into_directions: + if collision_into_direction == Constants.Direction.UP and unit.v_speed > 0: + return false + if collision_into_direction == Constants.Direction.DOWN and unit.v_speed < 0: + return false + if collision_into_direction == Constants.Direction.LEFT and unit.h_speed < 0: + return false + if collision_into_direction == Constants.Direction.RIGHT and unit.h_speed > 0: + return false + return true + +func unit_env_collider_early_exit(env_collider_directions, collision_into_directions): + var found_matching_direction : bool = false + for env_collider_direction in env_collider_directions: + for collision_into_direction in collision_into_directions: + if env_collider_direction == collision_into_direction: + return false + return true diff --git a/Scripts/Unit.gd b/Scripts/Unit.gd new file mode 100644 index 0000000..7899dae --- /dev/null +++ b/Scripts/Unit.gd @@ -0,0 +1,282 @@ +extends Area2D + +# base class for units +# we assume every unit can move and jump so we see their handlers here +# sprite management is handled here (and subclasses) as well +class_name Unit + + +const Constants = preload("res://Scripts/Constants.gd") +const GameUtils = preload("res://Scripts/GameUtils.gd") + +var scene + +# position +export var unit_type : int + +var actions = {} +var unit_conditions = {} +var facing : int = Constants.Direction.RIGHT +var current_action_time_elapsed : float = 0 +var unit_condition_timers = {} + +var pos : Vector2 +var h_speed : float = 0 +var v_speed : float = 0 +var target_move_speed : float +var last_contacted_ground_collider : Array + +var current_sprite : Node2D +var sprite_class_nodes = {} # sprite class to node list dictionary + +var hit_queued : bool = false +var hit_dir : int +var time_elapsed : float +var is_flash : bool = false +var flash_start_timestamp : float + +# Called when the node enters the scene tree for the first time +func _ready(): + for action_num in Constants.UNIT_TYPE_ACTIONS[unit_type]: + actions[action_num] = false + for condition_num in Constants.UNIT_TYPE_CONDITIONS[unit_type].keys(): + set_unit_condition(condition_num, Constants.UNIT_TYPE_CONDITIONS[unit_type][condition_num]) + for condition_num in Constants.UNIT_CONDITION_TIMERS[unit_type].keys(): + unit_condition_timers[condition_num] = 0 + target_move_speed = Constants.UNIT_TYPE_MOVE_SPEEDS[unit_type] + + # populate sprite_class_nodes + for sprite_class in Constants.UNIT_SPRITES[unit_type]: + sprite_class_nodes[sprite_class] = [] + for node_name in Constants.UNIT_SPRITES[unit_type][sprite_class][1]: + sprite_class_nodes[sprite_class].append(get_node(node_name)) + + pos = Vector2(position.x / Constants.GRID_SIZE, -1 * position.y / Constants.GRID_SIZE) + position.x = position.x * Constants.SCALE_FACTOR + position.y = position.y * Constants.SCALE_FACTOR + scale.x = Constants.SCALE_FACTOR + scale.y = Constants.SCALE_FACTOR + +func init_unit_w_scene(scene): + self.scene = scene + +func set_action(action : int): + assert(action in Constants.UNIT_TYPE_ACTIONS[unit_type]) + actions[action] = true + +func set_unit_condition(condition_type : int, condition): + assert(condition_type in Constants.UNIT_TYPE_CONDITIONS[unit_type].keys()) + unit_conditions[condition_type] = condition + +func set_unit_condition_with_timer(condition_type : int): + assert(condition_type in Constants.UNIT_CONDITION_TIMERS[unit_type].keys()) + set_unit_condition(condition_type, Constants.UNIT_CONDITION_TIMERS[unit_type][condition_type][1]) + unit_condition_timers[condition_type] = Constants.UNIT_CONDITION_TIMERS[unit_type][condition_type][0] + +func get_condition(condition_num : int, default): + if condition_num in Constants.UNIT_TYPE_CONDITIONS[unit_type].keys(): + return unit_conditions[condition_num] + else: + return default + +func is_current_action_timer_done(current_action : int): + assert(current_action in Constants.CURRENT_ACTION_TIMERS[unit_type].keys()) + return current_action_time_elapsed >= Constants.CURRENT_ACTION_TIMERS[unit_type][current_action] + +func reset_actions(): + for action_num in Constants.UNIT_TYPE_ACTIONS[unit_type]: + actions[action_num] = false + +func process_unit(delta, time_elapsed : float): + current_action_time_elapsed += delta + execute_actions(delta) + handle_idle() + advance_timers(delta) + handle_moving_status(delta) + handle_recoil() # must be after handle_moving_status + reset_current_action() + self.time_elapsed = time_elapsed + +func advance_timers(delta): + for condition_num in Constants.UNIT_CONDITION_TIMERS[unit_type].keys(): + unit_condition_timers[condition_num] = move_toward(unit_condition_timers[condition_num], 0, delta) + if unit_condition_timers[condition_num] == 0: + set_unit_condition(condition_num, Constants.UNIT_CONDITION_TIMERS[unit_type][condition_num][2]) + if condition_num == Constants.UnitCondition.IS_INVINCIBLE: + invincibility_ended() + +func reset_current_action(): + # process CURRENT_ACTION + if get_current_action() == Constants.UnitCurrentAction.JUMPING: + if not actions[Constants.ActionType.JUMP]: + set_current_action(Constants.UnitCurrentAction.IDLE) + # process MOVING_STATUS + if not actions[Constants.ActionType.MOVE]: + set_unit_condition(Constants.UnitCondition.MOVING_STATUS, Constants.UnitMovingStatus.IDLE) + +func handle_input(delta): + # implemented in subclass + pass + +func get_current_action(): + return unit_conditions[Constants.UnitCondition.CURRENT_ACTION] + +func set_current_action(current_action : int): + assert(current_action in Constants.UNIT_TYPE_CURRENT_ACTIONS[unit_type]) + if get_current_action() != current_action: + current_action_time_elapsed = 0 + set_unit_condition(Constants.UnitCondition.CURRENT_ACTION, current_action) + +func execute_actions(delta): + for action_num in Constants.UNIT_TYPE_ACTIONS[unit_type]: + if !actions[action_num]: + continue + match action_num: + Constants.ActionType.JUMP: + jump() + Constants.ActionType.MOVE: + move() + +func jump(): + set_current_action(Constants.UnitCurrentAction.JUMPING) + if (unit_conditions[Constants.UnitCondition.IS_ON_GROUND]): + # hit ground + v_speed = max(Constants.UNIT_TYPE_JUMP_SPEEDS[unit_type], v_speed) + else: + # airborne + v_speed = max(Constants.UNIT_TYPE_JUMP_SPEEDS[unit_type], move_toward(v_speed, Constants.UNIT_TYPE_JUMP_SPEEDS[unit_type], get_process_delta_time() * Constants.GRAVITY)) + set_unit_condition(Constants.UnitCondition.IS_ON_GROUND, false) + if get_current_action() == Constants.UnitCurrentAction.JUMPING and v_speed > 0: + set_sprite(Constants.SpriteClass.JUMP, 0) + if is_current_action_timer_done(Constants.UnitCurrentAction.JUMPING): + set_current_action(Constants.UnitCurrentAction.IDLE) + + +func move(): + set_unit_condition(Constants.UnitCondition.MOVING_STATUS, Constants.UnitMovingStatus.MOVING) + if (get_current_action() == Constants.UnitCurrentAction.IDLE + and unit_conditions[Constants.UnitCondition.IS_ON_GROUND]): + set_sprite(Constants.SpriteClass.WALK) + +func handle_recoil(): + # implemented in subclass + pass + +func handle_moving_status(delta): + # what we have: facing, current speed, move status, grounded + # we want: to set the new intended speed + var magnitude : float + if unit_conditions[Constants.UnitCondition.IS_ON_GROUND]: + magnitude = sqrt(pow(v_speed, 2) + pow(h_speed, 2)) + else: + magnitude = abs(h_speed) + + # if move status is idle + if unit_conditions[Constants.UnitCondition.MOVING_STATUS] == Constants.UnitMovingStatus.IDLE: + # slow down + magnitude = move_toward(magnitude, 0, Constants.ACCELERATION * delta) + # if move status is not idle + else: + # if is facing-aligned + if (h_speed <= 0 and facing == Constants.Direction.LEFT) or (h_speed >= 0 and facing == Constants.Direction.RIGHT): + # speed up + magnitude = move_toward(magnitude, target_move_speed, Constants.ACCELERATION * delta) + # if is not facing-aligned + else: + # slow down + magnitude = move_toward(magnitude, 0, Constants.ACCELERATION * delta) + + # if is grounded + if unit_conditions[Constants.UnitCondition.IS_ON_GROUND]: + # make magnitude greater than quantum distance + if magnitude > 0 and magnitude < Constants.QUANTUM_DIST: + magnitude = Constants.QUANTUM_DIST * 2 + + # make move vector point down + if magnitude > 0: + if h_speed > 0: + h_speed = Constants.QUANTUM_DIST # preserve h direction + elif h_speed < 0: + h_speed = -1 * Constants.QUANTUM_DIST + else: + # from still to moving + if facing == Constants.Direction.RIGHT: + h_speed = Constants.QUANTUM_DIST + else: + h_speed = -1 * Constants.QUANTUM_DIST + else: + h_speed = 0 + v_speed = -1 * magnitude + # if is not grounded + else: + # set h_speed + if magnitude > 0: + if h_speed > 0: + h_speed = magnitude + elif h_speed < 0: + h_speed = -1 * magnitude + else: + # from no lateral movement to having lateral movement + if facing == Constants.Direction.RIGHT: + h_speed = magnitude + else: + h_speed = -1 * magnitude + else: + h_speed = 0 + +func handle_idle(): + if get_current_action() == Constants.UnitCurrentAction.IDLE: + if unit_conditions[Constants.UnitCondition.IS_ON_GROUND]: + if unit_conditions[Constants.UnitCondition.MOVING_STATUS] == Constants.UnitMovingStatus.IDLE: + set_sprite(Constants.SpriteClass.IDLE) + elif v_speed > 0: + set_sprite(Constants.SpriteClass.JUMP, 0) + else: + set_sprite(Constants.SpriteClass.JUMP, 1) + +func set_sprite(sprite_class : int, index : int = 0): + assert(unit_type in Constants.UNIT_SPRITES) + assert(sprite_class in Constants.UNIT_SPRITES[unit_type]) + var node_list = sprite_class_nodes[sprite_class] + var true_index : int = index + if true_index > len(node_list) - 1: + true_index = 0 + var new_sprite : Node2D = node_list[true_index] + if (is_flash): + if int((time_elapsed - flash_start_timestamp) / Constants.FLASH_CYCLE) % 2 == 1: + new_sprite.set_modulate(Color(2, 1, 1)) + else: + new_sprite.set_modulate(Color(1, .5, .5)) + else: + new_sprite.set_modulate(Color(1, 1, 1)) + if current_sprite == null or current_sprite != new_sprite: + if current_sprite != null: + current_sprite.visible = false + current_sprite = new_sprite + current_sprite.visible = true + if (Constants.UNIT_SPRITES[unit_type][sprite_class][0]): + current_sprite.set_frame(0) + current_sprite.play() + if facing == Constants.Direction.LEFT: + current_sprite.scale.x = -1 + else: + current_sprite.scale.x = 1 + +func react(delta): + pos.x = pos.x + h_speed * delta + pos.y = pos.y + v_speed * delta + position.x = pos.x * Constants.GRID_SIZE * Constants.SCALE_FACTOR + position.y = -1 * pos.y * Constants.GRID_SIZE * Constants.SCALE_FACTOR + +func hit(dir : int): + # implemented in subclass + hit_queued = true + hit_dir = dir + +func start_flash(): + is_flash = true + flash_start_timestamp = time_elapsed + +func invincibility_ended(): + # implemented in subclass + pass diff --git a/Scripts/Units/NPCExample.gd b/Scripts/Units/NPCExample.gd new file mode 100644 index 0000000..ca7c3b7 --- /dev/null +++ b/Scripts/Units/NPCExample.gd @@ -0,0 +1,8 @@ +extends NPCUnit + + +func before_tick(): + if scene.rng.randf() < 0.5: + facing = Constants.Direction.RIGHT + else: + facing = Constants.Direction.LEFT diff --git a/Scripts/Units/NPCUnit.gd b/Scripts/Units/NPCUnit.gd new file mode 100644 index 0000000..0ada413 --- /dev/null +++ b/Scripts/Units/NPCUnit.gd @@ -0,0 +1,79 @@ +extends Unit + +class_name NPCUnit + +var spawn_point : Vector2 + +export var tick_duration : float +var tick_timer : float = 0 + +export(Dictionary) var action_sequence_map # action sequence to weight, [] = do nothing +# action sequence is an array of action type and an array of timestamps +# action type is the string representation of Constants.ActionType +# example action map: {[[action1], [0]]: 1, [[action2, action3], [0, 1]]: 2} +var weight_sum : float + +export var action_duration_map = {} # specific durations for given action +var current_npc_action_times_elapsed = {} +var current_npc_action_active = {} + +var current_action_sequence = null +var current_action_sequence_time_elapsed : float = 0 +var current_action_sequence_index : int = 0 + +func _ready(): + for action_sequence in action_sequence_map.keys(): + weight_sum += action_sequence_map[action_sequence] + for action in action_duration_map: + current_npc_action_times_elapsed[action] = 0 + current_npc_action_active[action] = false + +func before_tick(): + pass + +func handle_input(delta): + if current_action_sequence != null: + for action in current_npc_action_active: + if current_npc_action_active[action]: + if current_npc_action_times_elapsed[action] < action_duration_map[action]: + set_action(Constants.ActionType.get(action)) + current_npc_action_times_elapsed[action] += delta + else: + current_npc_action_active[action] = false + if (current_action_sequence_index < current_action_sequence[1].size() + and current_action_sequence_time_elapsed >= current_action_sequence[1][current_action_sequence_index]): + var action = current_action_sequence[0][current_action_sequence_index] + set_action(Constants.ActionType.get(action)) + if action_duration_map.has(action): + current_npc_action_active[action] = true + current_npc_action_times_elapsed[action] = 0 + current_action_sequence_index += 1 + var current_action_sequence_duration : float = current_action_sequence[1][-1] + if action_duration_map.has(current_action_sequence[0][-1]): + current_action_sequence_duration += action_duration_map[current_action_sequence[0][-1]] + if current_action_sequence_time_elapsed > current_action_sequence_duration: + reset_npc_unit() + current_action_sequence_time_elapsed += delta + else: + if tick_timer == 0: + before_tick() + var rand_num : float = scene.rng.randf() * weight_sum + var temp_sum : float = 0 + for action_sequence in action_sequence_map.keys(): + temp_sum += action_sequence_map[action_sequence] + if temp_sum >= rand_num: + if action_sequence == []: + tick_timer = tick_duration + else: + current_action_sequence = action_sequence + current_action_sequence_time_elapsed = 0 + current_action_sequence_index = 0 + break + else: + tick_timer = max(0, tick_timer - delta) + +func reset_npc_unit(): + current_action_sequence = null + tick_timer = tick_duration + for action in current_npc_action_active: + current_npc_action_active[action] = false diff --git a/Scripts/Units/Player.gd b/Scripts/Units/Player.gd new file mode 100644 index 0000000..19bcc62 --- /dev/null +++ b/Scripts/Units/Player.gd @@ -0,0 +1,92 @@ +extends Unit + +# Player-specific code +class_name Player + +const RECOIL_PUSHBACK = 15 + +func _init(): + pos = Vector2(position.x / Constants.GRID_SIZE, -1 * position.y / Constants.GRID_SIZE) + position.x = position.x * Constants.SCALE_FACTOR + position.y = position.y * Constants.SCALE_FACTOR + +func execute_actions(delta): + .execute_actions(delta) + for action_num in Constants.UNIT_TYPE_ACTIONS[Constants.UnitType.PLAYER]: + if !actions[action_num]: + continue + match action_num: + # handle custom actions + Constants.ActionType.RECOIL: + recoil() + _: + pass + +func recoil(): + if is_current_action_timer_done(Constants.UnitCurrentAction.RECOILING): + set_current_action(Constants.UnitCurrentAction.IDLE) + else: + set_current_action(Constants.UnitCurrentAction.RECOILING) + set_sprite(Constants.SpriteClass.RECOIL) + +func handle_input(delta): + scene.handle_player_input() + +func _on_Player_area_entered(area: Area2D) -> void: + if get_condition(Constants.UnitCondition.IS_INVINCIBLE, false): + return + if area is Unit: + hit_from_area(area) + +func hit_from_area(other_area : Area2D): + var collision_dir : int + if other_area.position > position: + collision_dir = Constants.Direction.RIGHT + else: + collision_dir = Constants.Direction.LEFT + hit(collision_dir) + +func hit(dir : int): + .hit(dir) + set_unit_condition_with_timer(Constants.UnitCondition.IS_INVINCIBLE) + start_flash() + set_action(Constants.ActionType.RECOIL) + set_current_action(Constants.UnitCurrentAction.RECOILING) + set_unit_condition(Constants.UnitCondition.MOVING_STATUS, Constants.UnitMovingStatus.IDLE) + +func invincibility_ended(): + is_flash = false + if get_overlapping_areas().size() > 0: + if get_overlapping_areas()[0] is Unit: + hit_from_area(get_overlapping_areas()[0]) + +func handle_recoil(): + if not hit_queued: + return + hit_queued = false + if get_condition(Constants.UnitCondition.IS_ON_GROUND, true): + if h_speed > 0: + if hit_dir == Constants.Direction.LEFT: + v_speed -= RECOIL_PUSHBACK + else: + v_speed += RECOIL_PUSHBACK + elif h_speed < 0: + if hit_dir == Constants.Direction.LEFT: + v_speed += RECOIL_PUSHBACK + else: + v_speed -= RECOIL_PUSHBACK + else: + v_speed = -RECOIL_PUSHBACK + if hit_dir == Constants.Direction.LEFT: + h_speed = Constants.QUANTUM_DIST + else: + h_speed = -Constants.QUANTUM_DIST + if v_speed > 0: + h_speed *= -1 + v_speed = -v_speed + else: + if hit_dir == Constants.Direction.LEFT: + h_speed += RECOIL_PUSHBACK + else: + h_speed -= RECOIL_PUSHBACK + facing = hit_dir diff --git a/Tile Sets/TestTileSet.tres b/Tile Sets/TestTileSet.tres new file mode 100644 index 0000000..a296c38 --- /dev/null +++ b/Tile Sets/TestTileSet.tres @@ -0,0 +1,335 @@ +[gd_resource type="TileSet" load_steps=10 format=2] + +[ext_resource path="res://Graphics/Tiles/PalaceTileSet.png" type="Texture" id=1] +[ext_resource path="res://Graphics/Tiles/slope/SlopeLeft2Borderless.png" type="Texture" id=2] +[ext_resource path="res://Graphics/Tiles/slope/SlopeLeftBorder.png" type="Texture" id=3] +[ext_resource path="res://Graphics/Tiles/slope/SlopeRightBorder.png" type="Texture" id=4] +[ext_resource path="res://Graphics/Tiles/slope/SlopeRightBorderless.png" type="Texture" id=5] +[ext_resource path="res://Graphics/Tiles/ledge/LedgeLeft.png" type="Texture" id=6] +[ext_resource path="res://Graphics/Tiles/ledge/LedgeMiddle.png" type="Texture" id=7] +[ext_resource path="res://Graphics/Tiles/ledge/LedgeRight.png" type="Texture" id=8] +[ext_resource path="res://Graphics/Tiles/ledge/LedgeSingle.png" type="Texture" id=9] + +[resource] +0/name = "PalaceTileSet.png 0" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 276, 20, 20, 20 ) +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 = "PalaceTileSet.png 1" +1/texture = ExtResource( 1 ) +1/tex_offset = Vector2( 0, 0 ) +1/modulate = Color( 1, 1, 1, 1 ) +1/region = Rect2( 296, 20, 20, 20 ) +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_one_way = false +1/shape_one_way_margin = 0.0 +1/shapes = [ ] +1/z_index = 0 +2/name = "PalaceTileSet.png 2" +2/texture = ExtResource( 1 ) +2/tex_offset = Vector2( 0, 0 ) +2/modulate = Color( 1, 1, 1, 1 ) +2/region = Rect2( 316, 20, 20, 20 ) +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 = "PalaceTileSet.png 3" +3/texture = ExtResource( 1 ) +3/tex_offset = Vector2( 0, 0 ) +3/modulate = Color( 1, 1, 1, 1 ) +3/region = Rect2( 276, 40, 20, 20 ) +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 = "PalaceTileSet.png 4" +4/texture = ExtResource( 1 ) +4/tex_offset = Vector2( 0, 0 ) +4/modulate = Color( 1, 1, 1, 1 ) +4/region = Rect2( 296, 40, 20, 20 ) +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 = "PalaceTileSet.png 5" +5/texture = ExtResource( 1 ) +5/tex_offset = Vector2( 0, 0 ) +5/modulate = Color( 1, 1, 1, 1 ) +5/region = Rect2( 316, 40, 20, 20 ) +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_one_way = false +5/shape_one_way_margin = 0.0 +5/shapes = [ ] +5/z_index = 0 +6/name = "PalaceTileSet.png 6" +6/texture = ExtResource( 1 ) +6/tex_offset = Vector2( 0, 0 ) +6/modulate = Color( 1, 1, 1, 1 ) +6/region = Rect2( 276, 60, 20, 20 ) +6/tile_mode = 0 +6/occluder_offset = Vector2( 0, 0 ) +6/navigation_offset = Vector2( 0, 0 ) +6/shape_offset = Vector2( 0, 0 ) +6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +6/shape_one_way = false +6/shape_one_way_margin = 0.0 +6/shapes = [ ] +6/z_index = 0 +7/name = "PalaceTileSet.png 7" +7/texture = ExtResource( 1 ) +7/tex_offset = Vector2( 0, 0 ) +7/modulate = Color( 1, 1, 1, 1 ) +7/region = Rect2( 296, 60, 20, 20 ) +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 = "PalaceTileSet.png 8" +8/texture = ExtResource( 1 ) +8/tex_offset = Vector2( 0, 0 ) +8/modulate = Color( 1, 1, 1, 1 ) +8/region = Rect2( 316, 60, 20, 20 ) +8/tile_mode = 0 +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 = 0 +9/name = "PalaceTileSet.png 9" +9/texture = ExtResource( 1 ) +9/tex_offset = Vector2( 0, 0 ) +9/modulate = Color( 1, 1, 1, 1 ) +9/region = Rect2( 336, 0, 20, 20 ) +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 = "PalaceTileSet.png 10" +10/texture = ExtResource( 1 ) +10/tex_offset = Vector2( 0, 0 ) +10/modulate = Color( 1, 1, 1, 1 ) +10/region = Rect2( 356, 0, 20, 20 ) +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_one_way = false +10/shape_one_way_margin = 0.0 +10/shapes = [ ] +10/z_index = 0 +11/name = "PalaceTileSet.png 11" +11/texture = ExtResource( 1 ) +11/tex_offset = Vector2( 0, 0 ) +11/modulate = Color( 1, 1, 1, 1 ) +11/region = Rect2( 356, 40, 20, 20 ) +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 = "PalaceTileSet.png 12" +12/texture = ExtResource( 1 ) +12/tex_offset = Vector2( 0, 0 ) +12/modulate = Color( 1, 1, 1, 1 ) +12/region = Rect2( 396, 0, 20, 20 ) +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 = "PalaceTileSet.png 13" +13/texture = ExtResource( 1 ) +13/tex_offset = Vector2( 0, 0 ) +13/modulate = Color( 1, 1, 1, 1 ) +13/region = Rect2( 376, 0, 20, 20 ) +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 = "PalaceTileSet.png 14" +14/texture = ExtResource( 1 ) +14/tex_offset = Vector2( 0, 0 ) +14/modulate = Color( 1, 1, 1, 1 ) +14/region = Rect2( 376, 40, 20, 20 ) +14/tile_mode = 0 +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 = "SlopeLeft2Borderless.png 15" +15/texture = ExtResource( 2 ) +15/tex_offset = Vector2( 0, 0 ) +15/modulate = Color( 1, 1, 1, 1 ) +15/region = Rect2( 0, 0, 20, 20 ) +15/tile_mode = 0 +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 = "SlopeLeftBorder.png 16" +16/texture = ExtResource( 3 ) +16/tex_offset = Vector2( 0, 0 ) +16/modulate = Color( 1, 1, 1, 1 ) +16/region = Rect2( 0, 0, 20, 20 ) +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 = "SlopeRightBorder.png 17" +17/texture = ExtResource( 4 ) +17/tex_offset = Vector2( 0, 0 ) +17/modulate = Color( 1, 1, 1, 1 ) +17/region = Rect2( 0, 0, 20, 20 ) +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 = "SlopeRightBorderless.png 18" +18/texture = ExtResource( 5 ) +18/tex_offset = Vector2( 0, 0 ) +18/modulate = Color( 1, 1, 1, 1 ) +18/region = Rect2( 0, 0, 20, 20 ) +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 = "LedgeLeft.png 19" +19/texture = ExtResource( 6 ) +19/tex_offset = Vector2( 0, 0 ) +19/modulate = Color( 1, 1, 1, 1 ) +19/region = Rect2( 0, 0, 20, 20 ) +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 = 0 +20/name = "LedgeMiddle.png 20" +20/texture = ExtResource( 7 ) +20/tex_offset = Vector2( 0, 0 ) +20/modulate = Color( 1, 1, 1, 1 ) +20/region = Rect2( 0, 0, 20, 20 ) +20/tile_mode = 0 +20/occluder_offset = Vector2( 0, 0 ) +20/navigation_offset = Vector2( 0, 0 ) +20/shape_offset = Vector2( 0, 0 ) +20/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +20/shape_one_way = false +20/shape_one_way_margin = 0.0 +20/shapes = [ ] +20/z_index = 0 +21/name = "LedgeRight.png 21" +21/texture = ExtResource( 8 ) +21/tex_offset = Vector2( 0, 0 ) +21/modulate = Color( 1, 1, 1, 1 ) +21/region = Rect2( 0, 0, 20, 20 ) +21/tile_mode = 0 +21/occluder_offset = Vector2( 0, 0 ) +21/navigation_offset = Vector2( 0, 0 ) +21/shape_offset = Vector2( 0, 0 ) +21/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +21/shape_one_way = false +21/shape_one_way_margin = 0.0 +21/shapes = [ ] +21/z_index = 0 +22/name = "LedgeSingle.png 22" +22/texture = ExtResource( 9 ) +22/tex_offset = Vector2( 0, 0 ) +22/modulate = Color( 1, 1, 1, 1 ) +22/region = Rect2( 0, 0, 20, 20 ) +22/tile_mode = 0 +22/occluder_offset = Vector2( 0, 0 ) +22/navigation_offset = Vector2( 0, 0 ) +22/shape_offset = Vector2( 0, 0 ) +22/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +22/shape_one_way = false +22/shape_one_way_margin = 0.0 +22/shapes = [ ] +22/z_index = 0 diff --git a/Units/NPC.tscn b/Units/NPC.tscn new file mode 100644 index 0000000..1ebeb6f --- /dev/null +++ b/Units/NPC.tscn @@ -0,0 +1,46 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://Scripts/Units/NPCExample.gd" type="Script" id=1] +[ext_resource path="res://Graphics/Units/NPC.png" type="Texture" id=2] +[ext_resource path="res://Graphics/Animations/NPCWalk.tres" type="SpriteFrames" id=3] +[ext_resource path="res://Graphics/Units/NPCJump2.png" type="Texture" id=4] +[ext_resource path="res://Graphics/Units/NPCJump1.png" type="Texture" id=5] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 6, 14 ) + +[node name="NPC" type="Area2D"] +collision_mask = 2 +script = ExtResource( 1 ) +unit_type = 1 +tick_duration = 2.0 +action_sequence_map = { +[ [ "MOVE" ], [ 0.0 ] ]: 1 +} +action_duration_map = { +"MOVE": 1.0 +} + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 0, -14 ) +shape = SubResource( 1 ) + +[node name="Idle" type="Sprite" parent="."] +visible = false +texture = ExtResource( 2 ) +offset = Vector2( 0, -15 ) + +[node name="Jump1" type="Sprite" parent="."] +visible = false +texture = ExtResource( 5 ) +offset = Vector2( 0, -15 ) + +[node name="Jump2" type="Sprite" parent="."] +visible = false +texture = ExtResource( 4 ) +offset = Vector2( 0, -15 ) + +[node name="Walk" type="AnimatedSprite" parent="."] +visible = false +frames = ExtResource( 3 ) +offset = Vector2( 0, -15 ) diff --git a/Units/Player.tscn b/Units/Player.tscn new file mode 100644 index 0000000..91cdf04 --- /dev/null +++ b/Units/Player.tscn @@ -0,0 +1,47 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://Scripts/Units/Player.gd" type="Script" id=1] +[ext_resource path="res://Graphics/Units/Player.png" type="Texture" id=2] +[ext_resource path="res://Graphics/Units/PlayerJump2.png" type="Texture" id=3] +[ext_resource path="res://Graphics/Units/PlayerJump1.png" type="Texture" id=4] +[ext_resource path="res://Graphics/Animations/PlayerWalk.tres" type="SpriteFrames" id=5] +[ext_resource path="res://Graphics/Units/PlayerRecoil.png" type="Texture" id=6] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 6, 14 ) + +[node name="Player" type="Area2D"] +z_index = 1 +collision_layer = 0 +script = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 0, -14 ) +shape = SubResource( 1 ) + +[node name="Idle" type="Sprite" parent="."] +visible = false +texture = ExtResource( 2 ) +offset = Vector2( 0, -15 ) + +[node name="Walk" type="AnimatedSprite" parent="."] +visible = false +frames = ExtResource( 5 ) +offset = Vector2( 0, -15 ) + +[node name="Jump1" type="Sprite" parent="."] +visible = false +texture = ExtResource( 4 ) +offset = Vector2( 0, -15 ) + +[node name="Jump2" type="Sprite" parent="."] +visible = false +texture = ExtResource( 3 ) +offset = Vector2( 0, -15 ) + +[node name="Recoil" type="Sprite" parent="."] +visible = false +texture = ExtResource( 6 ) +offset = Vector2( 0, -15 ) + +[connection signal="area_entered" from="." to="." method="_on_Player_area_entered"] diff --git a/VERSION.md b/VERSION.md new file mode 100644 index 0000000..2b1201b --- /dev/null +++ b/VERSION.md @@ -0,0 +1,205 @@ +**version 0.1.5** +*added* ++ Light code clean ++ Some Bugfix ++ Plugin output for debug of some of the operations ++ Automatic Filling of sign in fields ++ Multiple files commit and changes commit ++ Every text and image file format supported ++ Filtering in committing ++ Autoload branches content + +*removed* ++ Single file commit ++ Only text file commit + +---------------------- + +**version 0.2.5** +*added* ++ Code clean ++ Chose branch to commit ++ Delete resource selected in repository ++ Filters: Exceptions, Only, Start from + +---------------------- + +**version 0.2.7** +*added* ++ Code clean ++ Fix some little animations ++ New commit method: tree created from blobs, creates a single commit with more files + +*removed* ++ Old commit method + +---------------------- + +**version 0.2.9** +*added* ++ Code clean ++ Bugfix with commits ++ A marker next to "Sign-in" buttons appears if a logfile is found + +---------------------- + +**version 0.3.1** +*added* ++ Several bugfixes + +-------------------- + +**version 0.3.2** +*added* ++ New folder organization (whole plugin in *addon* folder) ++ New install method (AssetLib from GodotEngine Editor) + +-------------------- + +**version 0.6.0** +*removed* +- old position: + - the plugin doesn't appear in docs anymore. Instead, it will load a new tool in the top toolbar +- old layout: + - RepositoryList and GistList now show more informations about their contents +- old repository's content system: + - Repositories contents are now listed in a tree way +- old "commit to repository" system and FILTERS: + - The old system was based on a Filtering system: I introduced filters to help people choose which file to exclude from your commit, which files should negate an exclusion, and eventually from which path to start. This system was based on the conception that the whole commit started from the `res://` path. Now, you can select in a more interactive way all files and folders you want to commit, and exclude them with a .gitignore system. + +*added* ++ Informations about repositories: + + Repositories now have their own icons: *lock* for private, *fork* for forked repositories, *gray repo* for own public repositories + + Repositories show their forked times and stars ++ License templates: new repositories can now be created with a license template from all availables github supported licenses ++ Repository contents system: + + files are now displayed in a compact, more readable tree system. Files and folders are differentiated, and folders can be folded and unfolded to show their contents + + you can now delete multiple files just CTRL/SHIFT selecting them. **remember:** folders cannot be deleted by github integrity rules. Delete all folder's contents to delete the folder itself + + you can now create a new branch from all selectable branches in your repository ++ **!Repository committing system**: + + [filtering] + + Since FILTERS are not supported anymore, the usage of `.gitignore` is now implemented. + + a `.gitignore` file is loaded from the repository you want to commit to. If this repository doesn't have a gitignore, an empty and new gitignore can be created and committed. + + the "gitignore editor" is shown next to the "committing tree" so you can procedurally select files and folders, and exclude/include them with the gitignore. *if you don't know how to use a gitignore, I recommend you to click on the `?` button in the bottom-right of the gitignore editor* + + the "edit .gitignore" button will prevent any unwanted modifications to be applied by any chance (miss-typing, or you just don't need to edit the gitignore since it was loaded from the repository) + + [file choosing] + + Since FILTERS are not supported anymore, the commit process won't start from the project folder. + + Now you can select multiple files and directories you want to commit through a file dialog showing your whole project folder. + + Files and directories can always be removed before committing +**Please, note that the gitignore filtering method is custom made. To fully support the same gitignore method applied by GitHub some tests are needed** ++ **Gists** can now be opened, edited, and pushed with a cusotm GitEditor. Gists which contain more than one file are supported, and you can edit more files at the same time. + +-------------------- + +**version 0.6.2** +*fixed* +- new method to show contents of repositories: faster code and works better. Empty repositories won't be loaded +- now each loading has a loading screen covering the whole scene: no more missclicks during a repository loading or a commit +- new icons in repositories to visually show what's the content type ( adapted to Godot Engine's file types) + +-------------------- + +**version 0.7.0** +*added* +- **pull / clone button** : you can now pull from any branch of a selected repository. A local copy of your repository with files relative to the selected branch will be created in a .zip file inside your 'res://' folder. In this way you will be able to manage your repository's files in the way you prefer. Pulling/Cloning works on public, private and forked repositories. + +-------------------- + +**version 0.7.2** +*added* +- **debug messages checkbox** : a new checkbox will appear on the top-left corner of the GUI. With this checkbox you can decide if you want to get debug messages from this plugin or not. You can enable/disable it in any plugin tab + +*fidex* +- **deleting repository's resources** : with the previous version a bug occured and it wasn't possible to delete resources within a repository. + + -------------------- + +**version 0.7.4** +*added* +- **auto extraction** : the plugin is now able to auto-extract downloaded archives automatically. _your OS needs python_ to run the extraction script since it is not currently built in Godot Engine. It is still a beta script, so it is highly recommended to use it inside empty projects and have some tests. You can always report issues and contact me for any bug. +- **sing up link** : if you don't have an account, or want to create a new one, you can click on the *'Don't have a GitHub account yet?'* button in the main tab of the plugin + + -------------------- + +**version 0.7.5** +*fixed* +- **minor bugs** + +-------------------- + +**version 0.7.8** +*fixed* +- *[!] icon for log file* appeared even though there weren't log files already stored +- increased the number of repositories that will be listed. Default GitHub repository listing provides only 30 repositories at time. Now the limit is increased to 100. + +*added* +- user's datas are now stored in an **encrypted file**, and datas are shared on an upper level folder. Now you won't need to save the same datas for each 'github integration' plugin you install in your new projects, but all the projects you have and in which you use this plugin will always use the same log file. This log file will be stored at `/AppData/Roaming/Godot/github_integration/` +- the plugin now supports two different unzipping methods, one with a *Python script* and one with a *GDScript*. The second one is offered by an external plugin, which is the [gdunzip](https://github.com/jellehermsen/gdunzip) plugin developed by [jellehermsen](https://github.com/jellehermsen) (please, check it out!!). **NOTE:** If you've got Python installed on your PC, it is recommended using the Python one, since the GDScript one is not developed by me and may not work. In that case, please make an issue with specific informations about the problem you've encountered, and I'll make sure to discuss about it with the developer. + +-------------------- + +**version 0.8.2** +*fixed* +- autoload errors with 3.2 beta versions (and so on) +- some interface bugs +- minor bugfixes + +*added* +- **new authentication method** : it is now possible to log into your GitHub profile with an *Access Token*. Since GitHub will deprecate the basic authentication method (which consists of `your e-mail : your password`) this plugin will **only work** with your personal access token. +Please, visit [this site](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) to understand what a Personal Access Token is, and how to use it. You will also find this link as a button in the plugin. + +-------------------- + +**version 0.8.4** +*fixed* +- plugin ui +- extraction methods + +*added* +- introduced a java extraction method for zip files. + +------------------- +**version 0.9.0** +*fixed* +- opening shared repositories + +*added* +- new repositories explorer +- search bar for repositories + +----------------- +**version 1.0.0** +*fixed* +- overall fixes +- *infinite loading after commit/push:* fixed an issue that blocked commiting and pushing an entire project or some specific files. Now everything should be committed fine. A whole project can be committed just selecting "Select current directory" +- *.gitignore handling:* fixed gitignore handling, sometimes they were empty or overwritten randomly + +*added* +- *new UI:* now the plugin follows the official GitHub color palette and interface +- *gist searchbar:* it is now possible to use the searchbar for gist +- *autolog:* now an auto login option is available. When activated, the plugin will automatically log inside user's github profile +- **darkmode:** it is now available a darkmode. Both light and dark modes respect github color palette. The dark mode can be activated anytime during the plugin usage + +----------------- +**version 1.1.0** +*fixed* +- *faster login and auto-login* +- *minor errors with nodes* + +*added* +- *fast social button to header:* you can now join the social I share in the README with some buttons in the header. + +----------------- +**version 1.2.0** +*fixed* +- dark theme fixed + +*added* +- *collaborations:* you can now invite other users for a collaboration in your repositories. If the user has been invited successfully, they will receive an email with an invitation to accept/decline. Users that have repositories in collaboration will see these repositories marked with a new icon inside their repositories list. Collaborators can work with this repositories as they are their own repositories (based on the permissions granted), so teamworking will be much faster. + + +> This text file was created via [TextEditor Integration](https://github.com/fenix-hub/godot-engine.text-editor) inside Godot Engine's Editor. + + + + diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..20207a4 --- /dev/null +++ b/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] + +[resource] +background_mode = 2 +background_sky = SubResource( 1 ) diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c98fbb601c83c81ec8c22b1dba7d1d57c62b323c GIT binary patch literal 3305 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 literal 0 HcmV?d00001 diff --git a/icon.png.import b/icon.png.import new file mode 100644 index 0000000..a4c02e6 --- /dev/null +++ b/icon.png.import @@ -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 diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..ea67a6d --- /dev/null +++ b/project.godot @@ -0,0 +1,90 @@ +; 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": "Node", +"class": "GameScene", +"language": "GDScript", +"path": "res://Scripts/GameScene.gd" +}, { +"base": "Unit", +"class": "NPCUnit", +"language": "GDScript", +"path": "res://Scripts/Units/NPCUnit.gd" +}, { +"base": "Unit", +"class": "Player", +"language": "GDScript", +"path": "res://Scripts/Units/Player.gd" +}, { +"base": "Area2D", +"class": "Unit", +"language": "GDScript", +"path": "res://Scripts/Unit.gd" +} ] +_global_script_class_icons={ +"GameScene": "", +"NPCUnit": "", +"Player": "", +"Unit": "" +} + +[application] + +config/name="Kinematically Reinterpreted Implementation Needing Godot Engine" +run/main_scene="res://Scenes/SandboxScene.tscn" +config/icon="res://icon.png" + +[display] + +window/size/width=840 +window/size/height=560 + +[input] + +gba_b={ +"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":88,"unicode":0,"echo":false,"script":null) + ] +} +gba_a={ +"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":90,"unicode":0,"echo":false,"script":null) + ] +} +gba_start={ +"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":16777221,"unicode":0,"echo":false,"script":null) + ] +} +gba_select={ +"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":16777220,"unicode":0,"echo":false,"script":null) + ] +} + +[layer_names] + +2d_physics/layer_1="Player Hit" +2d_physics/layer_2="Enemy Hit" + +[network] + +limits/debugger_stdout/max_chars_per_second=4096 +limits/debugger_stdout/max_messages_per_frame=2048 + +[physics] + +common/enable_pause_aware_picking=true + +[rendering] + +2d/snapping/use_gpu_pixel_snap=true +environment/default_environment="res://default_env.tres"