So basically what I want to know is: a) am I using this method correctly? or b) is there another method I should be using?

Here is my program:

Code: Select all

```
DIM sprite(515) AS INTEGER
SCREEN 13
RANDOMIZE TIMER
LINE (0, 0)-(15, 31), 12, BF
GET (0, 0)-(15, 31), sprite(0)
CLS
FOR lines = 1 TO 255
x1 = INT(RND * 320): y1 = INT(RND * 200)
x2 = INT(RND * 320): y2 = INT(RND * 200)
LINE (x1, y1)-(x2, y2), lines
NEXT lines
x = 150: y = 80
DO
oldX = x: oldY = y
GET (x, y)-(x + 15, y + 31), sprite(258)
WAIT &H3DA, 8
PUT (x, y), sprite(0), PSET
DO: k$ = INKEY$: LOOP WHILE k$ = ""
IF k$ = "4" THEN
x = x - 2: IF x < 0 THEN x = 320 - 16
END IF
IF k$ = "6" THEN
x = x + 2: IF x > 320 - 16 THEN x = 0
END IF
IF k$ = "8" THEN
y = y - 2: IF y < 0 THEN y = 200 - 32
END IF
IF k$ = "2" THEN
y = y + 2: IF y > 200 - 32 THEN y = 0
END IF
PUT (oldX, oldY), sprite(258), PSET
LOOP UNTIL k$ = CHR$(27)
SYSTEM
```