title: Implementing z-axis in a 2D side-scroller
body: <p>I'm making a side scroller similar to Castle Crashers and right now I'm using SAT for collision detection. That works great, but I want to simulate level "depth" by allowing objects to move up and down on the screen, basically along a z-axis (like this screenshot <a href="http://favoniangamers.files.wordpress.com/2009/07/castle-crashers-ps3.jpg" rel="nofollow noreferrer">http://favoniangamers.files.wordpress.com/2009/07/castle-crashers-ps3.jpg</a>). This isn't an isometric game, but rather uses parallax scrolling.</p>
  
  <p>I added a z component to my vector class, and I plan to cull collisions based on the 'thickness' of a shape and it's z position. I'm just not sure how calculate the positions of shapes for rendering or how to add jumping with gravity. How do I calculate the max y value (for the ground) as the z position changes? Basically it's the relationship of the z and y axis that confuses me. </p>
  
  <p>I'd appreciate links to resources if anyone knows of this topic. </p>
  
  <p>Thanks!</p>