I redid the code it is better now but the whole thing seems really inefficient somehow. I guess it is starting to be fun. Does anyone remember text based RPGs. This screen reminded me so much of my VIC 20 back in the early 80s. I think it was even before
(e:mike) 's time. Then we got the commodore 64. I am so sad that I never got a modem at that time. i wonder how different my life would have been if I had been wired at an earlier age. Not just an earlier age for me, but an earlier age for the internet.
Our version of filesharing was the mailman. He would bring a round a list of all of the software other people on the route had for tehir commodore 64, which was pretty pervasive back then. Then we would offere trades and he would copy and drop off disks. It was very similar to kazaa or emule just really manual.
I even rememeber copying programs on audio tape during that time. Does anyone have any early days on the net stories they can share. Or other experience with other net communities on a local level.
' {$STAMP BS2}
DEBUG "code start", CR
INPUT 12
INPUT 13
INPUT 14
INPUT 15
dir VAR Word 'current direction
old_dir VAR Word ' last direction
north VAR Byte 'keep tabs on # of times up was pressed
south VAR Byte 'keep tabs on # of times down was pressed
west VAR Byte 'keep tabs on # of times left was pressed
east VAR Byte 'keep tabs on # of times right was pressed
Index VAR Nib ' Define normal nibble variable.
test:
'reset dir for next test loop
old_dir = dir
dir = 0
nloop:
IF IN12 <> 1 THEN sloop
dir = 1
north = north + 1
sloop:
IF IN13 <> 1 THEN wloop
dir = dir + 10
south = south + 1
wloop:
IF IN14 <> 1 THEN eloop
dir = dir + 100
west = west + 1
eloop:
IF IN15 <> 1 THEN printloop
dir = dir + 1000
east = east + 1
printloop:
IF dir = 0 THEN nothing_pressed 'don't print anything because nothing is being pressed
DEBUG CLS 'clear the screen
'determine the direction
IF dir = 1 THEN goNorth
IF dir = 100 THEN goSouth
IF dir = 10 THEN goEast
IF dir = 1000 THEN goWest
'angled directions
IF dir = 11 THEN goNorthEast
IF dir = 1001 THEN goNorthWest
IF dir = 110 THEN goSouthEast
IF dir = 1100 THEN goSouthWest
totals:
DEBUG ? north
DEBUG ? south
DEBUG ? west
DEBUG ? east
PAUSE 200 'pause before next pole
IF north > 15 THEN winloop 'if the user pressed up 15 times then go to the winning loop
GOTO test
goNorth:
DEBUG "you are going north", CR
GOTO totals
goSouth:
DEBUG "you are going south", CR
GOTO totals
goEast:
DEBUG "you are going east", CR
GOTO totals
goWest:
DEBUG "you are going west", CR
GOTO totals
goNorthEast:
DEBUG "you are going northeast", CR
GOTO totals
goNorthWest:
DEBUG "you are going northwest", CR
GOTO totals
goSouthEast:
DEBUG "you are going southeast", CR
GOTO totals
goSouthWest:
DEBUG "you are going southwest", CR
GOTO totals
nothing_pressed: 'nothing is pressed try again, don't bother pausing
GOTO test
winloop:
DEBUG "You won by pressing the north button 15 times"
END
END