View Single Post
Old 11 April 2015, 10:08   #3
Kalms
Registered User
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 237
One option is to just continue scrolling, and never jumping back. This will make your screen gradually progress through chipmem so it only works if you will scroll a finite distance. If you do this then you do not need two full screens' worth of space; you just need some extra space for soft-scrolling and whatever you need to make your background & bob rendering code simple.

Another option (which is probably what you were thinking of), which allows infinite scrolling, is to have two screenbuffers just like you do now, but when you have reached screen 2, you jump back to screen 1. Now, instead of doing a full blit screen 2->screen 1 when it's time to jump back, you distribute that rendering cost over several frames. One way of doing that for backgrounds is, when you draw some new background graphics, draw it both to screen 1 and screen 2. When you have scrolled all the way to screen 2 this will result in screen 1 having identical background contents, and you can jump back there (just needing to redraw any dynamic content first).
Kalms is offline  
 
Page generated in 0.04159 seconds with 10 queries