Jump to content
IGNORED

[AQUARIUS] BASIC Programming on the Aquarius


jaybird3rd

Recommended Posts

It occurs to me that I should sign in to the Yahoo! group and collect more of the files currently hosted there.

In the meantime, here's another resource for those interested in starting with BASIC programming on the Aquarius: an excellent book by Chris Crawford called "You Should Learn to Program", which uses BASIC as a general introduction to programming. It isn't specific to the Aquarius, of course, but the sample code in the book should be universal enough to work under Aquarius BASIC. More importantly, it does a great job of explaining how to think about programming, a skill that is applicable to any computer and to any language.

Here's a link to the book on Crawford's website, and a quote to inspire anyone who might still be on the fence about learning to program:

You Should Learn to Program (1988)

A language is a vehicle for exploring intellectual territory. English is like a dune buggy; it's tough, it's resilient, and it can cover a lot of territory. But a computer language is like a boat; it can take you to places you never dreamed existed. You'll find your initial attempts at learning slow and tedious. After all, any language, human or computer, is frustrating to learn at first. But once you get rolling, you'll experience an exhilarating sense of discovery as you chart new mental territory and think with a clarity and precision you had never thought was within your reach. You should learn to program, and do it now, for ultimately learning to program will do more for you than all the computer games and spreadsheets and word processors in the world. It will make you a better thinker.

...

BASIC boasts two special traits that make it ideal for our efforts. First, it is an interactive language; when you attempt something in BASIC, you see the results of your attempt almost immediately. Many other computer languages require you to endure time-consuming intermediate steps before you can see the results of your work. BASIC's interactivity has great importance to a beginning programmer. The fast feedback it offers makes it easier to see one's mistakes. Indeed, this fast feedback encourages lots of experimenting with the language. The trial-and-error approach that BASIC encourages is an excellent way to learn. Of course, professional programmers are not supposed to use trial-and-error programming techniques, so computer scientists disdain BASIC as a naughty language. Since we're not here to become professional programmers, we'll just thumb our noses at those computer scientists.

The second advantage of BASIC is its simplicity. Other computer languages require you to learn all sorts of theory, structure, and special commands before you can write your first program. It can take days or weeks of study before one is knowledgeable enough to write the simplest program with the language. Not so BASIC. This language is so simple that you can start using it in a matter of minutes. As you learn more, your programs can become better. It's that simple. And that is exactly how you're going to learn programming. Let us begin.

  • Like 2
Link to comment
Share on other sites

Indeed there are a few books available. At the time I got my Aquarius in the earlie eighties I didn't have more than the basic manual, but at this point I have the follwoing in my collection: "The Aquarius and how to get the most of it" by Ian Sinclair, "30 Dynamic Games for the Aquarius by Tim hardwell" and finally "The Aquarius program book" by Peter Goode. There should be one out there named "Mattel Aquarius Ideabook" by David H. Ahl, but I have never seen anyone having it? I have a scanned version of the first book "The Aquarius and how to get the most of it" for you if you want, but because of the size I cannot post it here. So if you want it I can send it to you by general E-mail. Furthermore I would recommend you to become a member of the Mattel Aquarius Yahoo user group, because in the file segment, there is also a lot to be found which may come in handy!

Hi All, does any one have a eletronic copy of "The AQUARIUS program book" please. I have "The aquarius and how to get the most of it" which i scanned and posted on the yahoo website.

Link to comment
Share on other sites

Thanks, the editor took the whole line as the url. It is corrected now. The url should be http://www.vdsteenoven.com/aquarius/books.php

 

Regs,

Martin

Nice set of magazines you got here. Lucky for me I can read Dutch :-D Did you have a subscription at the time? It even amazes me that these magazines came out well after the Aquarius was supposed to be dead already! I think at that time I already changed to a c-64 because I didn't know a user support group existed :?

Link to comment
Share on other sites

Yes, I had a subsciption back in the days. Do not remember how I found the group.

The user magazine was only active for two years. I joined the group near the end of the first year. The second year became messy, the magazine no longer appeared monthly and the last magazine was 4 issues at once.

You could also order Aquarius hardware at the group, like the QD

 

Regs,

Martin

  • Like 1
Link to comment
Share on other sites

Yes, I had a subsciption back in the days. Do not remember how I found the group.

