I'm having a problem (or design fault :P) with walk behinds.
I want to:
1. take a picture of the background+characters
2. activate (ie. reset base) the walk behinds
3. draw the picture of the background and affected character back to screen, so the character is not half wiped out by the walkbehind.
Is there a simple way of doing this?
1. http://redrom.ltd/img/image002.png - background and ape character as they are
2. http://redrom.ltd/img/image001.png - ape wiped out by walkbehind activating for main character Julius
I just want to take a localised screen shot of (1), and draw it back when (2) happens.
There are two separate walk-behinds - one for the wall, one for the bars. I want bars to always be active; the wall 'hole' should only be active when Julius is walking towards it and about to climb through it.
Was this to remove something that was covering the hole? If so, it would probably be easier to just change the transparency on the object that is covering the hole. You can create a dynamic sprite from the background and do what you are asking, but I would imagine there is a simpler solution (region check on the floor and check which direction you are facing).
No this was to cover the edge of the hole, so Julius can 'climb' into it.
http://redrom.ltd/img/image3.png
Why don't you just make the cage+bars an object with alpha transparency instead of making it part of the BG? Seems like a simpler solution to me.
It's possible to edit backgrounds, but IMHO that's a last resort. Like others suggested above, objects are usually far more convenient way to achieve this.
In general I may recommend to imagine your room as a sequence of layers, similar to how you do when drawing it in the good image editor like Photoshop. Then room background is the bottom layer, and objects are other layers.