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

Data Sequences

In this section I will show you how to create a data sequence in a DarkBASIC program. Next I’ll show you the various commands for reading the data sequence and putting the data to good use. Finally, I’ll show you how to reset the data sequence and start reading it from the beginning again. This might be useful when you want to restart the game, for instance.

The DATA Statement

The DATA statement is used to define data in a data sequence. It is specifically called a sequence because you can have many DATA statements in your program. In fact, you can insert a DATA command anywhere in your program, but I would recommend keeping all DATA statements at the top of the source code file for clarity. It is very confusing when you have ...

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