From 76b7dfa4f861520fe55510dc205b83a5346dbf86 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Tue, 30 Mar 2021 23:33:25 -0700 Subject: [PATCH] Various updates New doodad interactions: * Sticky Buttons will emit a "sticky:down" event to linked doodads, with a boolean value showing the Sticky Button's state. * Normal Buttons will listen for "sticky:down" -- when a linked Sticky Button is pressed, the normal Button presses in as well, and stays pressed while the sticky:down signal is true. * When the Sticky Button is released (e.g. because it received power from another doodad), any linked buttons which were sticky:down release as well. * Switch doodads emit a new "switch:toggle" event JUST BEFORE sending the "power" event. Sensitive Doodads can listen for switches in particular this way. * The Electric Door listens for switch:toggle; if a Switch is activated, the Electric Door always flips its current state (open to close, or vice versa) and ignores the immediately following power event. This allows doors to toggle on/off regardless of sync with a Switch. Other changes: * When the player character dies by fire, instead of the message saying "Watch out for fire!" it will use the name of the fire swatch that hurt the player. This way levels could make it say "Watch out for spikes!" or "lava" or whatever they want. The "Fire" attribute now just means "instantly kills the player." * Level Editor: You can now edit the Title and Author name of your level in the Page Settings window. * Bugfix: only the player character ends the game by dying in fire. Other mobile doodads just turn dark but don't end the game. * Increase the size of Trapdoor doodad sprites by 150% as they were a bit small for the player character. * Rename the game from "Project: Doodle" to "Sketchy Maze" --- dev-assets/doodads/buttons/button.js | 15 ++++- dev-assets/doodads/buttons/sticky.js | 2 + dev-assets/doodads/crumbly-floor/fallen.png | Bin 415 -> 5299 bytes dev-assets/doodads/doors/electric-door.js | 68 +++++++++++++------ dev-assets/doodads/switches/switch.js | 3 + dev-assets/doodads/trapdoors/down1.png | Bin 1020 -> 1041 bytes dev-assets/doodads/trapdoors/down2.png | Bin 970 -> 1098 bytes dev-assets/doodads/trapdoors/down3.png | Bin 1049 -> 1112 bytes dev-assets/doodads/trapdoors/down4.png | Bin 859 -> 1007 bytes dev-assets/doodads/trapdoors/left1.png | Bin 912 -> 1038 bytes dev-assets/doodads/trapdoors/left2.png | Bin 1013 -> 1101 bytes dev-assets/doodads/trapdoors/left3.png | Bin 1009 -> 1079 bytes dev-assets/doodads/trapdoors/left4.png | Bin 765 -> 992 bytes dev-assets/doodads/trapdoors/right1.png | Bin 933 -> 1047 bytes dev-assets/doodads/trapdoors/right2.png | Bin 1011 -> 1111 bytes dev-assets/doodads/trapdoors/right3.png | Bin 1047 -> 1072 bytes dev-assets/doodads/trapdoors/right4.png | Bin 789 -> 991 bytes dev-assets/doodads/trapdoors/trapdoor.js | 4 +- dev-assets/doodads/trapdoors/up1.png | Bin 831 -> 1031 bytes dev-assets/doodads/trapdoors/up2.png | Bin 964 -> 1086 bytes dev-assets/doodads/trapdoors/up3.png | Bin 1068 -> 1102 bytes dev-assets/doodads/trapdoors/up4.png | Bin 846 -> 1006 bytes go.mod | 2 + pkg/branding/branding.go | 8 +-- pkg/collision/collide_level.go | 6 +- pkg/play_scene.go | 14 ++-- pkg/uix/canvas.go | 1 + pkg/windows/add_edit_level.go | 69 +++++++++++++++++++- 28 files changed, 155 insertions(+), 37 deletions(-) diff --git a/dev-assets/doodads/buttons/button.js b/dev-assets/doodads/buttons/button.js index 3745467..c31e342 100644 --- a/dev-assets/doodads/buttons/button.js +++ b/dev-assets/doodads/buttons/button.js @@ -2,17 +2,30 @@ function main() { var timer = 0; var pressed = false; + // Has a linked Sticky Button been pressed permanently down? + var stickyDown = false; + Message.Subscribe("sticky:down", function(down) { + stickyDown = down; + Self.ShowLayer(stickyDown ? 1 : 0); + }); + Events.OnCollide(function(e) { if (!e.Settled) { return; } + // If a linked Sticky Button is pressed, button stays down too and + // doesn't interact. + if (stickyDown) { + return; + } + // Verify they've touched the button. if (e.Overlap.Y + e.Overlap.H < 24) { return; } - if (!pressed) { + if (!pressed && !stickyDown) { Sound.Play("button-down.wav") Message.Publish("power", true); pressed = true; diff --git a/dev-assets/doodads/buttons/sticky.js b/dev-assets/doodads/buttons/sticky.js index 0958454..a715a59 100644 --- a/dev-assets/doodads/buttons/sticky.js +++ b/dev-assets/doodads/buttons/sticky.js @@ -8,6 +8,7 @@ function main() { pressed = false; Sound.Play("button-up.wav") Message.Publish("power", false); + Message.Publish("sticky:down", false); } }) @@ -29,5 +30,6 @@ function main() { Self.ShowLayer(1); pressed = true; Message.Publish("power", true); + Message.Publish("sticky:down", true); }); } diff --git a/dev-assets/doodads/crumbly-floor/fallen.png b/dev-assets/doodads/crumbly-floor/fallen.png index 6c16dd05aebb3fe52b78c91e8ebec73ba67a6fb1..ffd3423b9f2776e8edb145f3b5bd2a38098278f9 100644 GIT binary patch literal 5299 zcmeHLdsq`!7LRo;LbYlUt%@=Rw2Dq<5&}u4iGWGefDwcU==z#WCdrf}6K4hpsGqN@ zASfzo#rmoipXfqW6m_M(SzoJS@pDDR=jvLi7K^&R_D+HjTi34NxBbuX1?JxSJHK=8 z@1ApJhMf3egWLLb^%DpLZFNI53E;1h|F-@U_}!xT)J%b(Wk{AGg-gIQASXkcDH{oK znNAWSU6ffMaQ)-nS0fkJKy7ASQE2B)4T-uY@4qfoR{5ZQM(M=e+YDv1l~MySzcl2b zt|9O9eUp0B`FDN#y-2fTQR2_mp0iK1@~^jSP7MjF-Zkpl-Oz$@4J-|)%S{o zjxKM&=wR+%MaMDzp-T@Rotsd$cfj$xNtF$otP>$_RKw)Rk^o;i|3JCp;@U;}Rr9JZ zmIano_Nai4_3eFjs<10MWXHT(>DdC&2)y>?ZfPns1ssddiL$^+}al1vF{ zmAt>w_;EL#u+x_}_jX9CRmC4@)#uduYr~&)KapRWdFZy!z2td2s!T=u_4lfuFARG0 zV=vWqTlw;zXRqPLttuJI%t4s)llKb-Ht+jAe^@rZ?v%`6I4ty^@nCh-3ct2k^^V~)a;LRR8eQ0JLtNoB z?XBJgnM*I78Nayym^P2QF#m=MB>m}za=RaCeQs8^ce4ysi`5M)D)Y4@zn97@rb~Z$61>;Ea*|*tDwI4MRt#8 zBZ+S(_lwFN|M`I~pR~X4yI7O6SJJP;HEV5Rts=HIW^0GTmEFfO?R8UUgif_9*KTiM zZY1XI{47eNTN71KBuHxA;m+Fqfy@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~UV9dZz0eURSmz2M5rM@&15)(Je7keuHT z{Dh(7sf3`ohhTUIQ~65eQ!#=eSD2rtMpxX50L02N$R6lyjvM_#C$Pc0?rmJXyWuf!2yh z-F>eNkGUw;RBuh2z;`fQQ*m1akCc6V^RHD$&MsV_y&`*C%Z;e5t&2Lgh*ihl&p5a} z!bAJX>dt6^d_UM*A+bj{?BOxG&6HjdvB=x z#KK@9w{7wIO6`3UR5&;3Fh96|;ppAdq0GCEOiP%5Q91A3Tld#7lmDG53QpP@mAL_o1DU&n90v8zw!eEbC>w_SMTKN7=)j_)06mot`ivZ44$rjF6*2UngAVb1wa4* diff --git a/dev-assets/doodads/trapdoors/down2.png b/dev-assets/doodads/trapdoors/down2.png index 51a7c8c2aa70812b473a3245d5d6cf14bdc8b509..62adb4687ac6095ce147338c8822b4b36c1e72b4 100644 GIT binary patch delta 702 zcmX@beu_hhUQu&|fq}6))7d#7GdX#qNd;rQ zzh>uspp-(gN02WALzNl>LqiJ#!!Mvv!wUw6QUeBtR|yOZRx=nF#0%!^3bX-ANC)_Y zxB_V)@U@hlIdf)rs!m#3ny#+y^y$<8|Nrl|>{A<1j z)G8o{v%n*=n1Ml0nSr5RPnoe|seKtxl)c2$*OmP#vpkbJ*B{|YbAdwlJY5_^JdVG; z?8wz@AmDH@Q}MUY+TTVMjGS=}MGZO6xb`}{=bt+xYw=c7Cvn{~_d7oD2rp*n@F;1V z#P=fVi|y2kl68kSPhYfr{moOQXPRYyz0gi8Q&)Olyx*=`*Cc9X<)`|ul>r)23|>Ef z{wnUj9^K7wMxZacu77J$UQwd3)1KNNX)oK)-ulw9r}t%H)JNOiY0NWzPK&?x-d(yP z(|CS#nr!1_o9J2JT4{%7Nj7(2$#-l9^Ts*I;B3Vq|D#XkcYz2+>f! zKQgEYtnVANYB=ND8KWu|A8Fa(q)}peR2r zGbeSUP6eY~H0w=Epc1wuZ+91l{~)+v@AAn&5zYdS$YKTtJ!KGPtXOJa1{7p3@$_|N zf6OAtrp{KzWfwA8omst}aj~b1V@SoVw=)jr9x{+{t9OrF@O<3?)kjyn&0k2E9yVZ% zTP$60Qqw%_#Z19FlY@_M>}+O=I9V+u)S{x{fB*kYr<3+!O#AHavCpr+6|XAo{Ike! zdGP(eiH<<%E78LD|- zhMq| zN;h+>t#~o&mR6L$dgnV&UxVA;F>%tng)D^&>uut%Em?5Gm_am?CVw4m^LNo(r1ps zf7+Hw(NDv!U)`x$S>`z1Nwmz{=TMZpcD4H2t#YFIS+2LGzFzs4{`zl7Yo})B`rtDi uogFqwOWyscW@rlK5nusE5q7X4>>tC{f1h?6GbNk`sql35b6Mw<&;$T1HRcKc diff --git a/dev-assets/doodads/trapdoors/down3.png b/dev-assets/doodads/trapdoors/down3.png index 986e8b4064aff86919858b1880f80fe5a64d6826..6c1f19160095773bb430fb5cc181084b9c651a0c 100644 GIT binary patch delta 716 zcmbQqaf3srGr-TCmrII^fq{Y7)59eQNQZ$i3p0>hUQu&|fq}6))7d#7GdX#qNd;rQ zzh>uspp-(gN02WALzNl>LqiJ#!!Mvv!wUw6QUeBtR|yOZRx=nF#0%!^3bX-ACY(RB8%%881$4un6YB1eHl=cy~NYkmHjERJd--tAK^)JfkMwbT^vI^ zj=!C3$aUC&$Mq`DytUI(^x9+;e(>ydII#QW0_iV&cdH+2wQV`O)<~~URbC36Iu5Ahuxo@X>q-lQr`c7xB4p-jSU+=Dv zR^*J|cjM8aQ??4-+_P1CGR+eGCwb0M5G&0QD^l{{N|l}198?pLu<=({TZGhX%`G#3 z>E)zH@n|XRl=1D3Dzl9iYTkFaYMWT~#P>%%9@gu-b@66Lyh%SO&*Hr?w&#yRMAu)j z(qp==-WP*pCNbSxt@&W92-o8b(c8;>XPX^AC+*7T!>RdGZ_ngcjOz6aswJ)wB`Jv| zsaDBFsX&Us$iT=@*T7iU*f7Mv$jaE<%GgNTz`)ADz&&X~IWU|M8glbfGSe#I8jLJL zj0~*|4Xlg|AsWiJ{Otp3kOtWRObAxV`303lnduoN3<0G{Ihn}{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91l{~)+v@AAo$rJ3Zo9&w(Fe@fQ+ud-QpAh4(K-=g=`o-<>9C)fOHoB5 ztl`X=#*)R3Y0n-++*FV%dEDiAFuI3#kz`G>MqouDErw^U$gU^`Vq}=9^u(@LxG{p;OXk; Jvd$@?2>?Rjs4xHk diff --git a/dev-assets/doodads/trapdoors/left1.png b/dev-assets/doodads/trapdoors/left1.png index e8cc2a6badc1267eb622c0415406c5bba86476e5..6bb04d206bbe0c3498d5466253b3b0f5c53c1bab 100644 GIT binary patch delta 640 zcmbQh-p8TS8Q|y6%O%Cdz`(%k>ERLtq{Bd%g&9aLuc$e~z`$6O>FgYknVh`Qq>{0| zigVXKpp-(gN02WALzNl>LqiJ#!!Mvv!wUw6QUeBtR|yOZRx=nF#0%!^3bX-ANC)_Y zxB_V)NJ~qbIdi72uI}{d(|s+ayHj=k|Np-*@Od6kj z)G8o{v%n*=n1Ml0nSr5RPnoe|seKtxl)c2$*OmP#vpkbJ*B{|YbAdt&JzX3_JdVG; zWXR>@$is3Whb!B@sZ`=%TrunV2cqA&{{K?@;F#mXlA98g^R ztpEE^Udf#Yajf-8x)utL`zFV~is?@NA-XiQF*AzYt2@T=n9#w}Opo*D`tEPr>AL6k znw%*MI=FY2=0;r3S(mz*>-DWa_6PWL)@0Xq*X5~wUwd+Au4wJ;chjfAz&HChb3QZb zS`}yRDCsyj`8A_@J%ehAYeY#(Vo9o1a#1RfVlXl=GSoFN)-^T^F)*?+Hn%c1(l#)# zGB9vYnoth(AwolLeoAIqC0v7%MTn81m7#%^ks(Aw`If(ZKn>C$8-S5#m7HHtS(KTc zQNj>Vnv|27tl*Mgo12)Kw{4p;ya}g(3i#j(@>5cC7(iO16Fi-PG7O%s KelF{r5}E*Z-P^zb delta 489 zcmeCERLtq&+~GgAGWAzTNE3z`)p&>FgZf>FlgfP?VpR znUlIvr;<_3xa8tupc1wuZ+91l{~)+v@AAo$#hB!{9<#HG$nZu9AAL0WHIsThV}_@T zV@SoVx3@Ruwit*U`*{AE?u1#QeO;$~%@TSJ7)UbAJ?`0`vB}*{L6q;fHiL=&)#raHTF8I!TY_I%{9C49_rlpo_W$q-sdbmDrZY$Pg|;c zX3cuWsHwd`_uQ^UWm?&CZH|{sT7{!kX4k(Kif-14ej}ItR`!%d-}mdq2P?yD4fm9O zo8a?Kw4_BM`vQ00cRTw9i|fA3*1WdMOI&oy-0KX=nQ^_}8YYMG-_l#US8hviq^{Ko%Sm-Dbyp0Lv!-F z6`I@D*3X$z7b0?DS5lCD-dZldHS(hSkDTkPQ7*E0rfYJXkwc+@feB1>Ft7+XFff7$ zL6{ha0uxLOD1lI{1W^Z4%(7tlPKOVZpSs^G-N$&6XF~e>ljk=AV}`-g)z4*}QvzcX E0PXj^)&Kwi diff --git a/dev-assets/doodads/trapdoors/left2.png b/dev-assets/doodads/trapdoors/left2.png index 9c74728a2c7cf3549a1571a6262711ac7af0c49b..cd29dd536c7135a2ea36a50738a6bd42d644ab0c 100644 GIT binary patch delta 704 zcmey$ewIV0Gr-TCmrII^fq{Y7)59eQNQZ$i3p0>hUQu&|fq}6m)7d#7GdX#qNhM=_ z73Z#fKq-Y}k04(LhAK4%hK3dfhF?ITh8GMBr3MTPuM!v-tY$DUh!@P+6=(yLkPh$( zaRt&qkd~GOtZ8LSikwbJmC|vWIp^dljSso$cTfFPymhc>w}-c`+3Af@D|5EL*l_V8 zvq!A<*Be3C^Zs7*$~9kc`@Bx++})+oKrykt!x!H?sJ^oM>4(SJTYLX7@TLCz5|zts zzJk@-;@Inr-RI9$-w1kRzIo*y29DRWs$4&+C{CIDno+%;LAAs+q9i4;B-JXpC>2OC z7#SED>KYj98XJZf7+D#cTNxW^8yHv_7`P`*C@X{p@Ef= zAw)y@mcM;K4bmVRfRS&NoL^8`l$oAU!VplJl#`jP;F4dPo0yrmZK7c`P@NJ?T}o%< h38#Px_}~iiQ&MvnKw6^{Je`3u44$rjF6*2UngE(B{b2wA delta 590 zcmX@h@s-`AGr-TCmrII^fq{Y7)59eQNPB=V2O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0S5*~77*dWz{H`@03np1Vn7KNm>5$B16Uop;tth?CI92uBgLLG-@HEa V*QK1IeZcr)@O1TaS?83{1OV-c#ex6; diff --git a/dev-assets/doodads/trapdoors/right2.png b/dev-assets/doodads/trapdoors/right2.png index d4b090ff99e873fbdf93f5d10933c37c719347bc..e7f33d4e5da9c412f26b577cbe1065ae1631ff42 100644 GIT binary patch delta 714 zcmey&ew{<7Gr-TCmrII^fq{Y7)59eQNQZ$i3p0>hUQu&|fq}6m)7d#7GdX#qNhM=_ z73Z#fKq-Y}k04(LhAK4%hK3dfhF?ITh8GMBr3MTPuM!v-tY$DUh!@P+6=(yLkPh$( zaRt&qFmvY2w6ru`UES%^r~6t;cc<$7|NoyW@lrETj z)G8o{v%n*=n1Ml0nSr5RPnoe|seKtxl)c2$*OmP#vpkbJ*B{|YbAdvyJY5_^JdVG; zX2^HQfQP|hvBzBLI)`740ridg8>Xv9&OGtG@RG-crQ1{mG*>O>Q$JlcXB$JA;07`F z*XK4HyhyZNBmLph`SU*TeyK>d z$ydxiO5T{Wly}-KwY)%Kvs3w-F8%u>H2Gqy!vFr8J~oUyPuG|Jf9lsf`8A_@J%ehA zYeY#(Vo9o1a#1RfVlXl=GSoFN)-^T^F)*?+Hn%c1(l#)#GB9vYnotf5D};vJ{FKbJ zO1K6iix4A2D?RdRkoWl?5&MhQbeX;MyRvVu!~ZEj*_ z-nNN`(Li-dFm)-Z#mPmP1tppJc?|BJz5xnJrI|S;x|w+j#X;^)KIx9aK-Ho!)wzjz vrD=)DC8b5FMPTJV^Cp}ED&T`F$WKYlVE}23PVjUF$}o7k`njxgN@xNA2nY#* delta 588 zcmV-S0<-y{D6t76Kj$;|B#49|w`^ ze?OBn11En0%Sl8*RCwC$*|BlLKoAAcFO3>-tQJTZMM~U(%HSB)LIrni(18<0L~;wn zEq9>lo);=6fb;ps{5406?DS-VaHT zM~swk0Kh9yRaNl5@x4xR2N`1~K*!_JyQr7CBqbm;bvfLS24l=%tsShj_xIK==hUjW z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Ll5 z54(Q`uM2|p(&~Cj?wh2y^pp37Job(>28lb&;5}<-Pl8CIMx1U@BMmkgJJP5IV@4X? zT&zfw8jBHWa#OJ(&1xtnq}k2Hg7i=$F(5tM1b3uG8sLnySn*tu7A>43(&9yPLt3R^ zPDra2%LQrGLOCF7QT^I>Hj+dlkw_#Gi9{liNF)-8L?V$$$m9?D>Yu(1+ss4&000R9 LNkvXXu0mjfsSF9d diff --git a/dev-assets/doodads/trapdoors/right4.png b/dev-assets/doodads/trapdoors/right4.png index cf7a4e0e69b3a97acc31fbcf931acd0db2dbcc80..8c0d01de9a76bd50ccef56d7e34745364a7b77a4 100644 GIT binary patch delta 592 zcmbQrcAs6RGr-TCmrII^fq{Y7)59eQNQZ$i3p0>hUQu&|fq}6m)7d#7GdX#qNhM=_ z73Z#fKq-Y}k04(LhAK4%hK3dfhF?ITh8GMBr3MTPuM!v-tY$DUh!@P+6=(yLPz>-1 zaRt&qFmvY2w6ru`UES%^r~6t;cc?NMQuIx{l<(bsE{s>Q+3lz%nba4#v zIR5s+M&1Sk9+$wy9#nV3^gzV7$R};gZfCm)3VzO^4YWS+||pC&pNq) zz!zolCwr@nqOx?hPJYd(QLkF!8c~vxSdwa$T$Bo=7>o>z40R2Rb&U-}42-Od&8>`$ zv<(cb3=G_pCX@r+iqMdopOTqY3D;m`5n^O$WoTe!WC+nvzU6NpP=hqc24G}ZCFd7Z z7Gnwe9g zo0+Fj9OUlglkO-CR4ocqotv0fnwFScQd*Q+1Xk`dZ^9{{0zSBc{FKxj29Vb11W#w6 O41=eupUXO@geCwvI>1E$ delta 364 zcmcc5K9$X+Gr-TCmrII^fq{Y7)59eQNPB=V2OE$KeY@G6fq}6l)7d$|)7e>}peR2r zGbeSUP9>w5ammHSKqYKR-tI08|3PrU-sO`g%P`4tJ!WSWkvBVFTF*Lp50ggyTTd6q zkcwMxuPXYn7)rD~Tz^(ABU`9x3`66=2Lcm(0%f@( zo0J;g{ywok`PZ_`R<#eqjB`Ff^)=LCD#tmk`+jvo%ldnfnxuJ*Ohe>d;-Gre@R pU}5|6@V$FP9|66M1AHjo%lz5X|Hr<-QzalJp00i_EbE*SngG4!mGA%n diff --git a/dev-assets/doodads/trapdoors/trapdoor.js b/dev-assets/doodads/trapdoors/trapdoor.js index 5ad50c2..54dca12 100644 --- a/dev-assets/doodads/trapdoors/trapdoor.js +++ b/dev-assets/doodads/trapdoors/trapdoor.js @@ -5,8 +5,8 @@ function main() { var timer = 0; // Set our hitbox based on our orientation. - var thickness = 6; - var doodadSize = 72; + var thickness = 10; + var doodadSize = 86; if (direction === "left") { Self.SetHitbox(48, 0, doodadSize, doodadSize); } else if (direction === "right") { diff --git a/dev-assets/doodads/trapdoors/up1.png b/dev-assets/doodads/trapdoors/up1.png index 686664b34b697ba6de544cc200048330f6367f56..bc7830c0046b01cca2f82806ea8948c3e03c8dab 100644 GIT binary patch delta 633 zcmdnb*3O~R8Q|y6%O%Cdz`(%k>ERLtq{Bd%g&9aLuc$e~z`$6O>FgYknVh`Qq>{0| zigVXKpp-(gN02WALzNl>LqiJ#!!Mvv!wUw6QUeBtR|yOZRx=nF#0%!^3bX-ANC)_Y zxB_V)NJ~qbIdkUp>C<&}b$uX-G0xo?ClxH<4b3${@tW`K&!XfPE9JG6E=^~t+uV+v#ag8WRNi0dVN-jzTQVd20Muxfu#=6FaAqGZP#^zSWM%o4jRt5&{ zNfXL}UPEZe%}>cptAuMXvIsFUv@$fXGBSi{DBtq852!&JWCJkPtdjE!DvL7HGfEf& zN|SOjlNDU@YjYDb^R`Vij0UPxf~iYMElw`VEGWs$&tq`+^bJr*D$UF((ap?LC=POW z@=13T2C5c?sm@KzD@{vGE-5WaEdnd|nK$7SPyruYL4HbV4g*MQbb_ZdP=>+N)z4*} HQ$iB}kRsR; delta 407 zcmZqY*w1Ft8Q|y6%O%Cdz`(%k>ERLtq&+~GgAGWAzTNE3z`)p&>FgZf>FlgfP?VpR znUlIvr;<_3xa8tupc1wuZ+91l{~)+v@AAo$#hB!{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fq{Y7)59eQNPB=V2OE$KeY@G6fq}6l)7d$|)7e>}peR2r zGbeSUP9>w5ammHSKqYKR-tI08|3PrU-sO`g%P`4tJ!WSWQPi6H(ZYQ4X(si0Mm0|t z$B>F!Z|@lLH5o`8{TRNOFHcX8C+7<|7n-!}Ze8WyU5O$E-)^7y`gXov_~Yxrtn==s-CT42>e^yE!Aj`{1||*#2*KgN zz{ny1CKzF23`+HIK?epwglZmdKI;Vst01O0|wg3PC diff --git a/go.mod b/go.mod index f2b845d..4541617 100644 --- a/go.mod +++ b/go.mod @@ -24,6 +24,7 @@ require ( github.com/robertkrimen/otto v0.0.0-20200922221731-ef014fd054ac github.com/stripe/safesql v0.2.0 // indirect github.com/tomnomnom/xtermcolor v0.0.0-20160428124646-b78803f00a7e // indirect + github.com/tsenart/deadcode v0.0.0-20160724212837-210d2dc333e9 // indirect github.com/urfave/cli v1.22.5 github.com/urfave/cli/v2 v2.3.0 github.com/veandco/go-sdl2 v0.4.4 @@ -38,3 +39,4 @@ require ( mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 // indirect ) + diff --git a/pkg/branding/branding.go b/pkg/branding/branding.go index a1c736e..0dcb5b7 100644 --- a/pkg/branding/branding.go +++ b/pkg/branding/branding.go @@ -2,11 +2,11 @@ package branding // Constants for branding and version information. const ( - AppName = "Project: Doodle" + AppName = "Sketchy Maze" Summary = "A drawing-based maze game" - Version = "0.4.0-alpha" - Website = "https://www.kirsle.net/tagged/Doodle" - Copyright = "2020 Noah Petherbridge" + Version = "0.5.0-alpha" + Website = "https://www.sketchymaze.com" + Copyright = "2021 Noah Petherbridge" // Update check URL UpdateCheckJSON = "https://download.sketchymaze.com/version.json" diff --git a/pkg/collision/collide_level.go b/pkg/collision/collide_level.go index ac960cd..0e50cee 100644 --- a/pkg/collision/collide_level.go +++ b/pkg/collision/collide_level.go @@ -25,7 +25,7 @@ type Collide struct { MoveTo render.Point // Swatch attributes affecting the collision at this time. - InFire bool + InFire string // the name of the swatch, Fire = general ouchy color. InWater bool } @@ -222,7 +222,7 @@ func CollidesWithGrid(d Actor, grid *level.Chunker, target render.Point) (*Colli // IsColliding returns whether any sort of collision has occurred. func (c *Collide) IsColliding() bool { return c.Top || c.Bottom || c.Left || c.Right || - c.InFire || c.InWater + c.InFire != "" || c.InWater } // ScanBoundingBox scans all of the pixels in a bounding box on the grid and @@ -276,7 +276,7 @@ func (c *Collide) ScanGridLine(p1, p2 render.Point, grid *level.Chunker, side Si // in our result. If non-solid, we'll collect attributes from it // and return them in the final result for gameplay behavior. if swatch.Fire { - c.InFire = true + c.InFire = swatch.Name } if swatch.Water { c.InWater = true diff --git a/pkg/play_scene.go b/pkg/play_scene.go index aca3dd1..5db1890 100644 --- a/pkg/play_scene.go +++ b/pkg/play_scene.go @@ -138,9 +138,11 @@ func (s *PlayScene) Setup(d *Doodle) error { // Handler when an actor touches water or fire. s.drawing.OnLevelCollision = func(a *uix.Actor, col *collision.Collide) { - if col.InFire { + if col.InFire != "" { a.Canvas.MaskColor = render.Black - s.DieByFire() + if a.ID() == "PLAYER" { // only the player dies in fire. + s.DieByFire(col.InFire) + } } else if col.InWater { a.Canvas.MaskColor = render.DarkBlue } else { @@ -352,11 +354,11 @@ func (s *PlayScene) RestartLevel() { }) } -// DieByFire ends the level by fire. -func (s *PlayScene) DieByFire() { - log.Info("Watch out for fire!") +// DieByFire ends the level by "fire", or w/e the swatch is named. +func (s *PlayScene) DieByFire(name string) { + log.Info("Watch out for %s!", name) s.alertBox.Title = "You've died!" - s.alertBoxLabel.Text = "Watch out for fire!" + s.alertBoxLabel.Text = fmt.Sprintf("Watch out for %s!", name) s.alertReplayButton.Show() if s.CanEdit { diff --git a/pkg/uix/canvas.go b/pkg/uix/canvas.go index a4e1fe4..c99f0ae 100644 --- a/pkg/uix/canvas.go +++ b/pkg/uix/canvas.go @@ -108,6 +108,7 @@ func NewCanvas(size int, editable bool) *Canvas { Editable: editable, Scrollable: editable, Palette: level.NewPalette(), + BrushSize: 1, chunks: level.NewChunker(size), actors: make([]*Actor, 0), wallpaper: &Wallpaper{}, diff --git a/pkg/windows/add_edit_level.go b/pkg/windows/add_edit_level.go index 121483d..d6efc62 100644 --- a/pkg/windows/add_edit_level.go +++ b/pkg/windows/add_edit_level.go @@ -43,7 +43,7 @@ func NewAddEditLevel(config AddEditLevel) *ui.Window { window.SetButtons(ui.CloseButton) window.Configure(ui.Config{ Width: 400, - Height: 180, + Height: 240, Background: render.Grey, }) @@ -167,6 +167,73 @@ func NewAddEditLevel(config AddEditLevel) *ui.Window { }(t) } + /****************** + * Frame for giving the level a title. + ******************/ + + if config.EditLevel != nil { + label3 := ui.NewLabel(ui.Label{ + Text: "Metadata", + Font: balance.LabelFont, + }) + frame.Pack(label3, ui.Pack{ + Side: ui.N, + FillX: true, + }) + + type metadataObj struct { + Label string + Binding *string + Update func(string) + } + var metaRows = []metadataObj{ + {"Title:", &config.EditLevel.Title, func(v string) { config.EditLevel.Title = v }}, + {"Author:", &config.EditLevel.Author, func(v string) { config.EditLevel.Author = v }}, + } + + for _, mr := range metaRows { + mr := mr + mrFrame := ui.NewFrame("Metadata " + mr.Label + "Frame") + frame.Pack(mrFrame, ui.Pack{ + Side: ui.N, + FillX: true, + PadY: 2, + }) + + // The label. + mrLabel := ui.NewLabel(ui.Label{ + Text: mr.Label, + Font: balance.MenuFont, + }) + mrLabel.Configure(ui.Config{ + Width: 75, + }) + mrFrame.Pack(mrLabel, ui.Pack{ + Side: ui.W, + }) + + // The button. + mrButton := ui.NewButton(mr.Label, ui.NewLabel(ui.Label{ + TextVariable: mr.Binding, + Font: balance.MenuFont, + })) + mrButton.Handle(ui.Click, func(ed ui.EventData) error { + shmem.Prompt("Enter a new "+mr.Label, func(answer string) { + if answer != "" { + mr.Update(answer) + } + }) + return nil + }) + config.Supervisor.Add(mrButton) + mrFrame.Pack(mrButton, ui.Pack{ + Side: ui.W, + Expand: true, + PadX: 2, + }) + } + } + /****************** * Confirm/cancel buttons. ******************/