I am working on a game in which I have to fill a closed region with color. Currently I'm using a non-recursive, scanline-based flood filling algorithm. But in my case it is slow. Can anyone provide me the quickest, most efficient floodfill algorithm code or link?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
Google provides several links that may be starting points: here, here and here for example. There isn't likely to be an actual "fastest" or "best" algorithm -- there rarely is. Rather you'll find some are more suited for particular scenarios. You have not provided enough information about your scenario or what you have tried yourself in order for us to provide really directed answers. Also, have you profiled your code and identified the bottleneck(s)? |
|||
|
|