View Single Post
Old 23 November 2015, 21:02   #72
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
Originally Posted by NorthWay View Post
If your level wraps around then you will need an extra screen buffer that you keep building up while you use the push forward technique already discussed. You typically have a screen buffer twice as wide as the display, push through into the second half, swap to your other buffer, repeat, and go back to the other again. All the time you fill in the non-displayed buffer in small chunks to distribute the load.
Ah! Well that's a different kettle of fish! Games like Mario, Sonic &c typically don't have maps that wrap around, but let's consider that problem...

We can still do it with wrap-around scrolling. Because once we have scrolled sideways by the same number of screens as the height of the tiles (making sure we reserved that much extra memory) all one needs to do is copy the bottom row of tiles back up to the top, and carry on from there. This is assuming we are using a copper-assisted wrap around for the vertical scrolling as well.
Mrs Beanbag is offline  
Page generated in 0.04161 seconds with 10 queries