From 30f72a31354a097144b862a39407005f4b425a1c Mon Sep 17 00:00:00 2001 From: Aaron Mueller Date: Sun, 7 Dec 2014 15:47:42 +0100 Subject: [PATCH] Pimp the GFX and make dead tiles --- notes.org | 4 +++- public/images/deadtiles.png | Bin 0 -> 1798 bytes public/images/layers.png | Bin 4465 -> 3588 bytes src/app.coffee | 2 +- src/tiles/tile.coffee | 8 +++++++- 5 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 public/images/deadtiles.png diff --git a/notes.org b/notes.org index 55bae5c..e7c5c87 100644 --- a/notes.org +++ b/notes.org @@ -8,4 +8,6 @@ Title: Entire game on one screen ** "tote" flächen einbauen (krater, berge) :jonas:aaron: ** Spielstart in irgend einer weise ... (grafik) ** Hint für shortcuts anzeigen :ruben: -** Preise für entities :ruben: \ No newline at end of file +** Preise für entities :ruben: +** Silos: Farben je nach Kapazität einfärben +** Game balancing :D diff --git a/public/images/deadtiles.png b/public/images/deadtiles.png new file mode 100644 index 0000000000000000000000000000000000000000..435058eaa340fcf505dd772f0d8b1bafe3856c2a GIT binary patch literal 1798 zcmV+h2l@DkP)M9Pi-UI}qPF4D;RR8+))%P#K{~3?p*Qh@K zt~q~XI=C`lE^g+gm|tD#RlD)TgF?XlNAx$Jf7d*DWI8bO<>I@!DOg?U(Tyj5Dg>N+ z=;%2BAteG3LSU^$2mwG8DgZ9s*yi-fBb2KN>7dU}FC`InpATf2wA;ZN!=Z%+{j5M{ zyF{Tvg&~`L&txSg9qv-ElvupcvPWiR~`Nr*LNmw z{^)Byo;ipa_Hp@$v**7j0D4*RWg+Pg!vM?74$Nk8JsW`@a-|S`CIU!(iW5}{F z6b|fEHWVG5Tr%xPY_2x1FyThEx z1CuD~%r~a#rUuzt-@k-X5l4?qvANx0q8hWZ+2L@bhI0-f1VRWN`NCI->$B`Mml$rh zcL9^*@ug)>vP; z`NG!j=#iD3;nUS>^?Y84&-DkxXk`2mQ+NvJ354P64;@%|{rc!zc_BFaV2Ar2F4$-m z>}-oW{H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LlqCZOo;Ab>=sB?oV@kfr(~V4a+ir%O1|`1F}TC zvp_KEn4kaKYj6DO)kp4c;zep-0!9|mNn}>_9i z=~IDd+Gb!Gn)?0||M(v-Jr@lOR#*~$@^fTeSE3X$yX3w_U^C~))Zswc?RlaoZd%`v zpKFD{QK^ak)5l0XN&5mTY>5>`I`Ogh{lk6#`}`B1$Fu-!M%Hf9Yv4kE#$K?#rk1wQ4?3(+R7m|J86E6o~btx-9 zNJ=CaO{@7tmZ6NJ6#%KZt1Q6S=!l@tEwbvm4(?jKswp*hRoB5? zdJS#VGNL}W>)@{Q@jO8ki>RPKsnM}ik`w!aX;B1CA=g0tus*k=f8zXqPJg<|Uh?PI z~Snuq7x>y4E4vIEje1IB+kXtq98)N`Vqm(rU1l}e9kBbfD^>xP5HOZ zGo^V^O#<#bJwTcD46n6+=`@VSVENPj!wc*0N^rt}wj8u(-OA;z@pcVE?f9e{Kq$@$ zf=K7s^G%u^-7zXL4!~w$gK-f61<({IKoD^$qWQ)Cpq8Zze^3bEL|=6DH={NK8+cIyZF!dV!yw6VN+1A~T9dUACxfE*puc_nJnGbj3@6AAv4b0M0hRC^**@jUS__6HdnyZ{|b s0U+oB9P>s9U_k`SWT1a^UY#oRf9hZMs-MDk?EnA(07*qoM6N<$g1(xY_W%F@ diff --git a/src/app.coffee b/src/app.coffee index a915aa6..9652e89 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" + @loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "deadtiles" @currentHoveredTile = new Tile ready: -> diff --git a/src/tiles/tile.coffee b/src/tiles/tile.coffee index c7a6dec..ccb40ba 100644 --- a/src/tiles/tile.coffee +++ b/src/tiles/tile.coffee @@ -6,12 +6,14 @@ class Tile @layers.push new Tilelayer( type: restype, depth: i, - amount: Math.round(Math.random(app.game.maxTileAmount-10)+10) + amount: Math.round(Math.random()*app.game.maxTileAmount)+1 ) @currentLayer = 0 @entity = null @isActive = false + @isBuildable = !(Math.round(Math.random()*10) == 5) + @randomSeed = Math.round(Math.random()*10) click: (button)-> if button == "left" @@ -46,6 +48,10 @@ class Tile tileLayer = @getCurrentLayer() app.layer.drawRegion app.images.layers, tileLayer.sprite, x*8, y*8 + unless @isBuildable + app.layer.drawRegion app.images.deadtiles, [8*@randomSeed, 0, 8, 8], x*8, y*8 + return + if @entity app.layer.drawRegion app.images.entities, @entity.sprite(), x*8, y*8