From 656547aacd48b208f9123a1b155c70c57d04b3e5 Mon Sep 17 00:00:00 2001 From: Aaron Mueller Date: Sun, 7 Dec 2014 16:27:35 +0100 Subject: [PATCH 1/3] GFX polishing --- public/images/entities.png | Bin 620 -> 696 bytes src/entities/silo.coffee | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/public/images/entities.png b/public/images/entities.png index ba74e10803405f9cca3ffe782f5f0ba8d5523b14..aae252ffb7719290c2f26176f98322f40f668310 100644 GIT binary patch delta 641 zcmV-{0)GAM1h@r|LVphw0q!!Qxc~qHS4l)cR9M69lfP>dVHn3hZ<4lPq}&l4G=$bf zB0@@yHg*u_LLHP&YM>yr)`FW`7ySd&#lfLV|AFGxE)r0Rg!a%OWJp}Bv_ol|VAB@T zl0FXU#k)(BUWuWD`N9Kt@8|h-&%F;Kf@!L&Tl~?OSkKzcm4Ap3`|wdXR(WIHeB{UL z7Yb-A_hC_ABm$8L0Qs+9aH<*aJ3e<4zc4b$wO8)}@Oip>Br@}sH%}kgoTulqc)EK8 zzzu&kdauSF_Fv-i6NAXsl_x zHNS5+mr+-qOn=LRPnjBA7#YMLjj@}{C;%t-M`Kh6^UEUTp~fiFxW_?mF=# zDx{N1#)3iH2R1X`kgj7CiyZFkuslA_N;b={{e1w2j>mcy{ymqgXD|Hs(^d3rR#lR9M69lQBqJQ51&%`+SX{rR0*W(P|TT zrI=7Gv4VqZ2M57PDhLHr5ju4#wG=uPhjwm33Jx6$r9*HL=@`tT4l$tZQVT+*YG|T@ zO8h&dFMaQt7gMewL-WId_wIMjy+8Nd1Cnq;Tnez$iqXB+Xn!t9BKGCxrX((sWV)V#N``tR_mFwK|^`7$Ix^;;>j^?{@j9} zbouG=kxL)#Y)o@^oKcP0nPp?iN%Yp%8+KG0!8?<$f~Mf`pV+i*>o5DmTz98ECQ$ zcMpr3gDh?iQtf9wT+6_2QgCMqXv@UWmWliJ*x@@<<(dmK5Sph5&Hp`gH!0{oK>b(q zb>tbt!Y;Qv0DvpKD^ - if @frame == 2 + if @frame == 1 @frame = 0 else @frame += 1 From b510790ef811483bd448cbbcda5d2e7c3e89336e Mon Sep 17 00:00:00 2001 From: Aaron Mueller Date: Sun, 7 Dec 2014 16:27:44 +0100 Subject: [PATCH 2/3] can't click on dead tiles --- src/game.coffee | 9 ++++++--- src/tiles/tile.coffee | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/game.coffee b/src/game.coffee index e140d12..23d7343 100644 --- a/src/game.coffee +++ b/src/game.coffee @@ -5,8 +5,7 @@ app.game = @map[20*5+10].entity = new Base @mouseX = 0 - @mouseY = 0 - + @mouseY = 0 @currentHoveredTile = new Tile(-1) @currentSelectedTile = null @@ -23,10 +22,14 @@ app.game = @speechbubble.render() mousedown: (event)-> + tile = posToTile(Math.floor(event.x/8), Math.floor(event.y/8)) + + # Can't click on dead tiles + return unless tile and tile.isBuildable + if @isMouseInView event.x/8, event.y/8 switch event.button when 'left' - tile = posToTile(Math.floor(event.x/8), Math.floor(event.y/8)) tile.click(event.button) @currentSelectedTile.deselect() if @currentSelectedTile diff --git a/src/tiles/tile.coffee b/src/tiles/tile.coffee index ccb40ba..814f286 100644 --- a/src/tiles/tile.coffee +++ b/src/tiles/tile.coffee @@ -16,6 +16,9 @@ class Tile @randomSeed = Math.round(Math.random()*10) click: (button)-> + # Some tiles are not buildable + return unless @isBuildable + if button == "left" if (app.game.availableSiloStorage() - app.game.usedSiloStorage()) > 0 if @layers[@currentLayer].collect() From 270014db3d9bb20d693280ff76bd4a629ee86b90 Mon Sep 17 00:00:00 2001 From: Aaron Mueller Date: Sun, 7 Dec 2014 17:04:40 +0100 Subject: [PATCH 3/3] detail entities --- notes.org | 4 +--- public/images/entitydetails.png | Bin 0 -> 1621 bytes public/images/layerdetails.png | Bin 0 -> 2809 bytes public/images/layers-details.png | Bin 6608 -> 0 bytes src/app.coffee | 2 +- src/entities/base.coffee | 3 +++ src/entities/miner.coffee | 3 +++ src/entities/silo.coffee | 5 ++++- src/hud.coffee | 5 +++-- src/tiles/tilelayer.coffee | 1 + 10 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 public/images/entitydetails.png create mode 100644 public/images/layerdetails.png delete mode 100644 public/images/layers-details.png diff --git a/notes.org b/notes.org index ca4b2de..6b545c2 100644 --- a/notes.org +++ b/notes.org @@ -11,7 +11,6 @@ Title: Entire game on one screen * TODO HUD ** hud: energie progress bar :aaron: ** hud: resources "release to space" on click :aaron: -** selektierte entity in großansicht anzeigen :aaron::jonas: ** Hint für shortcuts anzeigen :ruben: ** Preise für entities :ruben: @@ -19,7 +18,6 @@ Title: Entire game on one screen ** solarpanel item :aaron: * TODO Polishing -** "tote" flächen: nicht klickbar :aaron: * TODO OUTRO ** animation bei voller energybar: typ fliegt davon @@ -28,4 +26,4 @@ Title: Entire game on one screen * TODO EXTRA Polishing ** game balancing ** Miner verschieben -** Silos: Farben je nach Kapazität einfärben \ No newline at end of file +** Silos: Farben je nach Kapazität einfärben diff --git a/public/images/entitydetails.png b/public/images/entitydetails.png new file mode 100644 index 0000000000000000000000000000000000000000..51e86d823d920315750f8a0ec50b5c2fb37c5304 GIT binary patch literal 1621 zcmV-b2CDgqP)9~CDhi}Wn{TF3js7(Tr4d7UBD5c_f6v6UJg~zcN(eW{I`ZC+b z;n%(^?>(BA`btU8JWj}=hcoiWZw+kEgZlknlrJ7SNK4R%6N$^|ps}W!p6<^A5IXW@ zxhcWUlV@em3oml?z&`GN{D}AOMOZ17aViS64fR}m{|;4}N=?u4H6+UZbKjQHiE(-k ze2&ZC>gRDf&ED1!$xNQIX%mkp7+y>gk0&^E@BsU}_wded8)QC{!4s%OIq{{Jc;)Ol zE`IGKwuH&K7|Yoe?ncHLo|tCmXPVg^4iRpu=k(q#vSx{3brrG6DT>qoKskHrB~}U+ z)vAZdg*eT%0seA-ga_jjjE{^kECh|s&2)8la`KzU$UaFi8&_}ydZ-H2qFn#oZ+8W5!5Ol+2yC@%OsQ325R`(Pv7GAUJG^XJ*@HymRUj>9(_nTmm{I) z*%fMHW+}B(Gjwdb0>XjQZ5H2%js2Ym_djH0 zF~!SYIK~Ud`uOFWKfzN|kK65{GB-gCJsOVB0fGOiupKNe3}MLV=wuLu9oMB7gb?hVd9xRVfq-|Ju9;%5!3>YT^$>z{u_vmj1LC} zq~dg9BodT!Ip#-3h()7Zj7I-+4nBGJU5RDk3x{zk3TkgJURCA($OxB%LHV|>i%sXj zua6v&3!|f`!62rtqxk)lb2-YX6uX+6`Kw{@9j{kz>cM*-eZ(olAeYIYluESb^Gq5B zH|OVBo}1&erZHD4Z5~3=viKkxr7n@+lS+jXg#x=(6{}q4<@R<~41kK&gS;c@}sQdM%M$*hzd6hcZN2s<2WJ*aj#X!Ck$ zYHej@VF7z(1v8yyc5slHNQCYkJJ6g?b}I^rtDU@ON}z=ku7! zB!9eqo!T8c5Q;*JZKDBufY3ztE%$( zjt-i;x~OVwTua~nv zIep8!NR(#^EC6e@VfY%FK_2axxWcmN;ZS$9kd$bo!w?K|P$Z1OgeW*`d`fIOgY zG_HUoh+jS3`)L&xR{zx1@68YZDjS3#zJZ_`C~mR2^mK`VPd#5NZs%$UTM?wT8mdJg z2BZPks=C~(9)52%S3lT_V0rbF$|_l5)oz3QK2U!CVW`}`eOv0f&dr-Q5np*n09?3m zK?)(zb)BW9C0s5Se!rg^H*N@kD_5>auh)y;??;)Nn`3-@9K$dGxOC}~ymsx{h8ND6 zGiT)B;Gi%JgG?rarfG<)SFg&ku`wc%2=(>#+`4s3Y}LBw&!3n1d>+#@>Fw=B^!NA6 zWHQOr)D$x_Gh#dafBg7ySu7T5Z*NB#8X7{=G<-hawgu#NyQx$vSeEsFAm@Jq$rYVw T_F+eB00000NkvXXu0mjfh7Jb@ literal 0 HcmV?d00001 diff --git a/public/images/layerdetails.png b/public/images/layerdetails.png new file mode 100644 index 0000000000000000000000000000000000000000..113a8bd2a8b66d9f05e77f045c383759325ab5d5 GIT binary patch literal 2809 zcmV&@e#0hmzCoXmY8r~5&|J4S;uGu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NufS8LxnN|06)?h(v17{}Ooa^sLQB?rarjLSQ z;&H*r5hpI0GIQxt2|yDjYJQA6R^G@=athU{lP?%prd4t-J`X;xn`5WrgxzUU zhLg{)iV?1;C;=QhGbz`7@4v82la2*#EMC}%SNGxf`vIuZQ)F{RR{q^08s;y+?tk;xfx%d#IV zUlBgqAGF7!a_{y|3CO+MJ7s$;DgpEVO=n=9LsQ2AS#DQci_ZTG3h{2zkVuD^00000 LNkvXXu0mjfZe&&v literal 0 HcmV?d00001 diff --git a/public/images/layers-details.png b/public/images/layers-details.png deleted file mode 100644 index 8116c52446968a8cf5cf58c928fde0af0df3056e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6608 zcmds6^*7rX7k#^ z#+um+;bG6L1XtIx=CdIH0BB%v1zA1s`NL1X9(wvYN6=Ena-|CH)QZs%Vxq)Hj6gY= z1VULB0sDm#+0vj3;aP+IhUIr}O-oU4Jnr(CzB$=BUw#mjYj0RU30YsK2?n zL}+SG1Sg)!CKXwgx1|^^=a``&WB8%?soZO!@H)uY3&WSWkiz$VLGZ*1?bG$4KZaP! z+}sZ{ma)@szjp9ntWo-w6qk=5!mp=wFGrVUs4Ll%VRq!SjWKfx4s~{hTb^FCJVDFf z>+2xRq+(`!zTU(iZ?>~sRHjPQ3+wBX7hJk;ZQ)5zdT1=fdwQh%Z`k2Fj|EO*ss2oP z`vZwj>vh=Sr=Z3<2o-qx{-~npSL^UdUAQhqon=5x=78?FP{TD)Y-!W#PJx{6;XATK z8$L6K`&!5tYM@J|T4%4?cIrj4tev?ylH=k5xh}^zi)nFRk+3VA_;`11NsUP~we6dD z3{CR&`JlmXaQLV6`Ngn02>J%c`qrRDW3u{pr7D9h+xZmBtdIQj@$61Wmh;+%gXo2ju!t2gtU78o&V!6_M9g@8XQU2O z%m#PUNK0k9Ki84VXO6yicx)cf5*@Z;4DSnbv3D0vM2wYeSV|@D@UF|<8tyr0ob2UZ ztU4ab#3^h8bC2fgl}>#+UqL8O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^2`5=n{US0p0`6$cQ{mK^|_&}hT9|W-+ z36vPNDwOKFFfdw=Z>~Wy&)+dYWeQ(DQ$qqX2kkkZH+2VK5qDx{=BU6e(V!zI-^?BF zWoPI}-qux|-S9+i5Az*9#mc#Hhg4^1U*fZ@0KM<`GX?EA-VB{D$C>W{9rbJZJOPG| z+%1{-I4Apd0f3$<{)5#4_4byi?w*fFeVhTgY;Xz+3V~2)uW;dq!g!L-`8c$(s^2${;nPYRYs26?ZdB80I$w=z9$Y!&H$ha1|rw(q%+ zj-}|U1n0YA?%zybAa{+w)I|K<_A*`1={aiYmkPoGumA%S05Zw|W;VbhG5{eFAQTrM f_y0krRk^2nYZVo=uizy2?^g?4QA43d&La4KO);Ib diff --git a/src/app.coffee b/src/app.coffee index ea953ed..56660d6 100644 --- a/src/app.coffee +++ b/src/app.coffee @@ -5,7 +5,7 @@ app = playground( smoothing: false, create: -> - @loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles", "deadtiles" + @loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles", "deadtiles", "layerdetails", "entitydetails" @currentHoveredTile = new Tile ready: -> diff --git a/src/entities/base.coffee b/src/entities/base.coffee index 553b779..142b1d2 100644 --- a/src/entities/base.coffee +++ b/src/entities/base.coffee @@ -9,6 +9,9 @@ class Base sprite: -> [@frame*8, 0, 8, 8] + spritedetail: -> + [0, 0, 16, 16] + isMoveable: -> false diff --git a/src/entities/miner.coffee b/src/entities/miner.coffee index 99cf553..7757474 100644 --- a/src/entities/miner.coffee +++ b/src/entities/miner.coffee @@ -9,6 +9,9 @@ class Miner sprite: -> [@frame*8, 16, 8, 8] + spritedetail: -> + [0, 16*2, 16, 16] + isMoveable: -> true diff --git a/src/entities/silo.coffee b/src/entities/silo.coffee index a4baae9..437d602 100644 --- a/src/entities/silo.coffee +++ b/src/entities/silo.coffee @@ -6,7 +6,10 @@ class Silo tick: (tile)-> sprite: -> - [@frame*8, 8, 8, 8] + [@frame*8, 8, 8, 8] + + spritedetail: -> + [0, 16, 16, 16] isMoveable: -> false diff --git a/src/hud.coffee b/src/hud.coffee index b6c1544..b41bfdc 100644 --- a/src/hud.coffee +++ b/src/hud.coffee @@ -22,11 +22,12 @@ app.game.hud = if currentSelectedTile != null panelusage = 'tile' - app.layer.drawRegion app.images.layers, currentSelectedTile.getCurrentLayer().sprite, 15, 100 if currentSelectedTile.entity panelusage = 'entity' - app.layer.drawRegion app.images.entities, currentSelectedTile.entity.sprite(), 15, 100 + app.layer.drawRegion app.images.entitydetails, currentSelectedTile.entity.spritedetail(), 12, 95 + else + app.layer.drawRegion app.images.layerdetails, currentSelectedTile.getCurrentLayer().spritedetail, 12, 95 # silo capacity usedSiloStoragePercent = Math.round((100 / app.game.availableSiloStorage()) * app.game.usedSiloStorage()) diff --git a/src/tiles/tilelayer.coffee b/src/tiles/tilelayer.coffee index 6c1ec1d..a38e7b9 100644 --- a/src/tiles/tilelayer.coffee +++ b/src/tiles/tilelayer.coffee @@ -3,6 +3,7 @@ class Tilelayer {@type, @depth, @amount} = options @randomFactor = getRandomInt 0, 4 @sprite = [@randomFactor*8, @depth*8, 8, 8] + @spritedetail = [0, @depth*16, 16, 16] @hudSprite = [@randomFactor*8, @depth*8, 4, 4] collect: ->