uhh grass

This commit is contained in:
Tangent / Rose / Nebula Rosa 2021-12-21 19:46:35 -05:00
parent 16f54ec083
commit dcfd1a410e
3 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -1,3 +1,3 @@
return {
tileSize: 20
tileSize: 5
}

View File

@ -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"