More biome tuning. Start in middle of first generated block.

This commit is contained in:
Anna Rose 2019-12-05 23:09:01 -05:00
parent 3985c3e301
commit 7393e5fbe9
3 changed files with 7 additions and 6 deletions

View File

@ -1,8 +1,8 @@
function _init() function _init()
init_movement()
init_mapgen() init_mapgen()
init_movement({block_size/2, block_size/2})
generate_map({0, 0}) generate_map({0, 0})
debug = true debug = false
end end
@ -13,7 +13,7 @@ end
function _draw() function _draw()
rectfill(0, 0, 127, 127, 0) rectfill(0, 0, 127, 127, 0)
-- the screen is 128x128 pixels, so we can only draw 16x16 sprites -- the screen is 128x128 pixels, so it fits 16x16 sprites
map(camera_pos[1], camera_pos[2], 0, 0, 16, 16) map(camera_pos[1], camera_pos[2], 0, 0, 16, 16)
draw_player() draw_player()
if debug then if debug then

View File

@ -15,7 +15,8 @@ function init_mapgen()
-- * 6 - pink flowers -- * 6 - pink flowers
-- * 7 - mushrooms -- * 7 - mushrooms
biomes = { grassland = { {40, 2}, {28, 5}, {28, 6}, {3, 3}, {1, 4} }, biomes = { grassland = { {40, 2}, {28, 5}, {28, 6}, {3, 3}, {1, 4} },
forest = { {50, 2}, {40, 4}, {5, 3}, {4, 5}, {1, 7} } } forest = { {55, 2}, {25, 4}, {5, 3}, {5, 5}, {5, 7}, {5, 6} },
}
build_biome("forest") build_biome("forest")
end end

View File

@ -1,5 +1,5 @@
function init_movement() function init_movement(start_pos)
camera_pos = {0, 0} camera_pos = start_pos
-- [1] is vertical facing, [2] is horizontal, -1 is up/left, 0 is neutral, -- [1] is vertical facing, [2] is horizontal, -1 is up/left, 0 is neutral,
-- and 1 is down/right -- and 1 is down/right