The user magazine was only active for two years. I joined the group near the end of the first year. The second year became messy, the magazine no longer appeared monthly and the last magazine was 4 issues at once.

You could also order Aquarius hardware at the group, like the QD

 

Regs,

Martin

In these magazines there is mentioning of an Englisch programming book. Did it ever came out? It sure would be something nice if it existed and we could get our hands on one of these!

Link to comment
Share on other sites

In these magazines there is mentioning of an Englisch programming book. Did it ever came out?

I do not think it ever has been released. The publisher is complaining in one of the issues regarding the lack of interest and that he has to rewrite and translate the programs himself. He could not outsource the work due to the costs and asked the buyers to be patient. That was the last entry regarding the programme book.

Link to comment
Share on other sites

I do not think it ever has been released. The publisher is complaining in one of the issues regarding the lack of interest and that he has to rewrite and translate the programs himself. He could not outsource the work due to the costs and asked the buyers to be patient. That was the last entry regarding the programme book.

I was already afraid of a story like this. It's a pity though!
Link to comment
Share on other sites

Hangman from Quite BASIC for the Aquarius v001b

I'll update the code as it improves. It runs for now isn't functional game.

Maybe you can say why?

 

1000 REM Hangman
1010 print chr$(11)
2000 REM Initialize
2010 REM Draw the ground
2020 FOR I = 0 TO 50
2030 pset (I, 3)
2040 NEXT I
2050 REM E is the number of wrong guesses
2060 LET E = 0
2061 REM Fill Dic$ with words
2065 Dim Dic$(25)
2066 for i = 1 to 25:Read Dic$(i): Next i
2070 REM Get the word in the variable W
2080 GOSUB 9500
2090 REM N is the number of letters
2100 LET N = LEN(W$)
2110 REM A holds the correct answer and L the progressing solution
2120 Dim A$(12)
2130 Dim L$(12)
2140 FOR I = 1 TO N
2150 LET A$(I) = MID$(W$, I, 1)
2160 LET L$(I) = "_"
2170 NEXT I
2180 REM C holds the number of letters correct
2190 LET C = 0
2200 REM Q holds the wrong guesses
2210 LET Q$ = ""

2310 Print "Quite BASIC Hangman for Aquarius"
2320 print "Press a key to begin"
2330 a$=inkey$:if a$="" then 2330
2350 print chr$(11)
3000 REM === Main game loop ===
3010 REM CLT
3020 REM "Quite BASIC Hangman for Aquarius"
3030 FOR I = 1 TO N
3040 PRINT L$(I);
3050 PRINT " ";
3060 NEXT I
3070 PRINT
3075 PRINT Q
3077 IF C = N AND N > 1 THEN GOTO 5000
3080 REM Read keyboard input
3090 X$=INKEY$:IF X$="" THEN GOTO 3090
3100 LET G = val(x$): IF G < val("A") OR G > val("Z") THEN GOTO 3090
3105 PRINT X$
3110 REM Check the guess
3120 LET Z = 0
3130 FOR I = 1 TO N
3140 IF A$(I) = CHR$(G) AND L$(I) = "_" THEN GOTO 3200
3150 GOTO 3290

3200 LET L$(I) = CHR$(G)
3210 LET Z = 1
3220 LET C = C + 1
3290 NEXT I
3300 IF Z = 1 THEN GOTO 3000
3310 LET Q$ = Q$ + chr$(G)
3320 GOSUB 8000
3330 IF E <> 10 THEN GOTO 3000
4000 PRINT "Game Over!"
4010 PRINT "The word is: ";
4020 PRINT W$
4030 END
5000 PRINT "Congratulations!"
5010 PRINT "You win!"
5020 END

8000 REM === Subroutine for drawing a piece of the picture ===
8010 LET E = E + 1
8020 REM GOTO 8000 + 100*E
8030 if e = 1 then goto 8100
8040 if e = 2 then goto 8200
8050 if e = 3 then goto 8300
8060 if e = 4 then goto 8400
8070 if e = 5 then goto 8500
8080 if e = 6 then goto 8600
8090 if e = 7 then goto 8700
8091 if e = 8 then goto 8800
8092 if e = 9 then goto 8900
8093 if e = 10 then goto 9000

8100 REM Draw the pole
8110 FOR I = 4 TO 40
8120 pset(35, I)
8130 NEXT I
8140 RETURN

