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

Tile-Based Scrolling

Let’s see how to create a real tile-based scroller. To make the program a bit easier to understand, the virtual background will be 800 pixels across. I know, I know—that’s not much bigger than the 640×480 screen. The point is to demonstrate how it will work, not to build a game engine, so don’t worry about it. If you want to type in the values to create a bigger map, by all means, go for it! That would be a great learning experience, as a matter of fact.

For our purposes here (and with my primary goal of being able to print an entire row of numbers in a single source code line in the book), I’ll stick to maps that have fewer than 30 tiles across and down. You can work with a map that is deeper than it is wide, so that will ...

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