Site hosted by Angelfire.com: Build your free website today!

Graphics Tutorial I

By QBasicBoy



First of all, we will discuss the general principals in generating graphics with QBasic. First, you must have an average, well rounded knowledge of variables (this will help when you wish to animate). Let's now discuss the X and Y axis...

The X axis is how many units from the left of the screen, over.
The Y axis is how many units from the top of the screen, down.


PSET (X, Y), color


Let's now go into detail on every one of those:

*NOTE* In order for graphix to function you need to change the screen property...I'll have another tutorial over screens, but for now, SCREEN 12 will give you accurate, smaller graphics, and SCREEN 13 will give you larger, less detailed graphics with more colors. To use screen properties, simply type in 'SCREEN 12' or 'SCREEN 13' on a seperate line of code in your program.*

PSET (x, y), color
The PSET Statement creates a dot, one pixel wide, on the screen. The 'x' in the parenthesis represents how many pixels you want the colored pixel to appear from the left of the screen. The 'y' represents how many pixels you want the colored pixel to appear down from the top of the screen. The 'color' represents what color you want the pixel, usually you can choose from 1 to 15 Here is some source code for pixels:

CLS SCREEN 13 PSET (100, 100), 14 PSET (50, 50), 1 PSET (25, 100), 4

I hope this was explanitory enough, if you have any questions about the PSET statement, e-mail me.

Created by QBasicBoy
Last modified 7-7-99