From a54812ed50379bd8baacce53c16aeccdff752327 Mon Sep 17 00:00:00 2001 From: phat_sumo Date: Wed, 6 Apr 2022 18:26:03 -0600 Subject: [PATCH] convert hedge to grayscale, fix lava entity to use the new sprites, wordIs is pushable, dynamically color sprites --- assets/image/hedge.png | Bin 1640 -> 17841 bytes src/entities/lava.js | 9 ++------- src/entities/wordIs.js | 3 ++- src/render/graphics.js | 13 +++++++++++-- src/render/sprites.js | 21 +++++++++++++++++++++ 5 files changed, 36 insertions(+), 10 deletions(-) diff --git a/assets/image/hedge.png b/assets/image/hedge.png index 505d494fb1b22d7a26d7d6c6fd43b5747abafb39..3fc280d43cc42a968ec85d741dfb94d74802711f 100644 GIT binary patch literal 17841 zcmeIZRd8HQvM$ zxaVy;qPuHVW_^|UWmZPl>QzyS@{$O!IIsW!06|(xO!?zm>f?e{ zR@HP>Hu4~HbapVevNa=e^>Q>LGV`=D2LL?3SLawI;Y)uheqX2l1>M3pQmWWki;Q>^FA*K82Qa!@9Z$M@e~fBZh{`AsW!)iF_W&trZ6I!+qT^<4OJ zwbCRQGV@UOHs0fp`TKV_T#rBUv-;lE-CN_z*Om8Q{!e~ESG8jrhw*UtZ$CrsACV+} zxBI`R!wp^47W2-p{P-cV|3ie@Ul3XlD`UIC7r*PRJ=CqI=c+dK?kb>6@VDk;&*i}5 z)$nC*|Bqs92iUQn7BYgI33mamR=46Ug0zhA6*q1Tf}+2gEo?^vzEd(zylzy#oFUE& z3f6th|GU;;;H9kOFrcUWMdRo1-=_wXI^zK?_L8?6uM>|8wY*8y zzn>0%odKU7AAMqf)S5j6{0_KseYBmcGCqp7JDn-?r=RQI3yX=9erOrL8h#I}&3+?z zz5K$o`ZRsB&gg%|Br@2|c;MI%$26EQ`9Lf(f=-SUx?{eJL*6wkJa3^bz^~;TMNNm9BEH}xYq;7 znxZVQrW6}I@j`f_M%nr>-;H7&nzZ0t8Ie(1Sx+Ih5&3>*DpLao*kRh_5BZ*R`dh*r?%DME?Lid-hO}8p?_`AW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e(bfO} delta 1370 zcmdnk&G>?6f^t0rOS+@4BLl<6e(pbstPBhc3dtTpz6=aiY77hwEes65fI&u`8WOFbuF$ys-16hnf$k3k2zyfA7FaS*g z0;UB_a1oCM%uqHz1A_!eHYrG^3#i6m@&Qxn$%1C4TxNO(dIm~%TnY-4L(E*6fYfv| z6&3{`nA~P=3}I|F*Q*DqfC8J;ip(^tfXs^2oJg0<+|<0{%=|n%BNH2atP)r?Mj$kr z8zE~%l0ep253Q1v$Y zMJZ`kE~&-IMVSR)#UKfYXpoDW9hZ%Mg;hm;Zb5EpNunLs)Hgc?85o$;JzX3_A~=`M z$juXW6mV%?-~Pbu&m%X5bL>+tM$gl>HP((e`Rd)TS2sIFmG0dWJHLFreEl=#w{{XW zk6-w2t)0KM`%mz(&i7{~*FBOKzR`aF?EU?JeoW}O=CiZ+X7OJY6(jv0Vbbf3e{V99 z?ykFK9#?;%q-h^VT6Vbi8qf2NClcJQ8_N~!myioDIrn_ip{JkUe&-j<`P8JV-%-$_ zlUimfKL7c(nZ^C@_{{d+ILCi|YWbVF^VW0Es?%Z-$a&ndRn9l-)7jnb&ue}ho3XND z`RBuLvz~vs_qyrF$}Nh#|E_7@cnK6v$sP+ zT~2nZ>CE1p$0xsPPIYrPomN-1rnP+C&zH4_7IXgJu%g*$c6#Eg7U3Q~`_0<7G}U)K zxaPn2^IiAZe~!%&>@${l|L+&u(F;#Zz6a^wO!c|LWxVgSx%pgC9jo+R?#77^>*tBH zoIEs7x#hK8@s|pt&o`K-W&K@}dFJN3lPuZsKaMS8J?yU9FLn2G{6%-gwL{ax*M&b%{TzvVisYe|)r$>)}*`sa>W@8)OO zf9Rz5-KXESIWgjE&N>)Pms?2J=gZ*@<00y{6G1hb*_w1>!0;kw}*g=Fi%%M Jmvv4FO#o { lava.addComponent(game.components.LoadPriority({priority: 5})); lava.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); lava.addComponent(game.components.Alive()); - lava.sprite = game.graphics.Sprite({ - image: game.assets.lava, - spriteHeight: 24, - spriteWidth: 24, - numFrames: 3, - timePerFrame: 100, - }); + lava.sprite = game.sprites.lava; + return lava; } diff --git a/src/entities/wordIs.js b/src/entities/wordIs.js index a32bfa1..ca00856 100644 --- a/src/entities/wordIs.js +++ b/src/entities/wordIs.js @@ -2,7 +2,8 @@ game.createWordIs = () => { const wordIs = game.Entity(); wordIs.addComponent(game.components.LoadPriority({priority: 3})); wordIs.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); - wordIs.addComponent(game.components.Stop({stop: true})); + // wordIs.addComponent(game.components.Stop({stop: true})); + wordIs.addComponent(game.components.Pushable()); wordIs.addComponent(game.components.Alive()); wordIs.sprite = game.sprites.wordIs; return wordIs; diff --git a/src/render/graphics.js b/src/render/graphics.js index 6a199f0..8a4cb1c 100644 --- a/src/render/graphics.js +++ b/src/render/graphics.js @@ -6,7 +6,7 @@ game.graphics = ( context.clearRect(0, 0, game.canvas.width, game.canvas.height); }; - const Sprite = ({image, spriteX, spriteY, spriteWidth, spriteHeight, timePerFrame, cols, rows, numFrames, drawFunction}) => { + const Sprite = ({image, spriteX, spriteY, spriteWidth, spriteHeight, timePerFrame, cols, rows, numFrames, color, drawFunction}) => { timePerFrame = timePerFrame ?? 100; numFrames = numFrames ?? 1; cols = cols ?? numFrames; @@ -33,6 +33,15 @@ game.graphics = ( const row = currentFrame % rows; const col = Math.floor(currentFrame / rows); context.drawImage(image, spriteX+col*spriteWidth, spriteY+row*spriteHeight, spriteWidth, spriteHeight, x, y, width, height); + + // apply color to sprite + if (color) { + context.globalAlpha=0.7; + context.globalCompositeOperation="source-atop"; + context.fillStyle=color; + context.fillRect(x, y, width, height); + } + context.restore(); }; } else { @@ -43,4 +52,4 @@ game.graphics = ( return { clear, Sprite }; } -)(document.getElementById("game-canvas").getContext("2d")); \ No newline at end of file +)(document.getElementById("game-canvas").getContext("2d")); diff --git a/src/render/sprites.js b/src/render/sprites.js index d8ae126..9626b00 100644 --- a/src/render/sprites.js +++ b/src/render/sprites.js @@ -12,6 +12,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#ede285", }), floor: game.graphics.Sprite({ image: game.assets.floor, @@ -19,6 +20,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#404040", }), hedge: game.graphics.Sprite({ image: game.assets.hedge, @@ -26,6 +28,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 250, + color: "#5c8339", }), grass: game.graphics.Sprite({ image: game.assets.grass, @@ -33,6 +36,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#5c8339", }), lava: game.graphics.Sprite({ image: game.assets.lava, @@ -40,6 +44,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#e49950", }), rock: game.graphics.Sprite({ image: game.assets.rock, @@ -47,6 +52,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#90673e", }), wall: game.graphics.Sprite({ image: game.assets.wall, @@ -54,6 +60,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#707070", }), water: game.graphics.Sprite({ image: game.assets.water, @@ -61,6 +68,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#5f9dd1", }), wordBigBlue: game.graphics.Sprite({ image: game.assets.wordBigBlue, @@ -68,6 +76,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#0f2439", }), wordFlag: game.graphics.Sprite({ image: game.assets.wordFlag, @@ -75,6 +84,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#ede285", }), wordIs: game.graphics.Sprite({ image: game.assets.wordIs, @@ -82,6 +92,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#ffffff", }), wordKill: game.graphics.Sprite({ image: game.assets.wordKill, @@ -89,6 +100,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#e49950", }), wordLava: game.graphics.Sprite({ image: game.assets.wordLava, @@ -96,6 +108,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#e49950", }), wordPush: game.graphics.Sprite({ image: game.assets.wordPush, @@ -103,6 +116,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#90673e", }), wordRock: game.graphics.Sprite({ image: game.assets.wordRock, @@ -110,6 +124,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#90673e", }), wordSink: game.graphics.Sprite({ image: game.assets.wordSink, @@ -117,6 +132,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#5f9dd1", }), wordStop: game.graphics.Sprite({ image: game.assets.wordStop, @@ -124,6 +140,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#252e0e", }), wordWall: game.graphics.Sprite({ image: game.assets.wordWall, @@ -131,6 +148,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#707070", }), wordWater: game.graphics.Sprite({ image: game.assets.wordWater, @@ -138,6 +156,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#5f9dd1", }), wordWin: game.graphics.Sprite({ image: game.assets.wordWin, @@ -145,6 +164,7 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#ede285", }), wordYou: game.graphics.Sprite({ image: game.assets.wordYou, @@ -152,5 +172,6 @@ game.sprites = { spriteWidth: 24, numFrames: 3, timePerFrame: 100, + color: "#0f2439", }), };