Testing lake procedural generation...

This commit is contained in:
Ognjen Milan Robovic 2024-05-25 08:56:49 -04:00
parent cd96dc5ea1
commit 03719ab744

View File

@ -13,6 +13,9 @@ package body world is
view_reach : constant integer := 96; view_reach : constant integer := 96;
lake_count : constant natural := 3;
lake_reach : constant natural := 3;
landmark_limit : constant integer := 90; landmark_limit : constant integer := 90;
location_limit : constant integer := 30; location_limit : constant integer := 30;
construction_limit : constant natural := 60; construction_limit : constant natural := 60;
@ -33,6 +36,13 @@ package body world is
------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------
procedure earth_to_water_transition is
begin
null;
end earth_to_water_transition;
------------------------------------------------------------------------------------------
procedure configure is procedure configure is
begin begin
core.echo (core.comment, "Configuring world components..."); core.echo (core.comment, "Configuring world components...");
@ -100,6 +110,20 @@ package body world is
end loop; end loop;
-- --
-- WATER TESTING -- WATER TESTING
for this in 1 .. lake_count loop
declare lake_x : integer := 0;
lake_y : integer := 0;
begin
lake_x := core.random (2 * lake_reach, map.width - 2 * lake_reach - 1);
lake_y := core.random (2 * lake_reach, map.height - 2 * lake_reach - 1);
--
for x in -lake_reach .. lake_reach loop
for y in -lake_reach .. lake_reach loop
map.tiles (lake_x + x, lake_y + y) := core.random (18, 23);
end loop;
end loop;
end;
end loop;
map.tiles (10, 10) := 28; map.tiles (10, 10) := 28;
map.tiles (11, 10) := 24; map.tiles (11, 10) := 24;
map.tiles (12, 10) := 29; map.tiles (12, 10) := 29;