More biome tuning. Start in middle of first generated block.
This commit is contained in:
parent
3985c3e301
commit
7393e5fbe9
6
main.lua
6
main.lua
|
@ -1,8 +1,8 @@
|
|||
function _init()
|
||||
init_movement()
|
||||
init_mapgen()
|
||||
init_movement({block_size/2, block_size/2})
|
||||
generate_map({0, 0})
|
||||
debug = true
|
||||
debug = false
|
||||
end
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ end
|
|||
|
||||
function _draw()
|
||||
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)
|
||||
draw_player()
|
||||
if debug then
|
||||
|
|
|
@ -15,7 +15,8 @@ function init_mapgen()
|
|||
-- * 6 - pink flowers
|
||||
-- * 7 - mushrooms
|
||||
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")
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function init_movement()
|
||||
camera_pos = {0, 0}
|
||||
function init_movement(start_pos)
|
||||
camera_pos = start_pos
|
||||
|
||||
-- [1] is vertical facing, [2] is horizontal, -1 is up/left, 0 is neutral,
|
||||
-- and 1 is down/right
|
||||
|
|
Loading…
Reference in New Issue
Block a user