Continuous Scrolling Ground

Mar 7, 2012 at 12:00 AM

I'm trying to find a way to make the ground in a WP7 Silverlight app continuously scroll one direction and am having trouble finding a way to do this as storyboards applied to objects with physics behaviors applied just stop functioning.  Can anyone provide any guidance here?

Coordinator
Mar 7, 2012 at 12:15 AM

This is kind of a bit of work and I've thought about creating a "scrolling level" behavior for it to make it easier... But the best way to handle this it to re-use physics objects and reposition them as your player scrolls left or right.

So it gets complicated because you likely want a level editor to design the long levels that are scrolled, and for efficiency you want to re-use the platforms, tiles, etc. and just reposition them as needed. Maybe as a simple starter you could just create a few "floor" tiles and position them as the player scrolls around, then build up from there.

Note that you cannot use Storyboards with the physics behaviors. The physics engine doesn't respond well to manually positioning things. Instead you need to apply force, torque, etc to objects to move them around.

Hope this helps.

Apr 24, 2012 at 3:35 PM
Edited Apr 24, 2012 at 3:35 PM

Does the ground need to be part of the physics simulation or is it just a visual effect?