So, I was trying to come up with a way to reveal only certain cliff levels, and there's some frustrating stuff,
1. When it comes to circular revealers, there seems to be a radius limit on the size they can be (If they are above, they'll just get shrunk down in game).
2. Rectangular revealers seem to either act funny with cliff levels, or just ignore them entirely.
So I made a loop that searches out random points that haven't been revealed yet on the low ground and reveals them based on that. It results in a much slower revealer, and can be splotchy.
Just curious if anyone has a better way to do this, or knows the reasons for the above problems. And if you're just curious on how to do this (likely inefficient) way of revealing, the test map is attached.
use a grid (instead of infinite random points, might be more effient) starting with Point (1,1), (1,5, 1) ... (1, 1,5) .. (256, 256). if this is still too rough, just choose a more dense grid.
how to implement, easiest way is 2 loops for x and y axis or 1 loop with modulo.
i personally prefer another method. get 1 point of each area which are on the same cliff level. call your custom function to check that point (check cliff level, visibility and create visibility), then this function will call itself again with the point above, below, left and right, but only if you had to create visibility there.
this will get every point on the same level if they are connected. quite stupid to use if you have alot of spreading
Awesome call with the grid idea, works quite well. I also found that instead of going to 256, you can use the function height/width of region (entire map).
For anyone interested, I've attached the updated version with the grid method.
So, I was trying to come up with a way to reveal only certain cliff levels, and there's some frustrating stuff,
1. When it comes to circular revealers, there seems to be a radius limit on the size they can be (If they are above, they'll just get shrunk down in game).
2. Rectangular revealers seem to either act funny with cliff levels, or just ignore them entirely.
So I made a loop that searches out random points that haven't been revealed yet on the low ground and reveals them based on that. It results in a much slower revealer, and can be splotchy.
Just curious if anyone has a better way to do this, or knows the reasons for the above problems. And if you're just curious on how to do this (likely inefficient) way of revealing, the test map is attached.
@MaskedImposter: Go
use a grid (instead of infinite random points, might be more effient) starting with Point (1,1), (1,5, 1) ... (1, 1,5) .. (256, 256). if this is still too rough, just choose a more dense grid.
how to implement, easiest way is 2 loops for x and y axis or 1 loop with modulo.
i personally prefer another method. get 1 point of each area which are on the same cliff level. call your custom function to check that point (check cliff level, visibility and create visibility), then this function will call itself again with the point above, below, left and right, but only if you had to create visibility there.
this will get every point on the same level if they are connected. quite stupid to use if you have alot of spreading
@FunkyUserName: Go
Awesome call with the grid idea, works quite well. I also found that instead of going to 256, you can use the function height/width of region (entire map).
For anyone interested, I've attached the updated version with the grid method.