From 7393e5fbe9e674f96249bbc006c8c764d573a398 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Thu, 5 Dec 2019 23:09:01 -0500 Subject: [PATCH] More biome tuning. Start in middle of first generated block. --- main.lua | 6 +++--- mapgen.lua | 3 ++- movement.lua | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/main.lua b/main.lua index 6b15255..09ed32c 100644 --- a/main.lua +++ b/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 diff --git a/mapgen.lua b/mapgen.lua index caac707..8b2d807 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -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 diff --git a/movement.lua b/movement.lua index 9453809..cdf08fe 100644 --- a/movement.lua +++ b/movement.lua @@ -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