8100 REM Draw the pole
8110 FOR I = 4 TO 40
8120 pset(35, I)
8130 NEXT I
8140 RETURN
8200 REM Draw the bar
8210 FOR I = 34 TO 20 STEP -1
8220 pset(I, 40)
8230 NEXT I
8240 RETURN
8300 REM Draw the cross bar
8310 FOR I = 1 TO 4
8320 pset(35-I, 35+I)
8330 NEXT I
8340 RETURN
8400 REM Draw the rope
8410 FOR I = 39 TO 32 STEP -1
8420 pset(20, I)
8430 NEXT I
8440 RETURN
8500 REM Draw the head
8510 FOR I = 0 TO 2 * PI STEP PI/10
8520 pset(20 + 2*SIN(I), 29 + 2*COS(I))
8530 NEXT I
8540 RETURN
8600 REM Draw the body
8610 FOR I = 27 TO 20 STEP -1
8620 pset(20, I)
8630 NEXT I
8640 RETURN
8700 REM Draw the left arm
8710 FOR I = 19 TO 16 STEP -1
8720 pset(I, 25)
8730 NEXT I
8740 RETURN
8800 REM Draw the right arm
8810 FOR I = 21 TO 24
8820 pset(I, 25)
8830 NEXT I
8840 RETURN
8900 REM Draw the left leg
8910 FOR I = 0 TO 4
8920 pset(20-I, 19-I)
8930 NEXT I
8940 RETURN
9000 REM Draw the right leg
9010 FOR I = 0 TO 4
9020 pset(20+I, 19-I)
9030 NEXT I
9040 RETURN
9500 REM === Subroutine for selecting a word ===
9510 REM GOTO 9520 + 2 * FLOOR(RAND(25))
9515 P = int(1+rnd(1)*25)
9520 W$=Dic$(P)
9530 RETURN


9540Data"CAT","DOG","MOUSE","ELEPHANT","ZEBRA","LION", "ANT","EAGLE"
9550Data"KOALA","RACOON","GOLDFISH","BEAR","CATERPILLAR","BEETLE"
9560Data"BEE","FLY","HORSE","PUMA","TERMITE", "ANTEATER",
9570Data"GIRAFFE", "COW", "RAT","CRICKET","TIGER"

9571 RETURN

 

 

 

 

 

QuiteBASIC doesn't use the string $ variable modifier used by AquariusBASIC.

It also has a text overlay terminal window that uses a CLT command to clear,

while CLS clears the graphics layer.

Graphics start at 0,0 in the lower left corner instead of top left, so I have to redraw the
graphics. I was thinking of involving the running man running out of plank or something.

Fancy stuff comes later.

Edited by Pset
Link to comment
Share on other sites

Hmmm. I can't edit old posts after a few hours?
Well here's v002b of Hangman for Aquarius, it works pretty good even if the code is a mess.

 

 

