Codesnippets > 2D-snippets

Very fast floodfill

<< < (6/6)

Looks awesome! CanĀ“t wait to check it out, speed it up!

While thinking about an editor, I wondered if the brush tool could support pre-made dither as a color.
Like you would have different sets of dither between 2 colors (main and background)possibly controlled by a slider and it would paint that dither.

Just something that sparked on my mind but I hardly think it really necessary.


Hi everyone,
speed is certainly an important factor in games and I think it will be of interest to an improved and faster version of the "fastfloodfill" project posted at therad msg78051.
The complete project that I enclose "FillFastLine" is at least 4-5 times faster on my computer going from 50 fps to 220.
is a GLB version obtained from the site
I hope you enjoy it and look forward to any comments and improvements in the case.

Very nice code, and may have other usage as well.
I tried to compare it with my basic FloodFill from path finding routines, and Your code is 2 times faster, so I will try to implement this algorithm in path finding in near time. One thing to check would be using full size array and omit DIMPUSH/DIMDEL, it could bring some minor speed improvement but I'm not sure, it's very good in current state.
And in general the algorithm it self is more that 4-5 times faster, just that Sprite2Mem & FastMem2Sprite take some additional time, but even with them it's really fast, and could be used for some special effects in retro project.
Btw. I remember that has also great articles about raycasting :)

Very interesting. Thanks for sharing Qedo.
Dreamerman, I remember your path finding routine and this could definitely improve it.
Lode Vandevenne is a very good programmer especially for retro coding.
QuickCG is so coOol  :P


[0] Message Index

[*] Previous page

Go to full version