Possible regression in sprite dirty rects

gems

I am not at all sure what’s going on here, but on 1.1 my particle sprites have a bad habit of leaving pixels behind. This didn’t happen in the previous OS. You can see a few stray pixels from the dust the player leaves behind, and the blast particles when breaking gems leave large circles behind.

The particles are all a single subclass of sprite. They have a setRadius method (which calls self:setSize and self:markDirty), and they override sprite:draw(x,y,w,h). There is a particle manager class that manages a pool of particle sprites. Every frame, the manager reduces the radius of every active particle by 1, and then removes the sprite if its radius reaches 0.

The glitch with the large particles appears connected to camera shake. Camera shake is implemented using gfx.setDrawOffset. The large particles appear to become stuck as soon as the shake ends. But if I remove the shake entirely, the large particles don’t become stuck (though the other issue of a few stray pixels lingering remains).

Since I would like to possibly try to release this game commercially, I am hesitant to post a build or its source in this forum, though I would be happy to send them to Panic directly.

1 Like

Did we ever fix this? :flushed:

Yes! I think it was fixed alongside the issues that impacted my Minesweeper game.

great, thanks! Discourse has started nagging me about old issues assigned to me :stuck_out_tongue:

1 Like