title: Calculating the position of a parallax background (2d)
body: <p>I'm trying to align 4 different parallax backgrounds in my game.  These aren't endless tiling backgrounds like in a space shooter, they don't fill the whole screen.  They're a row of trees running along the ground.</p>
  
  <p>My images are bottom left aligned and I'm trying to align them all to the lowest point on the terrain.</p>
  
  <p>I have the following information:  The lowest point on the map that I want everything to line up at (is 300).  The parallax / scroll factor of the background.  The height of the background.</p>
  
  <p><img src="https://i.stack.imgur.com/b85aV.jpg" alt="http://i.imgur.com/BRlNP.jpg"></p>
  
  <p>I've tried:</p>
  
  <pre><code>background.y = lowestPoint; // doesn't work
  background.y = lowestPoint * parallaxFactor; // doesn't work, way off
  background.y = lowestPoint + lowestPoint * parallaxFactor; // doesn't work
  </code></pre>
  
  <p>I'm obviously missing something here.</p>
  
  <p>Basically, I'm trying to calculate where to put the background tile's registration point based on it's parallax factor and lowest point in the terrain.</p>
  
  <p>Ideas?</p>