After chatting about mode 7 earlier today, I earned myself a short break and used it to knock up this demo. It only really shows the concept, but works well enough that I figured I’d give the source out and let people see how quickly you can knock up code in graphics 2.
Note the code is massively un-customisable as a result of me putting in a lot of quick hacks to get everything working ASAP, but it might be of use to someone.
What I’m basically doing:
-
I load the level and create the sprites.
-
I draw the entire level and place it into a display group.
-
That group gets placed into a snapshot.
-
I rotate the group and snapshot to match the player movement.
-
I invalidate() the snapshot and then distort it to give a perspective effect.
The source includes the whole corona set-up, and also the Tiled level so you can have a play yourself.