funny how its always you who responses thanks man!
I am still working on it and I am still failing. I think I am on the right track now but still have some issues.
I was able to make my logic work (start at a certain tile, check if neighbours (left, right, bottom, top from start tile) are water, store them uniquely in “alreadyvisitedtiles” and “newfoundtiles” start same search for each “newfoundtiles”.
My problem now is that if I want to scann the whole map like this it crashes with the “infinite loop” error. I can only make approximately half of the map happen. (please keep in mind that I am still a complete beginner)
Now a few questions:
- Infinite loop errors are not always actually infinite, right?
- After a little bit of research I found that all the loops are tried to be executed in one tick, True? Therefore I assume I get the “infinite loop” error because its just too long/too much for one tick to compute.
- I found a setting in the project settings for the maximum loop iteration count, but even after adding a few more zeros it didnt let me run the code without the error, so I assume I really need to find a proper way to split up the workload. So is there a way to adjust the loops to the tick, so it just takes as much time as it needs or do i have to create “chunks” of operations and run one after the other?
As always, thanks a lot!
BR
Sven