1000 REM Hangman
1010 Dim Dic$(25)
1020 Dim A$(12)
1030 Dim L$(12)
2000 REM Initialize
2015 REM Fill Dic$ with words
2020 for i = 1 to 25:Read Dic$(i): Next i
2050 REM E is the number of wrong guesses
2060 LET E = 0
2070 REM Get the word in the variable W
2080 GOSUB 9500
2090 REM N is the number of letters
2100 LET N = LEN(W$)
2110 REM A holds the correct answer and L the progressing solution
2140 FOR I = 1 TO N
2150 LET A$(I) = MID$(W$, I, 1)
2160 LET L$(I) = "_"
2170 NEXT I
2180 REM C holds the number of letters correct
2190 LET C = 0
2200 REM Q holds the wrong guesses
2210 LET Q$ = ""
3000 REM === Main game loop ===
3010 print chr$(11): Gosub 8020
3020 REM "Quite BASIC Hangman for Aquarius"
3030 FOR I = 1 TO N
3040 PRINT tab(19-n) L$(I);
3050 PRINT " ";
3060 NEXT I
3070 print: Print Q$
3077 IF C = N AND N > 1 THEN GOTO 5000
3080 REM Read keyboard input
3090 X$=inkey$:if X$ = "" then 3090
3110 REM Check the guess
3120 LET Z = 0
3130 FOR I = 1 TO N
3140 IF A$(I) = X$ AND L$(I) = "_" THEN GOTO 3200
3150 GOTO 3290
3200 LET L$(I) = X$
3210 LET Z = 1
3220 LET C = C + 1
3290 NEXT I
3300 IF Z = 1 THEN GOTO 3000
3310 LET Q$ = Q$ + X$
3320 GOSUB 8000
3330 IF E <> 10 THEN GOTO 3000
4000 Print chr$(11): gosub 8000 :PRINT tab(12) "Game Over!"+chr$(10)
4010 PRINT tab(6)"The word is: ";W$
4030 goto 5020
5000 PRINT chr$(11)
5010 PRINT tab(6)+"Congratulations! You win!"+Chr$(10)
5020 Print tab(6) "Press any key to continue"
5030 x$=inkey$:if inkey$ ="" then goto 5030
5040 goto 2050
8000 REM === Subroutine for drawing a piece of the picture ===
8010 LET E = E + 1
8030 REM Draw the ground
8040 FOR I = 0 TO 72
8050 pset (I, 60)
8060 NEXT I
8070 if len(Q$) < 1 then return
8100 REM Draw the pole
8110 FOR I = 24 TO 60
8120 pset(45, I)
8130 NEXT I
8140 if E < 2 then return
8200 REM Draw the bar
8210 FOR I = 30 TO 44
8220 pset(I, 24)
8230 NEXT I
8240 if E < 3 then RETURN
8300 REM Draw the cross bar
8310 FOR I = 1 TO 4
8320 pset(45-I, 29-I)
8330 NEXT I
8340 if E < 4 then RETURN
8400 REM Draw the rope
8410 FOR I = 24 TO 30
8420 pset(30, I)
8430 NEXT I
8440 if E < 5 then RETURN
8500 REM Draw the head
8505 PI = 3.1459
8510 FOR I = 0 TO 2 * PI STEP PI/10
8520 pset(30 + 2*SIN(I), 32 + 2*COS(I))
8530 NEXT I
8540 if E < 6 then RETURN
8600 REM Draw the body
8610 FOR I = 34 TO 44
8620 pset(30, I)
8630 NEXT I
8640 if E < 7 then RETURN
8700 REM Draw the left arm
8710 FOR I = 26 to 29
8720 pset(I, 36)
8730 NEXT I
8740 if E < 8 then RETURN
8800 REM Draw the right arm
8810 FOR I = 31 TO 34
8820 pset(I, 36)
8830 NEXT I
8840 if E < 9 then RETURN
8900 REM Draw the left leg
8910 FOR I = 0 TO 4
8920 pset(30+I, 44+I)
8930 NEXT I
8940 if E < 10 then RETURN
9000 REM Draw the right leg
9010 FOR I = 0 TO 4
9020 pset(30-I, 44+I)
9030 NEXT I
9040 RETURN
9500 REM === Subroutine for selecting a word ===
9510 REM GOTO 9520 + 2 * FLOOR(RAND(25))
9515 P = int(1+rnd(1)*25)
9520 W$=Dic$(P)
9530 RETURN
9540data"cat","dog","mouse","elephant","zebra","lion", "ant","eagle"
9550data"koala","racoon","goldfish","bear","caterpillar","beetle"
9560data"bee","fly","horse","puma","termite", "anteater",
9570data"giraffe", "cow", "rat","cricket","tiger"
9571 RETURN

 

 

Edited by Pset
Link to comment
Share on other sites

Apparently line 8020 is missing in the above code.

Why can we not edit old posts?

So here's v003b of Hangman for the Aquarius.

I need to get control of the cursor position, without using Extended Basic, so that I don't have to redraw
the graphics but can still update the text inputs.

Pokes are probably the way to go but make the program incompatible to every BASIC everywhere.

But then doesn't everything?

 

 

 

1000 REM Hangman For Aquarius v003b

1010 Dim Dic$(25)

1020 Dim A$(12)

1030 Dim L$(12)

2000 REM Initialize

2015 REM Fill Dic$ with words

2020 for i = 1 to 25:Read Dic$(i): Next i

2050 REM E is the number of wrong guesses

2060 LET E = 0

2070 REM Get the word in the variable W

2080 GOSUB 9500

2090 REM N is the number of letters

2100 LET N = LEN(W$)

2110 REM A holds the correct answer and L the progressing solution

2140 FOR I = 1 TO N

2150 LET A$(I) = MID$(W$, I, 1)

2160 LET L$(I) = "_"

2170 NEXT I

