This tutorial explands of the first one ( • Scrolling backgrounds ... ) and looks at adding parallax scrolling to you game. This is a great way to simulate depth in a game.
Again, I should mention that if your map is wider than 16 tiles, you should adjust the value of 128 accordingly. So, for example, if your map is 20 tiles wide, you would replace 128 with 160 (i.e. 20x8).
18 сен 2024