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

Dynamic Tile-Based Scrolling

The previous two programs show two possible ways to create a scrolling game world. The real flaw in these programs is that they can’t handle a truly huge game world. The reason for this limitation is that the ScrollTiles program preallocates memory for the entire level before the tiles are drawn onto the screen. At this point, it behaves just like the ScrollScreen program; the only difference is that the image was constructed rather than loaded from a bitmap file. A truly robust scroller must be able to render tiles on the screen dynamically when they are needed, without using an offscreen game world bitmap.

There are several ways to describe the next stage of scrolling. I would like to call it a dynamic scroller ...

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