2180 REM C holds the number of letters correct

2190 LET C = 0

2200 REM Q holds the wrong guesses

2210 LET Q$ = ""

3000 REM === Main game loop ===

3010  print chr$(11): Gosub 8020

3020 REM "Quite BASIC Hangman for Aquarius"

3030 FOR I = 1 TO N

3040 PRINT tab(19-n) L$(I);

3050 PRINT " ";

3060 NEXT I

3070 print:  Print Q$

3077 IF C = N AND N > 1 THEN GOTO 5000

3080 REM Read keyboard input

3090 X$=inkey$:if X$ = "" then 3090

3110 REM Check the guess

3120 LET Z = 0

3130 FOR I = 1 TO N

3140 IF A$(I) = X$ AND L$(I) = "_" THEN GOTO 3200

3150 GOTO 3290

3200 LET L$(I) = X$

3210 LET Z = 1

3220 LET C = C + 1

3290 NEXT I

3300 IF Z = 1 THEN GOTO 3000

3310 LET Q$ = Q$ + X$

3320 GOSUB 8000

3330 IF E <> 10 THEN GOTO 3000

4000 Print chr$(11): gosub 8000 :PRINT tab(12) "Game Over!"+chr$(10)

4010 PRINT tab(6)"The word is: ";W$

 4030 goto 5020

5000 PRINT chr$(11)

5010 PRINT tab(6)+"Congratulations! You win!"+Chr$(10)

5020 Print tab(6) "Press any key to continue"

5030 x$=inkey$:if inkey$ ="" then goto 5030

5040 goto 2050

8000 REM === Subroutine for drawing a piece of the picture ===

8010 LET E = E + 1
8020 REM redraw the scene without updating injury E value.

8030 REM Draw the ground

8040 FOR I = 0 TO 72

8050 pset (I, 60)

8060 NEXT I

8070 if len(Q$) < 1 then return

8100 REM Draw the pole

8110 FOR I = 24 TO 60

8120 pset(45, I)

8130 NEXT I

8140 if E < 2 then return

8200 REM Draw the bar

8210 FOR I = 30 TO 44

8220 pset(I, 24)

8230 NEXT I

8240 if E < 3 then RETURN

8300 REM Draw the cross bar

8310 FOR I = 1 TO 4

8320 pset(45-I, 29-I)

8330 NEXT I

8340 if E < 4 then RETURN

8400 REM Draw the rope

8410 FOR I = 24 TO 30

8420 pset(30, I)

8430 NEXT I

8440 if E < 5 then RETURN

8500 REM Draw the head

8505 PI = 3.1459

8510 FOR I = 0 TO 2 * PI STEP PI/10

8520 pset(30 + 2*SIN(I), 32 + 2*COS(I))

8530 NEXT I

 8540 if E < 6 then RETURN

8600 REM Draw the body

8610 FOR I = 34 TO 44

8620 pset(30, I)

8630 NEXT I

8640 if E < 7 then RETURN

8700 REM Draw the left arm

8710 FOR I = 26 to 29

8720 pset(I, 36)

8730 NEXT I

8740 if E < 8 then RETURN

8800 REM Draw the right arm

8810 FOR I = 31 TO 34

8820 pset(I, 36)

8830 NEXT I

8840 if E < 9 then RETURN

8900 REM Draw the left leg

8910 FOR I = 0 TO 4

8920 pset(30+I, 44+I)

8930 NEXT I

8940 if E < 10 then  RETURN

9000 REM Draw the right leg

9010 FOR I = 0 TO 4

9020 pset(30-I, 44+I)

9030 NEXT I

9040  RETURN

9500 REM === Subroutine for selecting a word ===

9510 REM GOTO 9520 + 2 * FLOOR(RAND(25))

9515 P = int(1+rnd(1)*25)

9520 W$=Dic$(P)

9530 RETURN

9540data"cat","dog","mouse","elephant","zebra","lion", "ant","eagle"

9550data"koala","racoon","goldfish","bear","caterpillar","beetle"

9560data"bee","fly","horse","puma","termite", "anteater",

9570data"giraffe", "cow", "rat","cricket","tiger"

9571 RETURN

 

 

Edited by Pset
  • Like 1
Link to comment
Share on other sites

Do you all remember the Usborne publishing computer learning series?

Archive.org has a few online as well as the Basic Conversion Handbook.

