diff --git a/src/World.moon b/src/World.moon index 8c95aaa..81ae56c 100644 --- a/src/World.moon +++ b/src/World.moon @@ -2,6 +2,7 @@ import random, noise from love.math -- biomes = love.image.newImageData "biomes4.png" sands = love.image.newImageData "sands.png" +grass = love.image.newImageData "biomes4.png" colors = { {0.92, {0.7, 0.7, 1, 1}}, -- ice (mountain) @@ -43,6 +44,8 @@ class World if color[1] < value if color[1] == 0.65 -- sands value = { sands\getPixel 511, math.min 511, math.floor (math.min 1, (value - 0.65) * (1/0.03) + 0.5) * 512 } + elseif color[1] == 0.68 + value = { grass\getPixel 599, math.min 599, math.floor (math.min 1, (value - 0.68) * (1/0.03) + 0.5) * 600 } else value = color[2] break diff --git a/src/constants.moon b/src/constants.moon index 93efd7d..1931516 100644 --- a/src/constants.moon +++ b/src/constants.moon @@ -1,3 +1,3 @@ return { - tileSize: 20 + tileSize: 5 } diff --git a/src/main.moon b/src/main.moon index 513e491..5983edb 100644 --- a/src/main.moon +++ b/src/main.moon @@ -3,7 +3,7 @@ import tileSize from require "constants" w, h = love.graphics.getDimensions! screen = { w: math.floor(w/tileSize), h: math.floor(h/tileSize)} -debug = false +debug = true map = true Player = require "Player"