Dynamic changing background

Hi,

Imagine a top down view. I would like the background image (which would be the ground from the players perpective) to change only in the spots where the character walks as they walk. Almost like a instant lotto scratch card. The character walks over the surface and reveals what is underneith.

Does anyone have any simple ways to do this? [import]uid: 31694 topic_id: 6227 reply_id: 306227[/import]

Hey
Do you mean like the background is black and when the character moves on that surface stuff will reveal itself beneath that black surface?

If you want like a fog to lay over your background and the fog should dissapear when the character walks on it you should get the particle candy addon and then you can set the alpha value to make fog transparent/invisible where the character walks.

If you have like a tiled platform you could reveal tile after tile but that would probably not look so hot so I would lay down the background and over that background I would probably draw black pixels 1x1 or maybe 2x2 depending on the accuracy you need. Then when character collides with pixels I would use transition and set alpha from 1 to 0 quite fast and that would give the effect that the background reveals itself under the character.

Would that be something for you to try? [import]uid: 22737 topic_id: 6227 reply_id: 21389[/import]

That does sound like a possible solution although I was planning on having the top layer be another image rather than just all black.

Would splitting the image up into a little bits that tile every 1 pixel cause performance issues? [import]uid: 31694 topic_id: 6227 reply_id: 21489[/import]

Hey
I do not know, haven’t tested it but instinct says yes it has to. But I do not know if it will affect that much that it will make your game lag though.

Ask Corona SDk crew like Carlos [import]uid: 22737 topic_id: 6227 reply_id: 21549[/import]