View Single Post
Old 05 September 2019, 00:20   #13
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
Just a small, friendly warning: what you're doing will eventually likely crash the Amiga as scrolling the display always also means you're moving through memory*. Once you start seeing 'garbage' on screen (that you overwrite), you're highly likely to be overwriting your own or someone else's program and/or data.

*) That is if you scroll vertically for any distance or horizontally for more than 16 pixels.

The easiest way to scroll vertically in Blitz is probably setting up a screen twice as high as you need it to be and drawing the new tiles you want to uncover on both sides of the visible part of the bitmap as you scroll it. Then, when you reach the 'top' or 'bottom' of the display, you manually wrap it around by resetting the scroll value back to the beginning.

Note this does double the memory cost compared to a non-scrolling screen
Then again, you probably already know this given you're making a screen that scrolls

Vertical scrolling can be done without using all that extra memory by making a copper list that resets the display pointers somewhere down the screen to create a wrapping display (and splitting your bobs as you blit them), but I'm not so sure Blitz supports that in any easy to use way.
roondar is offline  
 
Page generated in 0.05028 seconds with 11 queries