O'Reilly logo

DarkBASIC Pro Game Programming, Second Edition by Joshua R. Smith, Jonathan S. Harbour

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The DynamicScroller Program

The DynamicScroller program is an example of dynamic or just-in-time scrolling, and is shown in Figure 15.12. This program only requires enough memory for the source bitmap image containing tiles, and a scroll buffer that is just slightly larger than the screen. If you understand the concept of a dynamic scroller at this point, then you will be able to visualize how the following code works intuitively. If you find that any part of the theory behind this algorithm confuses you, then just jump back a few pages and read the explanation of dynamic scrolling again while reading through the code, and I’m sure you will get the hang of it.

Figure 15.12. The DynamicScroller program is a demonstration of dynamic tile.based ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required