Game Development Reference
In-Depth Information
To keep the player sprite visible while scrolling, we keep the player sprite fixed in the grids
but move other sprites horizontally or verically, depending on the direcion of the scrolling.
To scroll Marco horizontally by N steps, move the other sprites to the opposite direcion by N
steps using the following steps:
1. To scroll Marco right by N steps, move the other sprites to the left by N steps.
2. To scroll Marco left by N steps, move the other sprites to the right by N steps.
The following screenshot illustrates how to scroll Marco to the right by N steps:
To simulate scrolling Marco verically by N steps, move the other sprites also in the opposite
direcion by the same amount using the following steps:
1.
To scroll Marco up by M steps, move the other sprites down by M steps.
2.
To scroll Marco down by M steps, move the other sprites up M steps.
The following screenshot illustrates scrolling Marco up by M steps:
 
Search WWH ::




Custom Search