Hi all,
I’ve been thinking about how to get my sprites to show ‘damage’ effects based on their HP. If it helps you get a better image in your head, the sprites are space ships in a top-down space battles game.
what I have been thinking, is to have a number of damage ‘decal’ images that i can use, and then overlay these onto my main ship sprite.
When a ship takes a hit, it gets a random decal sprite, adds it to the ship sprite’s image (ignoring anything that falls onto a transparrent part of the base image), to give the illusion of a damaged ship hull.
What would be a good way of doing this? Are there any image modification librarys that would be idea for this?
i’m using PNG images, (rendered out from Inkscape on default settings) and things like fire, smoke and small bits of wreckage would be handled seperately by the particle engine. All this is for is dynamicaly modifying the base sprite image in real-time, cheaply.
another application I am interested in using this for is when a ship exploads, the sprite image is broken up randomly into 3 or 4 peices that then drift apart (and become a harvistable item for resources). Along each ‘cut’ edge, damage sprites would be added to make it look like there is twisted mettal and the ship’s insides pulled out.
Thanks,
Matt