Skip to content

Commit f6247f2

Browse files
committed
Continue Gen implementation & Polish Current Steps
Finish off unfinished steps in the algorithm. Catch errors with drafted code. Draft more steps.
1 parent 42bc7f6 commit f6247f2

File tree

4 files changed

+257
-80
lines changed

4 files changed

+257
-80
lines changed

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ gdb --version
6060
5. Cellular Automata (CA) Filter on Noise
6161

6262
1. CA Filter A : Expanding Zones
63-
1. Using Flood Fill, find X number of `openAreaMin`, find flat zones that are minimum of 2x2 cells of flat area
63+
1. Find X number of `openAreaMin`, find flat zones that are 3x3 cells of flat area
6464
2. Smooth the noise by expanding the flat areas
65-
3. Create a CA rule that defines flattened areas and expand them
65+
1. Create a CA rule that defines flattened areas and expand them
66+
3. Scan to find new flat zones
6667
1. CA Filter B : Patching / Removing Outliers
6768
1. Even out zero elevation && any cells that are islands
6869
2. If a cell is zero and has many zero neighbors, it stays zero. Also true for values of 1, 2, 3, etc. If a cell is x and has many x neighbors it stays x.
@@ -92,20 +93,25 @@ gdb --version
9293
1. Determine the correct tile type for each cell in the grid
9394
2. Set the Grid map cells using Godot's Grid map system
9495

95-
8. Open Area Finder / Large Structure Locations
96+
8. Sanitizer
97+
98+
1. Smooth out Cliffs & Ramps
99+
2. Ensure cliffs and ramps don't look messy
100+
101+
9. Open Area Finder / Large Structure Locations
96102

97103
1. Find areas that have flat ground tiles of 3x3 cells
98104
2. Elevation buffer, ensure structures aren’t placed against cliffs and ramps
99105
3. Store the center cell into a list of available locations
100106

101-
9. Poisson Object Placement
107+
10. Poisson Object Placement
102108

103-
1. Create a copy of the finalized grid and increase its size by splitting cells into 4 pieces
104-
2. Finalized grid contains data about each cell's place-ability
105-
1. Use the data from the previous steps to know cells that can’t have objects placed on them
106-
2. River Pathing determines non-placeable cells
107-
3. Elevation changes are non-placeable cell's
108-
3. Use poisson disk sampling to place non-large objects using the higher density grid
109+
1. Create a copy of the finalized grid and increase its size by splitting cells into 4 pieces
110+
2. Finalized grid contains data about each cell's place-ability
111+
1. Use the data from the previous steps to know cells that can’t have objects placed on them
112+
2. River Pathing determines non-placeable cells
113+
3. Elevation changes are non-placeable cell's
114+
3. Use poisson disk sampling to place non-large objects using the higher density grid
109115

110116
## Contributing
111117

demo/terrain_gen_script.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ func _ready():
1919
#generate(grid_map, 128, 128, 4, seed_value, 12, NoiseType.VALUE, 0.79, 0.1);
2020

2121
# Simplex Noise Based
22-
generate(grid_map, 128, 128, 4, seed_value, 12, NoiseType.SIMPLEX, 0.3, 0.02);
22+
generate(grid_map, 128, 128, 4, seed_value, 12, NoiseType.SIMPLEX, 0.3, 0.5, 0.02);

0 commit comments

Comments
 (0)