I must admit I don’t.
Dungeoneer uses a really basic one but let’s face it, it isn’t exactly a programming challenge when the point of view is ever parallel to an axis so it isn’t really useful.
If I had time I’d have a go as it sounds exactly like the type of challenge I like, but unfortunately I don’t have time.
The only thing I could suggest is how I might approach the problem:
-
Work out which is the ‘general’ axis you are looking along (IE which of the 4 main axes you are most aligned to).
-
Calculate the edge lines (IE where to clip the left and right of the view) by working out how much of an offset each of these lines has per unit movement along the main axis found in 1
-
Iterate along the main axis, finding the left and right boundaries by offsetting in their other axis by the values calculated in 2.
-
Between these two values, include all the tiles found, then move one more along the main axis and repeat to find all the tiles.
Does that make any sense? I think an image would probably clarify it easily enough but alas, I really won’t have time for that until tomorrow.