customizable automatic particle removal

4 replies [Last post]
jose1711
User offline. Last seen 4 years 10 weeks ago. Offline
Joined: 2008-06-20
Posts: 80

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

sTiLL
User offline. Last seen 14 years 22 weeks ago. Offline
Joined: 2010-06-23
Posts: 3

strongly agree

nemo
nemo's picture
User offline. Last seen 19 weeks 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

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 Smile )

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

nemo
nemo's picture
User offline. Last seen 19 weeks 5 days ago. Offline
Joined: 2009-01-28
Posts: 1861

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

jose1711
User offline. Last seen 4 years 10 weeks ago. Offline
Joined: 2008-06-20
Posts: 80

thank you, seems so much better now

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]