From bcd538a306b5fe283b41b52e5b787317dba1e774 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Sat, 2 Apr 2022 11:46:19 -0400 Subject: [PATCH] Starting positions --- .gitignore | 1 + assets/export/bishop.png | Bin 0 -> 2420 bytes assets/export/bishop.png.import | 34 +++++++ assets/export/king.png | Bin 0 -> 2391 bytes assets/export/king.png.import | 34 +++++++ assets/export/knight.png | Bin 0 -> 3024 bytes assets/export/knight.png.import | 34 +++++++ assets/export/pawn.png | Bin 0 -> 2446 bytes assets/export/pawn.png.import | 34 +++++++ assets/export/queen.png | Bin 0 -> 4518 bytes assets/export/queen.png.import | 34 +++++++ assets/export/rook.png | Bin 0 -> 1533 bytes assets/export/rook.png.import | 34 +++++++ assets/export/square_center_0.png | Bin 0 -> 793 bytes assets/export/square_center_0.png.import | 34 +++++++ assets/export/square_edge.png | Bin 0 -> 891 bytes assets/export/square_edge.png.import | 34 +++++++ assets/source/Squares.xcf | Bin 0 -> 44619 bytes project.godot | 8 ++ src/Game.gd | 124 +++++++++++++++++++++++ src/Game.tscn | 26 +++++ src/Piece.gd | 23 +++++ src/Playfield.gd | 52 ++++++++++ src/Playfield.tscn | 6 ++ src/Square.tscn | 13 +++ src/hilight.shader | 21 ++++ src/pieces/Bishop.tscn | 9 ++ src/pieces/King.tscn | 9 ++ src/pieces/Knight.tscn | 9 ++ src/pieces/Pawn.tscn | 9 ++ src/pieces/Piece.gd | 39 +++++++ src/pieces/Piece.tscn | 15 +++ src/pieces/Queen.tscn | 9 ++ src/pieces/Rook.tscn | 9 ++ 34 files changed, 654 insertions(+) create mode 100644 assets/export/bishop.png create mode 100644 assets/export/bishop.png.import create mode 100644 assets/export/king.png create mode 100644 assets/export/king.png.import create mode 100644 assets/export/knight.png create mode 100644 assets/export/knight.png.import create mode 100644 assets/export/pawn.png create mode 100644 assets/export/pawn.png.import create mode 100644 assets/export/queen.png create mode 100644 assets/export/queen.png.import create mode 100644 assets/export/rook.png create mode 100644 assets/export/rook.png.import create mode 100644 assets/export/square_center_0.png create mode 100644 assets/export/square_center_0.png.import create mode 100644 assets/export/square_edge.png create mode 100644 assets/export/square_edge.png.import create mode 100644 assets/source/Squares.xcf create mode 100644 src/Game.gd create mode 100644 src/Game.tscn create mode 100644 src/Piece.gd create mode 100644 src/Playfield.gd create mode 100644 src/Playfield.tscn create mode 100644 src/Square.tscn create mode 100644 src/hilight.shader create mode 100644 src/pieces/Bishop.tscn create mode 100644 src/pieces/King.tscn create mode 100644 src/pieces/Knight.tscn create mode 100644 src/pieces/Pawn.tscn create mode 100644 src/pieces/Piece.gd create mode 100644 src/pieces/Piece.tscn create mode 100644 src/pieces/Queen.tscn create mode 100644 src/pieces/Rook.tscn diff --git a/.gitignore b/.gitignore index 567609b..5b5fbba 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build/ +.import/ diff --git a/assets/export/bishop.png b/assets/export/bishop.png new file mode 100644 index 0000000000000000000000000000000000000000..348db4b209e0b7aec95fbbcd9888fc5e8889d904 GIT binary patch literal 2420 zcmV-)35)iLP)EX>4Tx04R}tkv&MmKpe$i(@I4v4t9{@kfAzR5fyRNDionYsTEpvFuC*#nlvOS zE{=k0!NHHks)LKOt`4q(Aou~|=;Wm6A|?JWDYS_3;J6>}?mh0_0Yam~R5LIRsG4P@ z6LB${TNQ(^2tYtD#t@O1sn4ZSNqCO0d-(Wz7vovp=l&dhO5S9EPb8jYx?vG-5KnJf zI_G`jFe^z4@j3CRK^G)`?&Kfh(=;uQq_0Ptxmc zEqVm>Zvz+CZB5<-E_Z;zCtWfmNAlAY3I*W(jJ_!c4BP@eYi@6?eVjf38R{x|0~{Oz zBSp$y_jq@AXK(+WY4!I5O;&Q4BRyy400006VoOIv0PFzF0L&f$a2@~v010qNS#tmY zE+YT{E+YYWr9XB6000McNliru<^%!{9STRK{!0J=02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00&G-L_t(|+U=cdh*eb>hTk>mjE;A6G%w?L%Sy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RV_Ru}b{>yws{jbQ|-G$d4R*O)MxXJTg5+n^n(4qG? zh3_oaF1IvppNgo{3Fj*+1tcHspWJ!fj@+5�acstAS5QSINNwjj+UR^+w8R@ZR5# zulOX0ebaHVW?bq}c(z?z4|OSlws$@#CZA)D^F{9S5}@UkWHW;{C?#n8P8YvUmScHD*>B#7*&|t-g;N#`*KnR{9Ku)wIx_bor!; zO^{^>tpD^6s7a4-e|>Hzvs9S=XB!}6DZCrBuyFZ)75C%DQ&Zr-)Eet5JJU6!(# zoS2Z<+_0OS=|mzZJ@fWNhblU(Ri8O6eL$y8`6RM}aNL^gLayhn(lASLOhFTGCKpJb zArZNV;Zpg=xaI7gWi>CL4|ja@V$LSmc@yI4jGB7VrxDfs;g&84=!ncm#uq4jVuH@)}JQBqL-#UCOhsbnPsPMpNT z?7^eI$mx?#l>=dOH@|3JObAt=7R#orz3g>u#s4P~^=|i^gIq*u=XYnQ|3*T<7-fni I>bu1K7g=kPRR910 literal 0 HcmV?d00001 diff --git a/assets/export/knight.png.import b/assets/export/knight.png.import new file mode 100644 index 0000000..6b7232a --- /dev/null +++ b/assets/export/knight.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/knight.png-cd94a1c957955d24a4b172ef025165bd.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/knight.png" +dest_files=[ "res://.import/knight.png-cd94a1c957955d24a4b172ef025165bd.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/export/pawn.png b/assets/export/pawn.png new file mode 100644 index 0000000000000000000000000000000000000000..a5c1eeadcbab77514fc5fee5fd7c7550323b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0h#w?9D(MqBPCqK?Pm|M`sTZvsxR8eO>cXUzAX0KU+n_Qk^)Cb-3lly88KWr%V^2lML7m@oKWV765$ z*8rO$f;><_ezP)OEZu5V$`gNCM2Ou*{ThKwVuM6hraS}O9TDPl1?T;TNZuD%opKD2 zb}Jq(`U4K&vWNk`Yjuhje<&ir_e;pXA9y7t|0k;!&nnIeUJ^+weC}Qd;kcxy+9;b1 z&>_xs6AC~mjl;o>Qn7MmJqz$mq1}KNMDaYqZy0PHAV{iQ)mnk0LeUahd zQD9y{`F`4O1AE5=vA1&TI^87%<|T6r)418Hlxu+H88d?J?_geYfX$J-Mm!^^J0|#D zh6x@5W==DY`5EH-*WX10yazatA7N%JM0 zCuxzSg>B}yOVafrg!TT}PG9`oaOsBu+XaJ z5AaCSMJ2%TezAzz3{ydLVDg zxmMqYd$8;?f$!wF8|IN9y=glMN7?(>Dy9Qj>aKn{k)BritRO$Oy{nn$}I8yN+HmDIiBhn+- zQ|3E@vWHl&jHLadDFz539Fz3xl;qP?-dabc8(?M1@!gU(s9F3nlJ?O$-uC7s+qiUP zk>?(aM~FNI*46P2aDk+>Nt@3!%>c=&rfG{xT~t;(piBcSiljZOX7XIh@&A9VTq^^l zz4zW5LfF+%1H_EKuxrzVMf9;`(py%Y%!~g&Q M07*qoM6N<$f($y1>;M1& literal 0 HcmV?d00001 diff --git a/assets/export/pawn.png.import b/assets/export/pawn.png.import new file mode 100644 index 0000000..a240af1 --- /dev/null +++ b/assets/export/pawn.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/pawn.png-ea3858ceb85926cfe768cbdc4cefb202.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/pawn.png" +dest_files=[ "res://.import/pawn.png-ea3858ceb85926cfe768cbdc4cefb202.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/export/queen.png b/assets/export/queen.png new file mode 100644 index 0000000000000000000000000000000000000000..5e4d118dca523db94ea369489d125e6156fe7c44 GIT binary patch literal 4518 zcma)9M^w}O+WaM<2`^wos&s+~A{}0OF9}t;^q}+>q<8)T3Q98(DI$W>q$?m;C{YxM zQbd|GK}A3VqV$&Ja=+zWeT#XXbLO0xSPc%1X9o{9Sl1wEkP` z_ZOIc`5QY$Ikw05yel}a$``wErZzF@>dN+>#23~KSK44=a+>1z_Tsp|JAGNE@+X>p z@q(;S54>M`B5^0JaL($>iQnYTW0?P{{e7&*jY?X4xw>&?`B4vi_@6UHTbfr3FG)u| znSEXF_4uvrTWh27a~}OK>qEbMt9J;fkF=t`x#;fVw4^>Lf_jo6ULmY+%<6526)~l&mgE#(!qv zT7e|#uy6<~6w~ruI|&Xe+B>SK`-DRerYgp8viL*$3L=Bxe{s~^k03}8?tlv4+*Z71M7DUTFQ|rEgh2qxi^dJ4d&AGo?c;DvApIcDTbvxmXW<$M>siG zhUC^t7H6|ts_UNhNcchwzEKUz(z;{Beh zDtA$nh7m!wMI%NVj8f8>5ndqyV^mcFOKU?PI!e}$%vDLTc)RO-;bUd~!K;T1-ev9X z+?i-Iaebr{1NPaM5XZ468Ci^SbePY(T)+(TfC)s5&HO=!MY>Pux1_&X`vk z?wD`OSAX@Cfqo&ja|bn5VLo)mDG{XAEELOUXZ9=QARY(-%u!0OwGKY(q#Fa)UV*v|K2{*CbjSTON;E+eU6nU$vER4S%0m&MJHL^ z@ckK;5+}r!oaAcc!dNJ`xrCxQ`gB=^oyksU>|ZJON9EQ#E=7y%%Whtw8f*j*CJ6~c zdBdVFu6PyKp)DO=GuNe-*T%FdKKo7A$u2VY*S<9pFE3G|yhC&MnnR+v`Fu*zVOE3A zFQL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fc)I$ztaD0e0suhs4TAsx literal 0 HcmV?d00001 diff --git a/assets/export/square_center_0.png.import b/assets/export/square_center_0.png.import new file mode 100644 index 0000000..2d666fd --- /dev/null +++ b/assets/export/square_center_0.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/square_center_0.png-58cbbdc1eb62a39927b47443c3feb6ac.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/square_center_0.png" +dest_files=[ "res://.import/square_center_0.png-58cbbdc1eb62a39927b47443c3feb6ac.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/export/square_edge.png b/assets/export/square_edge.png new file mode 100644 index 0000000000000000000000000000000000000000..140350b60393677bb4a745f1fd373820d94f0628 GIT binary patch literal 891 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5j~)%+dJEUas1FWfLAvSZEa~C|Y<$OJt$bO3|oNgPmWvXPKyI>h(2cA3WH9 zbX9Zr=5>7QniPI8K6>$F$qOabfBKqRIzB$wA^-lJ?Yn!7PKytP7#r}dn3cLjxX^HR zv}p5s4hIMQV*(RrtUSLo$g`qvef5tYRpO5$?>+w~Q|omvrNLiiUh1wy!F&P#{3xsE zwT}$6J-I$weq7-wu2T18*PBn$&leqLI?p3L^NUU4j0l~w4R;Q%Nm+3u_(-7ZRgL%) zyVexkd$cAjYfY*Dze53W(UH%r&MK;G=ulmv;N-@e8j_&sw%V<$)8y@O+dqQG=POP3 zS!X0+DHhPmb@F5L|AX)I&K`QwGFzmJIaYt$Uqc?2^2W5g+xGY8?yh9|F~3oJ?c4Qc z4Kw{Oz0TFGV)>HKEPg%L_a3uedBZ{VSR)npPnSiwSRefD*{8|QbBD<`J1>82?HoG> z$yZvH%rY`e%C4v4zE_l&r|18lm-+QOvu{|@3}xH&XTWG-OY(MiVfYV%3-&Ib3>4uk z@Q5sCV9-+rVaAH3_GLgp_7YEDSN3NtOx&i1Ykmnz0)-??Tq8=H^K)}k^GX<;i&7Iy zQd1PlGfOfQ+&z5*!W;R-fzci8>EaktaqI03L%yZ}0oRKcH!##W@&AsW`b}*IbEb}l z%0IDtJ9!ls&axDEV7B#}=25en{`|!qIWlGH{GU6rZrU>{aK!x6XAoe~{m(gd*m#M3&d_GjQnb`y;4JP*|2i!$NQ$`$*1@j7+4w@1Q?hc z7&sUh6&P3slEXmIeyeKd^RB_!ivyoBMf7NjH#}u$-tZ@ZVe`c&Oa;#&>}m2m2g>U* Zq`MyR_vM}VxR?P5JYD@<);T3K0RWc5HeUb$ literal 0 HcmV?d00001 diff --git a/assets/export/square_edge.png.import b/assets/export/square_edge.png.import new file mode 100644 index 0000000..9c8e47f --- /dev/null +++ b/assets/export/square_edge.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/square_edge.png-03ab64193a0e2810802d31d0367576c5.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/square_edge.png" +dest_files=[ "res://.import/square_edge.png-03ab64193a0e2810802d31d0367576c5.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/source/Squares.xcf b/assets/source/Squares.xcf new file mode 100644 index 0000000000000000000000000000000000000000..141c9b6f3069b011d3f5f212396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Pjrta-qb-Z%uov-Y$ zAxvVYm7LPXDXF}p!GJOg_BgyF0s3$fayxF;p}UxkU7mj#q`?l^v!KqTMZvA0a}evg zuOk%MHQ0<6F|f!bpF!?b6LLE2uSg3~<>{cjqius-r?D5B^tlzJ50E()iA)d348R?4 z!LwKa*o&V3MUNAU{Q0Dc0v3vemmNx->)6@c>^q=yP}HA9;vyL>z?9}mdK?eg(0 z`S_50%;BTM5NI{&bq#~LF&ofPanI@9mDlcosO)~oW^LWrB*r-oEf6m&2pbTE$glxA zEDjXspm9zdK&~WjmHX>^Mk{qt;>6VYc&nXSni03bJ2C#dlz`Z><-U7_qTu)U&wr0} z7aB((R4#UprBiIro<-(k5N-rx7T_0vt1`PFNf&-~&S}E4|EnqtbHuxKuuZ z2g<|pak_jQC?8WpVdzM1bEt?3))*yg0Jqcsz!z2wX88x>MIuiAuYCim}bn^NjD*Yy@a#{%bEh8g`G1#+fCy1l=W zYad*l?#ZH`4ff?r;r;VH2mV_A4$t9owQBjkSesm~b}io*_qLb&{rN0YpJn=Y`v$xQ zQMDthn!%Pj`tl6Ml#!V{NQ0}pv>VTTU8Xj!$4_#ZTDX_DCqcP8pI!EMvCIArw&CBQ z4qn5j+A&qlFiRbGd4^%im`om?buH~q@ZWa#BzEN%dlEavEyHv2i*hComAAqBI|YfN zZu0NXI>z~4ynf5gUPv+WoIH;4<;{`DZ}~F{l#j(Ya>8%9XK%pe<2?9u4}4gGaEu3w zQ%GNW68%ve<#hKXF0$B@_yzf8W)B}bYU21w`6GZ`R&y7aX7>KQ`Gyx(j65ej5`J%f wqres26eu5yapZ*GoBWOAw<5>`6Fo3Zf$}Tj*P larger: + larger = pf_size.y + # Container is 768x768 + var scale = 768 / larger + print("Scaling playfield by ", scale) + pf.apply_scale(Vector2(scale, scale)) + pf.translate(Vector2( + 64 * scale, + 64 * scale + )) + self.pf_scale = scale + reset_game_state() + +func reset_game_state(): + self.is_player_turn = true + self.turn = 0 + for p in get_tree().get_nodes_in_group("pieces"): + p.queue_free() + + # Create starting pieces + # 8 pawns per side, starting at col 0 + (width-8)/2 + # on rows 2, height - 2 + var start_x = (self.width - 8) / 2 + var y_opponent = 1 + var y_player = self.height - 2 + var i = 0 + while i < 8: + var x = start_x + i + new_piece("pawn", "player", Vector2(x, y_player)) + new_piece("pawn", "opponent", Vector2(x, y_opponent)) + i += 1 + new_piece("rook", "player", Vector2(start_x, self.height -1)) + new_piece("rook", "player", Vector2(start_x + 7, self.height -1)) + new_piece("rook", "opponent", Vector2(start_x, 0)) + new_piece("rook", "opponent", Vector2(start_x + 7, 0)) + new_piece("bishop", "player", Vector2(start_x + 2, self.height -1)) + new_piece("bishop", "player", Vector2(start_x + 5, self.height -1)) + new_piece("bishop", "opponent", Vector2(start_x + 2, 0)) + new_piece("bishop", "opponent", Vector2(start_x + 5, 0)) + new_piece("knight", "player", Vector2(start_x + 1, self.height -1)) + new_piece("knight", "player", Vector2(start_x + 6, self.height -1)) + new_piece("knight", "opponent", Vector2(start_x + 1, 0)) + new_piece("knight", "opponent", Vector2(start_x + 6, 0)) + new_piece("king", "player", Vector2(start_x + 4, self.height - 1)) + new_piece("king", "opponent", Vector2(start_x + 4, 0)) + new_piece("queen", "player", Vector2(start_x + 3, self.height - 1)) + new_piece("queen", "opponent", Vector2(start_x + 3, 0)) + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/src/Game.tscn b/src/Game.tscn new file mode 100644 index 0000000..52c5572 --- /dev/null +++ b/src/Game.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/Game.gd" type="Script" id=1] +[ext_resource path="res://src/Playfield.tscn" type="PackedScene" id=2] + +[node name="Game" type="Container"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 2 +size_flags_vertical = 2 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="MarginContainer" type="MarginContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 256.0 +margin_top = 128.0 +margin_right = -256.0 +margin_bottom = -128.0 +size_flags_horizontal = 2 +size_flags_vertical = 2 + +[node name="Playfield" parent="MarginContainer" instance=ExtResource( 2 )] diff --git a/src/Piece.gd b/src/Piece.gd new file mode 100644 index 0000000..e640ef2 --- /dev/null +++ b/src/Piece.gd @@ -0,0 +1,23 @@ +extends Node2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +# Each piece should belong to a group - player or opponent +# +var health = 1 +var damage = 1 +var abilities = [] +var kills = 0 +var at_spawn = true + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/src/Playfield.gd b/src/Playfield.gd new file mode 100644 index 0000000..fff1a35 --- /dev/null +++ b/src/Playfield.gd @@ -0,0 +1,52 @@ +extends Node2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +var height +var width +# holds weakrefs to the square nodes +var squares = [] + +func initialize(width: int = 8, height: int = 8): + # Remove any Squares beneath us + for i in self.squares: + if i.get_ref(): + i.get_ref().queue_free() + + self.squares = [] + self.height = height + self.width = width + + # Create new squares + var i = 0 + while i < self.width: + var j = 0 + while j < self.height: + var instance = ResourceLoader.load("res://src/Square.tscn").instance() + # @TODO any tweaks to the node by calling custom function initialize() + instance.translate(Vector2(128*i, 128*j)) + self.squares.append(weakref(instance)) + add_child(instance) + j += 1 + i += 1 + +func to_index(row: int, col: int): + # 0-based basing width, height + if row < 0 or col < 0: + return null + if row >= self.width or col >= self.height: + return null + return (row*self.width)+col + +# Called when the node enters the scene tree for the first time. +func _ready(): + initialize(8, 8) + # pass + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/src/Playfield.tscn b/src/Playfield.tscn new file mode 100644 index 0000000..865067d --- /dev/null +++ b/src/Playfield.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://src/Playfield.gd" type="Script" id=1] + +[node name="Playfield" type="Node2D"] +script = ExtResource( 1 ) diff --git a/src/Square.tscn b/src/Square.tscn new file mode 100644 index 0000000..c6d8f36 --- /dev/null +++ b/src/Square.tscn @@ -0,0 +1,13 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://assets/export/square_edge.png" type="Texture" id=1] +[ext_resource path="res://assets/export/square_center_0.png" type="Texture" id=2] + +[node name="Square" type="Node2D"] +z_index = -1 + +[node name="Body" type="Sprite" parent="."] +texture = ExtResource( 2 ) + +[node name="Edge" type="Sprite" parent="."] +texture = ExtResource( 1 ) diff --git a/src/hilight.shader b/src/hilight.shader new file mode 100644 index 0000000..e2d8b19 --- /dev/null +++ b/src/hilight.shader @@ -0,0 +1,21 @@ +shader_type canvas_item; + +uniform float width: hint_range(0.0, 50.0); +uniform vec4 color: hint_color; + +void fragment() { + vec2 size = TEXTURE_PIXEL_SIZE * width; + float outline = texture(TEXTURE, UV + vec2(-size.x, 0)).a; + outline += texture(TEXTURE, UV + vec2(0, size.y)).a; + outline += texture(TEXTURE, UV + vec2(size.x, 0)).a; + outline += texture(TEXTURE, UV + vec2(0, -size.y)).a; + outline += texture(TEXTURE, UV + vec2(-size.x, size.y)).a; + outline += texture(TEXTURE, UV + vec2(size.x, size.y)).a; + outline += texture(TEXTURE, UV + vec2(-size.x, -size.y)).a; + outline += texture(TEXTURE, UV + vec2(size.x, -size.y)).a; + outline = min(outline, 1.0); + + vec4 ncolor = texture(TEXTURE, UV); + COLOR = mix(ncolor, color, outline - ncolor.a); + +} \ No newline at end of file diff --git a/src/pieces/Bishop.tscn b/src/pieces/Bishop.tscn new file mode 100644 index 0000000..68c7739 --- /dev/null +++ b/src/pieces/Bishop.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/bishop.png" type="Texture" id=2] + +[node name="Piece" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 2 ) diff --git a/src/pieces/King.tscn b/src/pieces/King.tscn new file mode 100644 index 0000000..ed4dda7 --- /dev/null +++ b/src/pieces/King.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/king.png" type="Texture" id=2] + +[node name="Piece" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 2 ) diff --git a/src/pieces/Knight.tscn b/src/pieces/Knight.tscn new file mode 100644 index 0000000..d60f9f2 --- /dev/null +++ b/src/pieces/Knight.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/knight.png" type="Texture" id=2] + +[node name="Piece" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 2 ) diff --git a/src/pieces/Pawn.tscn b/src/pieces/Pawn.tscn new file mode 100644 index 0000000..0541308 --- /dev/null +++ b/src/pieces/Pawn.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/pawn.png" type="Texture" id=3] + +[node name="Piece" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 3 ) diff --git a/src/pieces/Piece.gd b/src/pieces/Piece.gd new file mode 100644 index 0000000..fba87df --- /dev/null +++ b/src/pieces/Piece.gd @@ -0,0 +1,39 @@ +extends Sprite + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +const types = { + "pawn": "res://src/pieces/Pawn.tscn", + "rook": "res://src/pieces/Rook.tscn", + "bishop": "res://src/pieces/Bishop.tscn", + "knight": "res://src/pieces/Knight.tscn", + "king": "res://src/pieces/King.tscn", + "queen": "res://src/pieces/Queen.tscn", +} + +# Each piece should belong to a group - player or opponent +# +var health = 1 +var damage = 1 +var abilities = [] +var kills = 0 + +static func new_piece(piece_type): + if not types.has(piece_type): + return null + return ResourceLoader.load(types[piece_type]).instance() + #piece.apply_scale(Vector2(pf.scale, pf.scale)) + #piece.add_to_group(group) + #return piece + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/src/pieces/Piece.tscn b/src/pieces/Piece.tscn new file mode 100644 index 0000000..54aaabe --- /dev/null +++ b/src/pieces/Piece.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://src/Piece.gd" type="Script" id=1] +[ext_resource path="res://src/hilight.shader" type="Shader" id=2] + +[sub_resource type="ShaderMaterial" id=1] +shader = ExtResource( 2 ) +shader_param/width = 2.0 +shader_param/color = null + +[node name="Piece" type="Node2D"] +script = ExtResource( 1 ) + +[node name="Body" type="Sprite" parent="."] +material = SubResource( 1 ) diff --git a/src/pieces/Queen.tscn b/src/pieces/Queen.tscn new file mode 100644 index 0000000..0a25912 --- /dev/null +++ b/src/pieces/Queen.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/queen.png" type="Texture" id=2] + +[node name="Piece" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 2 ) diff --git a/src/pieces/Rook.tscn b/src/pieces/Rook.tscn new file mode 100644 index 0000000..106525c --- /dev/null +++ b/src/pieces/Rook.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/rook.png" type="Texture" id=2] + +[node name="Rook" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 2 )