Hello, I created the code nessecary to generate a random blocky 250x250 terrain using a gridmap and FastNoiseLite. Now, I want to make it generate procedurely. With that expression I mean, having a 250x250 grid terrain around the player at all time.
So I modified my code to look like this:
func _physisc_process(delta : float) -> void:
for x in range (-player.global_position.x, player.global_position.x):
for y in range(20):
for z in range(-player.global_position.z, player.global_position.z):
if not Vector3i(x,y,z) in tiles:
if y < noise.get_2d_noise(x,z) * 20 + 10:
set_cell(x,y,z)
tiles.append(Vector3i(x,y,z))
Note: As I'm typing it on my phone, I may have made a syntax mistake or a misspelled a function name, but in the original code there were no errors
The code is running with no errors or even warnings, but the terrain is not being generated and after 5 seconds it says the program isn't responding. Please help