Maybe we can see some of these programs on the Aquarius.

 

I think we should post everything Aquarius to Archive.org.

Movies, screenshots, the works. Free hosting is sweet.

 

This should lead to a list of beginner programming books for kids. about 50 pages each.

https://archive.org/search.php?query=usborne%20%20publishing%20AND%20mediatype%3Atexts

 

and this goes to the basic conversion handbook.

https://archive.org/details/basic_conversion_handbook

 

Lots of other stuff there but I think these books fit the Aquarius nicely.

 

I've been downloading Compute!, ENTER, and BYTE magazines and books for hours.

Edited by Pset
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Yes, I had a subsciption back in the days. Do not remember how I found the group.

The user magazine was only active for two years. I joined the group near the end of the first year. The second year became messy, the magazine no longer appeared monthly and the last magazine was 4 issues at once.

You could also order Aquarius hardware at the group, like the QD

 

Regs,

Martin

I wonder if something like this user group also existed in other countries?
Link to comment
Share on other sites

  • 2 weeks later...

Ya'll are slackin'. Post some code! I was digging around in Z80 resources and found this directory full of ZX81 stuff.

Bingo. I found this program once in the 80s and it set me off for hours of basic adventure back in the day.

 

5 PRINT CHR$(11)
10 REM Sinewave
20 FOR n = 0 to 79
30 y = 35+(35*SIN(N/3.14159))
40 PSET(n,y)
50 NEXT n

 

Here's some of my added code for fun!

It starts erasing the trail after 20 ticks

new
5 print chr$(11)
10 REM sinewave
20 dim XR(80),YR(80)
30 I = 0
50 RX=int(30*rnd(1)+5)
60 FOR N = 0 TO 79
70 Y = 35+(RX*SIN(N/35*3.14159))
80 PSET(N,Y)
90 XR(i)=N : YR(i)=Y
95 i = i + 1
100 if i > 20 then gosub 500
120 NEXT N
140 REM clean up the tail
150 for c=60 to 80
160 preset(XR(c),yr(c))
170 next c
200 x$=inkey$:if x$="" then 40
 
500 rem erase the tail 
510 M=i-19
530 preset(XR(M),YR(M))
550 return
Link to comment
Share on other sites

