I would like to create a grid and am unsure how to go about producing the result I want.
I noticed that when creating a terrain using perlin noise, at some point if you keep travelling through the map you’ll notice that the perlin pattern repeats, and so the map repeats.
Currently I am generating the map by first using a double loop to generate the noise figures, then I apply the noise values in a second double for loop to allocate the values to grid positions.
Other than the period of noise I also have another problem. I would like make the map completely travel-able, problem is the way I’m currently coding it.
As you can see per the illustration the issue is that the tiles are changing colors when the perspective/player moves. This isnt a problem so long as I only want to do simple things with the background. For example the color will tell me if I can walk on it. But the color should also allocate a type to the particular tile so that other more interesting things can be recorded, ie a history of its state so that for example soil capacity over time can be recorded.
Apologies if this is badly worded, its still pretty confusing in my mind.
So I had two solutions, one was to make the grid the size of the perlin noise period, and then restrict what I according to the size of the grid chosen by the user. This seems simple enough, providing that I can figure out perlin’s period.
2nd alternative, record the movements of the perspective/player, in each cell as a history, then it should be possible to track back and find its initial value, although this seems probably too convoluted to be practical.
Any help would be greatly appreciated.
as always code on github.
to view grid, click file and choose grid. use arrows to move around.
the grid when zoomed out. I have circled repetitions.