masterBB
2011-07-07 10:14:30
Anybody up for a challenge? Cause I got one for you.
I'm making a agility arena script which needs some solid locating. I've tried many things; dtms, bitmap and TPAs. They are all to slow or unreliable.
Original map

Try: TPA map
In this example I filled a TPA with the black color and draw it white. I Also made a TPA from box with the size of the Minimap. I draw that one green. This took without drawing around 600-700 ms.

U notice the white dots on the green platform? Those are the points I need! My idea was to look between which ones I could make a green bridge, probably with a flood function. I could also count them to see if I'm on an edge. But to get them I used SplitTPA, this one however takes over 3,5 seconds! This is much to slow. I need to run this function every one or two obstacles to check if I'm still on track. And I only get 60 seconds to reach the next ticket machine.
Try: Bitmaps
Very time consuming. But I made a small bitmap of every platform. However cause of searching on the minimap. These are sometime a bit different. Searching for a deformed bitmap would solve this. But that function is even slower than previous method! I can't get it right.
Try: DTM
I tried making Dtms with the black dot as middle point. But this one gives to many results with high tolerance, or not enough with low tolerance. This is caused by the platforms having a lot of different colors. Which seems to be moving a bit.
Final
Does anyone has a better idea? Or even a piece of code? I can lend a members account for short amounts of time to anyone members+.
Thank you for reading.
I'm making a agility arena script which needs some solid locating. I've tried many things; dtms, bitmap and TPAs. They are all to slow or unreliable.
Original map

Try: TPA map
In this example I filled a TPA with the black color and draw it white. I Also made a TPA from box with the size of the Minimap. I draw that one green. This took without drawing around 600-700 ms.

U notice the white dots on the green platform? Those are the points I need! My idea was to look between which ones I could make a green bridge, probably with a flood function. I could also count them to see if I'm on an edge. But to get them I used SplitTPA, this one however takes over 3,5 seconds! This is much to slow. I need to run this function every one or two obstacles to check if I'm still on track. And I only get 60 seconds to reach the next ticket machine.
Try: Bitmaps
Very time consuming. But I made a small bitmap of every platform. However cause of searching on the minimap. These are sometime a bit different. Searching for a deformed bitmap would solve this. But that function is even slower than previous method! I can't get it right.
Try: DTM
I tried making Dtms with the black dot as middle point. But this one gives to many results with high tolerance, or not enough with low tolerance. This is caused by the platforms having a lot of different colors. Which seems to be moving a bit.
Final
Does anyone has a better idea? Or even a piece of code? I can lend a members account for short amounts of time to anyone members+.
Thank you for reading.