Creating multicoloured splats on tilemaps

28

How would you go about creating multi-coloured paint splats like INK in Defold?

For a game like Super Meat Boy you could use a second layer on top of the main tilemap layer, and use set_tile to add splats.

But what if those splats had to be more than one colour? You could add a tilemap per splat colour and tint the respective tilemaps individually. Or include the different colours in the same tileset, and use set_tile approach.

Any other ideas/thoughts on how this could be achieved?

I’m guessing this kind of thing is done with a separate render target texture that does not get cleared, only added to. If you want to “paint” to it, you just draw to the render target, and then draw that whole texture on top of your normal game graphics (tile map or sprites, it wouldn’t matter).

Oh, and I guess you’d need some way to mask out un-paintable areas, if you only wanted the paint to affect the landscape, so maybe two render targets? Or something with the stencil buffer possibly?

I’m just thinking out loud here, I never actually tried it, so I might be completely full of it. :smiley:

3 Likes

Render the level to one render target and the multi coloured splats to another target and then combine both in a third pass. Not sure how to best blend them, maybe add or mix them.

3 Likes