Parallax scrolling and/or scaling on physics game (Ghosts vs. Monsters edition)

I have had a blast tinkering with the Ghosts vs. Monsters template. The example provided by Seb.ly was fantastic and inspiring, and lately I’ve found myself seeing .lua code in my head like I was Neo in the Matrix.

Anyhow, I have really pulled apart the component pieces and really adapted the physics basics to suit my needs. Unfortunately, I have had a devil of a time adjusting the camera work for the game.

I love the basic setup - zoomed in on the target area, scroll to the left, an ability to swipe back to the right - but the lack of parallax scrolling has been messing with me. I have tried a ton of suggestions and concepts that are listed here on the boards, but have had no luck. My sense is it is because all of the groups are folded together in the Ghosts v. Monsters “gameGroup” function. I have tried eliminating the second page of the document (i.e. backgroundImage2, groundObject2, etc) and have created separate component layers/groups for each of the elements (background, mid ground, foreground, etc.)

Unfortunately, nothing works. Again, my sense is that it is because every things locked in the gameGroup parent group. Every time I’ve tried to cut bait, as it were, it does not show much of the images and the game essentially locks. I have also tried the xScale/yScale option, but that just messes with the scope of the screen and never resets afterwards.

Any thoughts on how to implement a simple camera that allows for either parallax scrolling, or a “zoom out” effect (such as demonstrated in Seb’s example and infamously in Angry Birds?) At this point I am nor picky- even simply an x-coordinate scroll (ignoring any y-scroll) would make me more than happy.

Thanks so much - this has been a wonderful collaborative community and thanks for the assistance! [import]uid: 75582 topic_id: 27153 reply_id: 327153[/import]