I made it a little shorter. Would this still work (I can't test it right now...)

new
5 print chr$(11)
10 REM sinewave
20 dim XR(80),YR(80)

40 rem start
50 RX=int(30*rnd(1)+5)
60 FOR N = 0 TO 20
70 gosub 300
90 NEXT N
100 FOR N = 21 TO 98
110 if N < 80 then gosub 300
120 M=N-19
130 preset(XR(M),YR(M))
140 NEXT N

200 x$=inkey$:if x$="" then 40

300 rem plot a point
310 Y = 35+(RX*SIN(N/35*3.14159))
320 PSET(N,Y)
330 XR(N)=N : YR(N)=Y
340 return

  • Like 1
Link to comment
Share on other sites

I was flicking reddit's random button when I dropped in on r/retrobattlestations.
Curious what I would I find I searched Aquarius. Just two months ago they were all over the Aquarius.

Apparently they had a BASIC programming challenge and this was the result.

 

 

REM BASIC Week 2: Halloween Boogaloo
110 REM http://reddit.com/r/RetroBattlestations
120 REM written by FozzTexx
130 REM Aquarius port started by FozzTexx
140 REM ----
150 REM You probably don't want to type any REM statements or spaces
160 REM in order to conserve as much of the RAM as possible
170 REM ----
200 REM Clear screen and setup variables
210 CL =40 : RW=24 : WL=0
220 PRINT CHR$(11);

300 REM Skip background but setup variables it would have used
310 GOSUB 1510 : WH=NR
320 FOR I = 1 TO WH
330 GOSUB 1510
340 IF WL < LEN(SP$) THEN WL = LEN(SP$)
350 NEXT

360 NR = RW : KW = CL : KF = 0 : WD = -2
370 X = 2:KF = X + WD : IF RND(1) > .5 THEN X = CL - WD - 2 : KF = 0
380 GOSUB 1510 : Y = RW - NR : KW = CL - WD - 4
390 GOSUB 1510
400 GOSUB 2010
410 Y = Y + 1 : IF T$ = "SP" GOTO 390

500 REM Load sprites into variables and get witch length
560 GOSUB 1510:BT$(0) = SP$:BE$ = SE$:BC = SC
570 GOSUB 1510:BT$(1) = SP$
580 GOSUB 1510:BT$(2) = SP$

610 NB = 3 :WX = -WL
620 FOR I = 1 TO NB
630 BX(I) = INT(RND(1) * (KW - BC))
635 BY(I) = INT(RND(1) * ((RW - 4 - NR / 2) / NB)) * NB + I + 1
640 BW(I) = INT(RND(1) * 2):BF(I) = INT(RND(1) * 9)
650 NEXT I
660 FOR I = 1 TO NB
670 X= BX(I) : Y = BY(I) : rem SP$=BT$(2) : GOSUB 2010
680 Y = INT(BF(I) / 3) = INT((BF(I) / 3 - Y) * 3 + .05)
690 X = X + BX(I) + KF :Y = Y + BY(I):SP$ = BT$(2) :GOSUB 2010
700 BW(I) = BW(I) + 1:IF BW(I) > 1 THEN BW(I) = 0
710 BF(I) = INT(RND(1) * 9)
720 Y = INT(BF(I) / 3) = INT((BF(I) / 3 - Y) * 3 + .05)
730 X = X + BX(I) + KF :Y = Y + BY(I):SP$ = BT$(BW(I)):GOSUB 2010

740 IF WX = -WL AND WH + NR < RW AND RND(1) * 50 < 2 THEN WX = CL - 1
750 IF WX > -WL THEN GOSUB 1005

780 NEXT I
790 GOTO 660

900 END

1000 REM Draw witchy - restorin data
1005 RESTORE : READ SP$ : READ SP$
1010 WX = WX - 1
1020 Y=1
1050 GOSUB 1510
1060 TL = LEN(SP$)
1070 IF WX < 1 AND (WX+TL) > 0 THEN SP$ = MID$( SP$, WX*-1+1, WX+TL)
1080 IF WX < 1 AND (WX+TL) < 1 THEN SP$ = " "
1090 IF (WX + WL) > CL THEN SP$ = MID$( SP$, 1, CL-WX)+" "
1100 IF LEN(SP$) = 0 THEN GOTO 1050
1110 X = WX : IF X < 1 THEN X = 1
1120 GOSUB 2010
1130 Y = Y + 1
1140 IF Y > WH THEN RETURN
1150 GOTO 1050


1500 REM Load a sprite from DATA into a string
1510 SP$ = "":SE$ = "":SR = 0:SC = 0
1520 READ T$,S$
1525 IF T$="SD" THEN NR = VAL(S$) : RETURN
1530 SP$ = SP$ + S$:SR = SR + 1:IF LEN(S$) > SC THEN SC = LEN(S$)
1580 RETURN

2000 REM Draw sprite in SP$ at X,Y
2010 IF T$="SD" THEN RETURN
2020 M = Y * CL + X:M = M + 12287
2030 FOR J=1 TO LEN(SP$)
2040 TMP$ = MID$ (SP$, J, 1)
2050 CH = ASC( TMP$ )
2060 IF CH = 13 THEN M= M + CL : NEXT
2070 POKE M+J, CH
2080 NEXT
2090 RETURN

4170 DATA SD,7
4180 DATA SP," , "
4190 DATA SP," _/(_ "
4200 DATA SP," {\\ "
4210 DATA SP," /;_) "
4220 DATA SP,"='/ <==<< "
4230 DATA SP," \__\ "
4240 DATA SE," `` "
5000 DATA SD,15
5010 DATA SP," /\"
5020 DATA SP," //\\"
5030 DATA SP," / -- \"
5040 DATA SP," / \/ \"
5050 DATA SP," /________\"
5060 DATA SP," l ___ l"
5070 DATA SP," ll l ll:::"
5080 DATA SP," /\ll-+-llIII"
5090 DATA SP," / \l_l_ll \"
5100 DATA SP," / () \ l____"
5110 DATA SP,"/_____ l ++l"
5120 DATA SP," l +--+ l ++l"
5130 DATA SP," l l l l ++l"
5140 DATA SP," l lo l l___l"
5150 DATA SE," l___l__l_l"

5250 DATA SL,"^v^"
5260 DATA SL,"-v-"
5270 DATA SL," "

 

Tis the season!

 

Here's the GITHub where those guys post their code.

 

Have fun.

Edited by Pset
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...