customizable automatic particle removal
Wed, 2010-06-23 11:43
hello,
is there a chance to make the minimum size of particles (after e. g. napalm attack) to be auto-removed configurable by user (room creator)? my friends find it frustrating seeing their airplanes crashing into those barely visible pixels.
joe
strongly agree
The weighting for those could be configurable.
I do think you might be running into a bug that I need to correct in my alg (first thing I ever added to HW )
Here's the issue as I see it.
Right now, when damage occurs, the area is flagged as dirty. Once damage phase is over, cleanup begins on those blocks.
But, let's say 2 blocks are side by side.
_|x
x|x
x|_
_|x
Iteration proceeds over the 1st block, the one on the left. Those 2 pixels each have 3 neighbours, so live. Since no cleanup occurred, we drop that block and move on.
On to the block on the right. 1st one only has 2 neighbours, dies. 2nd one has (then) only 2 neighbours, dies. 3rd one only has 1 neighbour. Dies.
_|_
x|_
x|_
_|_
We are left with that. Block is reswept due to changes, but there are no further ones, so we drop it.
Result: 2 pixels, which is kind of hard to see. Otherwise, 4px is the typical minimum (with a cross of 5 or larger circles being most common), which is pretty easy to see.
I'll take a look at this tonight I guess. I guess if I do deletion on an edge, I could tag the neighbour for a resweep.
I could also not cross block boundaries. That might mean some odd erosion appearance, I'll have to test.
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
Went ahead and pushed an extra recheck of neighbours, I think that should eliminate the small strays.
Also rechecked what sweeping 4 neighbours or less would look like. Was interesting, but not really properly fire-damage-y, so left it at current count.
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
thank you, seems so much better now