I know that its slow and skips a lot and crappy as hell, but its good enough for me because at least i understand DATA, DIM, GET, and PUT.
help as to why its skippy (and im sure it's because of the CLS every time you move) is greatly appreciated, because i like my little Bobby Blobby :3 and i want to turn him into a full fledged game eventually lol.
here's the source
edit: hmmm..i seem to of lost somehow my working version...strange.
Code: Select all
'blob facing rght
DATA 00,00,10,10,10,00,00,00,00
DATA 00,10,10,10,10,10,10,00,00
DATA 10,10,10,10,10,01,10,10,00
DATA 10,10,10,02,10,10,10,10,10
DATA 10,10,10,10,02,02,02,10,10
DATA 00,10,10,10,10,10,10,10,00
'blob facing left
DATA 00,00,00,00,10,10,10,00,00
DATA 00,00,10,10,10,10,10,10,00
DATA 00,10,10,01,10,10,10,10,10
DATA 10,10,10,10,10,02,10,10,10
DATA 10,10,02,02,02,10,10,10,10
DATA 00,10,10,10,10,10,10,10,00
'facing down sprite
DATA 00,00,00,00,00,00
DATA 00,00,10,10,00,00
DATA 00,10,10,10,10,00
DATA 10,10,10,10,10,10
DATA 10,10,10,10,10,10
DATA 10,01,10,10,01,10
DATA 02,10,10,10,10,02
DATA 10,02,02,02,02,10
DATA 00,10,10,10,10,00
SCREEN 7
CLS
COLOR 2, 6
'draw the sprites on screen so they can be stored in memory
FOR Y = 0 TO 5 ' For each row
FOR X = 0 TO 8 ' For each column
READ DotColor
PSET (X, Y), DotColor
NEXT X
NEXT Y
FOR Y = 6 TO 11 ' For each row
FOR X = 0 TO 8 ' For each column
READ DotColor
PSET (X, Y), DotColor
NEXT X
NEXT Y
FOR Y = 12 TO 20 ' For each row
FOR X = 0 TO 5 ' For each column
READ DotColor
PSET (X, Y), DotColor
NEXT X
NEXT Y
'Store the sprites to memory
DIM blobR%(0 TO 8, 0 TO 5)
DIM blobL%(0 TO 8, 6 TO 11)
DIM blobD%(0 TO 5, 12 TO 20)
GET (0, 0)-(8, 5), blobR%
GET (0, 6)-(8, 11), blobL%
GET (0, 12)-(5, 20), blobD%
CLS
bx = 50
by = 50
PUT (bx, by), blobR%
A$ = INKEY$
DO
IF A$ = "d" THEN
CLS
bx = bx + 2
PUT (bx, by), blobR%
END IF
IF A$ = "a" THEN
CLS
bx = bx - 2
PUT (bx, by), blobL%
END IF
IF A$ = "s" THEN
CLS
by = by - 2
PUT (bx, by), blobD%
END IF
LOOP
-Andrew