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/actions.png b/public/images/actions.png index ba7dad4..774ea4c 100644 Binary files a/public/images/actions.png and b/public/images/actions.png differ diff --git a/public/images/deadtiles.png b/public/images/deadtiles.png new file mode 100644 index 0000000..435058e Binary files /dev/null and b/public/images/deadtiles.png differ diff --git a/public/images/layers-details.png b/public/images/layers-details.png index 9dba3cd..8116c52 100644 Binary files a/public/images/layers-details.png and b/public/images/layers-details.png differ diff --git a/public/images/layers.png b/public/images/layers.png index 911857b..2c6429c 100644 Binary files a/public/images/layers.png and b/public/images/layers.png differ diff --git a/src/app.coffee b/src/app.coffee index a55e202..ea953ed 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" + @loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles", "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