Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Manic

In most 3D game engines, there's an effect where you can map a texture onto a piece of the level's geometry in such a way that it appears to have been placed on the geometry. I have experience with the Source engine, so I know it as a decal--and it's what you use to put on signs, spray paint, whatever. It can also be used to apply a blood splatter to the wall after you've just shot someone.

Is there a plugin or a relatively simple way to apply an image based on the collision layer? What I mean is, if I shot an enemy and blood particles came out of him and hit the wall behind him, is there any way to make it look like a blood splatter appears at that same area--at the same x/y position, with whatever should be off the wall clipped out. I know it's fairly trivial to simply spawn an entity where the blood hits the wall, but making it so that the blood splatter doesn't have non-transparent bits that stick off the wall and look weird is tough.

Plugin would be best, simple snippet of code would be great, being told that it's a ton of work and no one's done it would be disappointing but fine!

1 decade ago by stillen

Just thinking out loud here:

You can get the position and size of the collision wall when the blood splatter collides with it. Then spawn the blood decal at the center of the collision tile and set the height and width of the decal as the same as the collision tile. That should essentially clip it.

You could also, depending on how your background looks and is tiled, have a a few spattered tiles in your tiles sheet, then just swap out that tile with the splattered version. I've done this a few times for breakable walls or burn marks after something exploded.
Page 1 of 1
« first « previous next › last »