   Calculating parallax scroller layer speed
  Hi everyone!I'm trying to create a side scroller with parallax layers. So far I've managed to get the layers drawn and scrolling on different, hard-coded speeds. What I really want is a way to calculate the speeds so that the camera reaches the extremes of all layers at the same time. I've tried several ways and I google for quite some time now, but all I've found was using pre-calculated speeds.Thanks in advance.   
  First of all, calculate the amount to travel to reach the layer extremes (i.e. the layer length minus the screen length). Now calculate how much to multiply/divide the camera position so it fits within that range. That should do it.   