# Baisc Code 1 of 3

``` BBS: Inland Empire Archive
Date: 06-12-93 (21:09)             Number: 362
From: STEVE DEMO                   Refer#: NONE
To: EARL MONTGOMERY               Recvd: NO
Subj: Baisc Code 1 of 3              Conf: (2) Quik_Bas```
```'______O_/__________________| SNIP |__________________\_O______
'      O \                  | HERE |                  / O

'>>> Start of page 1.

'Just a Quick Demo of ways to get areas of the Screen 13 into arrays
'and manipulate them. I know you can use get ect.. but I wanted to do
'it this way. These routines could be used in Loading Screens for Games
'although slow they are kinda neat. See ya Oh yes No Mickey this time.

DEFINT A-Z
'\$DYNAMIC
DIM DoitA(1 TO 16000)  'first 1/4 of 1st screen
DIM Doitb(1 TO 16000)  'second 2/4 of 1st screen
DIM Doitc(1 TO 16000)  'third 3/4 of 1st screen
DIM Doitd(1 TO 16000)  'forth 4/4 of 1st screen

DIM aDoitA(1 TO 16000)  'first 1/4 of 2nd screen
DIM aDoitb(1 TO 16000)  'second 2/4 of 2nd screen
DIM aDoitc(1 TO 16000)  'third 3/4 of 2nd screen
DIM aDoitD(1 TO 16000)  'forth 4/4 of 2nd screen
CONST PI = 3.141593
SCREEN 0
WIDTH 40
RANDOMIZE TIMER
COLOR 31
LOCATE 12, 5: PRINT "Ok another stupid Graphic Demo": SLEEP 3
SCREEN 13
'Lets Make some pretty pictures
PixleColor = 79
FOR x = 0 TO 199
PixleColor = PixleColor + 1
IF PixleColor > 100 THEN PixleColor = 79
FOR xxx = 0 TO 319
PSET (xxx, x), PixleColor
NEXT xxx
NEXT x
FOR a = 1 TO 30
Xcord = RND * 320
ycord = RND * 200
Coulors = INT(50 * RND) + 1
LINE (Xcord, ycord)-(INT(300 * RND), INT(200 * RND)), Coulors, B
NEXT
FOR a = 1 TO 100
Xcord = RND * 320
ycord = RND * 200
Coulors = INT(150 * RND) + 1
CIRCLE (Xcord, ycord), INT(10 * RND) + 1, Coulors, -PI, -PI / 2
PAINT (Xcord + 1, ycord), INT(100 * RND) + 1, Coulors
NEXT
D = 0       ' Now lets save the first screen in a array
FOR x = 0 TO 49
FOR xxx = 0 TO 319
D = D + 1
PixClr = POINT(xxx, x): DoitA(D) = PixClr
PixClr = POINT(xxx, x + 50): Doitb(D) = PixClr
PixClr = POINT(xxx, x + 100): Doitc(D) = PixClr
PixClr = POINT(xxx, x + 150): Doitd(D) = PixClr
NEXT xxx
NEXT x
CLS   ' Lets Draw The Next Screen
FOR a = 1 TO 30
Xcord = RND * 320
ycord = RND * 200
Coulors = INT(50 * RND) + 1
LINE (Xcord, ycord)-(INT(300 * RND), INT(200 * RND)), Coulors, B
NEXT
FOR a = 1 TO 100
Xcord = RND * 320
ycord = RND * 200
Coulors = INT(150 * RND) + 1
CIRCLE (Xcord, ycord), INT(40 * RND) + 1, Coulors, -PI, -PI / 2
PAINT (Xcord + 1, ycord), INT(100 * RND) + 1, Coulors
NEXT
D = 0
'>>> Continued on page 2

___ Blue Wave/QWK v2.11

--- Maximus 2.01wb
* Origin: Semper Fi BBS  Ft. Wayne, IN  (219) 424-4292 (1:236/21)
```

Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET