Jump to content
IGNORED

HELP - I AM STUCK! - TI EXtended BASIC


oddemann

Recommended Posts

16 minutes ago, WhataKowinkydink said:

Anyway, I'll get off the soapbox.  I really like this aquarium.  Great find @oddemann -  nice work, too @TheBF .   I might just have to save it for late use on the real iron :)

Found it "again" in Compute Issue 46. I remember typing it in on my real iron TI, in 84. Was looking over my stuff in the cellar. Found the old TI with some papers (a stack of copied pages of programs, looked online to find the mag to copy from the PDF to save time). And a Danish manual for the TI (I am from Norway).

Also found "SIR PRANCE-A-LOT", so nice looking. Wow, this will be a cool game. An then this "spidery-man" is running... bvæææ bvæææ bvææææææææææ! Maybe fix the animation of Sir Prance-a-lot :p

Thx for the "fix".

  • Like 1
Link to comment
Share on other sites

1 hour ago, oddemann said:

Could you explain the sound thing?

 


480 CALL PATTERN(#FISH,124)!  wiggle
490 CALL SOUND(RND*100+20,-6,30)! DELAY
500 CALL PATTERN(#FISH,120)

Since CALL SOUND() has an accurate timer, you can use it as a delay.  Just set the volume to 30db attenuation (off).

Works great and only 1 line of code.

 

  • Like 4
Link to comment
Share on other sites

This version is cute.

Spoiler


100 ! REQUIRES EXTENDED BASIC.
110 CALL SCREEN(2)
120 CALL CLEAR
130 FOR I=1 TO 14 :: CALL COLOR(I,15,1):: NEXT I
140 PRINT "TI AQUARIUM": : : :
150 PRINT "This program allows you to"
160 PRINT "use your TI-99 to enjoy the"
170 PRINT "relaxing sight of fish"
180 PRINT "swimming by, without the"
190 PRINT "expense and bother of a"
200 PRINT "real aquarium."
210 PRINT : :"To end the program, press"
220 PRINT "FCTN BREAK"
230 PRINT
240 FOR D=1 TO 500 :: NEXT D
250 CALL CLEAR
260 RANDOMIZE
270 A$="0000000043476F7F7F6F474300000000004020F0F8DCB6BFBFDEFCF820400000"
280 B$="0000010003272F3F3F2F270300010000000000F0F8DCB6BFBFDEFCF8F0000000"
290 CALL CHAR(120,A$)
300 CALL CHAR(124,B$)
310 CALL MAGNIFY(3)
320 CALL SCREEN(2)
330 !
340 ! Put 10 fish on the screen,
350 ! colors are sequential
360 !
370 FOR Q=1 TO 10
380 CALL SPRITE(#Q,120,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
390 CALL COLOR(#Q,Q+2)
400 NEXT Q
410 !
420 ! Now that all the fish are on the screen
430 ! make random changes in their motion
440 !
450 FOR FISH= 1 TO 10
470    FOR X=1 TO 15
480      CALL PATTERN(#FISH,124)!  wiggle
482      CALL MOTION(#FISH,30*RND-15,X*(RND*6))
490      CALL SOUND(30,-6,30)! DELAY
500      CALL PATTERN(#FISH,120)
510    NEXT X
515    CALL MOTION(#FISH,2*RND-1,RND*3-1)
517 NEXT FISH
520 GOTO 450
530 END

 

 

  • Like 2
Link to comment
Share on other sites

New pictures... cropped from real fish... dos not look that great in 16*16... But... this is 3 pictures. Maybe the sequence can be changed.

A$="0000000001071F3F7F5F7F1F0F010000003060C0C1C3F7FEFEFEF3E361617130"

B$="0000000001071F3F7F5F7F1F0F010000000060C0C282F6FCFCFCF2E242424020"

C$="0000000001071F3F7F5F7F1F0F010000002040C0C081E3FEFEFEF3E3C1E16130"

Link to comment
Share on other sites

I reversed the direction of the goldfish. I will leave it to you if you want them going the other direction. :) 

 

The lesson, to answer your original question is that you can animate the fish with CALL PATTERN().

This is the fastest way because you only change one character number in the Sprite's definition.  It assumes you have the characters pre-defined with CALL CHAR().

 

 

Spoiler


100 ! Aquarium III  Brian Fox 2020
110 ! Angel fish by Oddemann
120 ! REQUIRES EXTENDED BASIC
130 CALL SCREEN(2)
140 CALL CLEAR
150 FOR I=1 TO 14 :: CALL COLOR(I,15,1):: NEXT I
160 PRINT "TI AQUARIUM III": : : :
170 PRINT "This program allows you to"
180 PRINT "use your TI-99 to enjoy the"
190 PRINT "relaxing sight of fish"
200 PRINT "swimming by, without the"
210 PRINT "expense and bother of a"
220 PRINT "real aquarium."
230 PRINT : :"To end the program"
240 PRINT " press FCTN BREAK"
250 PRINT
260 FOR X=1 TO 600::NEXT X
270 CALL CLEAR
280 RANDOMIZE
290 A$="0000000043476F7F7F6F474300000000004020F0F8DCB6BFBFDEFCF820400000"
300 B$="0000010003272F3F3F2F270300010000000000F0F8DCB6BFBFDEFCF8F0000000"
310 C$="000C060383C3EF7F7F7FCFC786868E0C0000000080E0F8FCFEFAFEF8F0800000"
320 D$="0000060343416F3F3F3F4F47424202040000000080E0F8FCFEFAFEF8F0800000"
330 E$="000402030381C77F7F7FCFC78387860C0000000080E0F8FCFEFAFEF8F0800000"
340 CALL CHAR(104,A$)! Tuna 1
350 CALL CHAR(112,B$)! Tuna 2
360 CALL CHAR(120,C$)! Angel fish1
370 CALL CHAR(128,D$)! Angel fish2
380 CALL CHAR(136,E$)! Angel fish3
390 CALL MAGNIFY(3)
410 !
420 ! Put 5 tuna fish on the screen,
430 ! Sprites 1..5
440 !
450 FOR TUNA=1 TO 5
460 CALL SPRITE(#TUNA,104,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
470 CALL COLOR(#TUNA,TUNA+2)
480 CALL SOUND(1000,-6,30)
490 NEXT TUNA
500 ! Put 5 GOLD fish on the screen,
510 ! Sprites 6..10
520 !
530 FOR GOLD=6 TO 10
540 CALL SPRITE(#GOLD,120,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
550 CALL COLOR(#GOLD,GOLD+2)
560 CALL SOUND(1000,-6,30)
570 NEXT GOLD
580 !
590 ! make random Goldfish Swim
600 !
610 GOLD=RND*4+6
620 XVEC=8*RND-4 :: YVEC=RND*3+5
630 FOR X=1 TO 10
640 CALL PATTERN(#GOLD,136)!  pattern 3
650 CALL SOUND(200,-6,30)
660 CALL PATTERN(#GOLD,128)
670 CALL MOTION(#GOLD,XVEC,YVEC)
680 CALL SOUND(200,-6,30)
690 CALL PATTERN(#GOLD,120)
700 NEXT X
710 CALL MOTION(#GOLD,XVEC/2,1)
720 !
730 ! make a random Tuna swim
740 !
750 TUNA=RND*4+1
760 FOR X=1 TO 12
770 CALL PATTERN(#TUNA,112)!  wiggle
780 CALL MOTION(#TUNA,30*RND-15,X*(RND*6))
790 CALL SOUND(50,-6,30)! DELAY
800 CALL PATTERN(#TUNA,104)
810 NEXT X
820 CALL MOTION(#TUNA,2*RND-1,RND*3-1)
830 GOTO 610
840 END

 

 

 

aquariumIII.png

  • Like 1
Link to comment
Share on other sites

1 hour ago, TheBF said:

I reversed the direction of the goldfish. I will leave it to you if you want them going the other direction. :) 

 

The lesson, to answer your original question is that you can animate the fish with CALL PATTERN().

This is the fastest way because you only change one character number in the Sprite's definition.  It assumes you have the characters pre-defined with CALL CHAR().

Thx... and I love this... growing of the program. I am going to make a new revolution to the program :p have to test and try...

  • Like 1
Link to comment
Share on other sites

OK, need help with my "Revolution"... I am trying to understand all the sprite stuff... CALL PATTERN I think I understand... But still cant get it to work.

"Revolution" - adding bubbles!

I made 3 bobbles that I want to animate as ONE bubble as it rices to the top. Continually animating the hole way, from start to the end(top). I want maybe 3-5 bubbles rise up, at different times and different places at the bottom. Tried for some hours to get it to work. Do I need to put a IF  not at top THEN don't stop rise? Copied the start and put out 3 bobbles, but was scraped as I understood that it would not work. Trying to get the anim to work... no go! Tried to use "Birds of Night" to understand some of this stuff. I learned MORE, but stuck :p

Will put in "Birds of Night" under... Also a program that can be played with and made more cool.

Any way... here is my last non working code with everything...

PS! How do you hide the programming text?
PS!! How do you re-number the program outside of the TI?
PS!!! If anyone else want to add to the Aquarium, would be cool to make a "Demo" that many people has added different stuff to it.
PS!!!! Could you Brian Fox make the sudden change in speed not be so great? I do not get that part of your code, so I don't want o mess with it. But I think that slow it a little, would look better.

 

100 ! Aquarium IV  Brian Fox 2020
110 ! Angel fish by Oddemann
115 ! Bobbls by Oddemann with MUCH help from ????
116 ! NOW with STONES
120 ! REQUIRES EXTENDED BASIC
130 CALL SCREEN(2)
140 CALL CLEAR
150 FOR I=1 TO 14 :: CALL COLOR(I,15,1):: NEXT I
160 PRINT "TI AQUARIUM IV": : : :
170 PRINT "This program allows you to"
180 PRINT "use your TI-99 to enjoy the"
190 PRINT "relaxing sight of fish"
200 PRINT "swimming by, without the"
210 PRINT "expense and bother of a"
220 PRINT "real aquarium."
230 PRINT : :"To end the program"
240 PRINT " press FCTN BREAK"
250 PRINT
260 FOR X=1 TO 600::NEXT X
270 CALL CLEAR
280 RANDOMIZE
290 A$="0000000043476F7F7F6F474300000000004020F0F8DCB6BFBFDEFCF820400000"
300 B$="0000010003272F3F3F2F270300010000000000F0F8DCB6BFBFDEFCF8F0000000"
310 C$="000C060383C3EF7F7F7FCFC786868E0C0000000080E0F8FCFEFAFEF8F0800000"
320 D$="0000060343416F3F3F3F4F47424202040000000080E0F8FCFEFAFEF8F0800000"
330 E$="000402030381C77F7F7FCFC78387860C0000000080E0F8FCFEFAFEF8F0800000"
331 F$="0E718E7000000000000000000000000000000000000000000000000000000000"
332 G$="708E710E00000000000000000000000000000000000000000000000000000000"
333 H$="7E817E0000000000000000000000000000000000000000000000000000000000"
334 I$="00000000000000081D3F3F7F7FFFFFFF000000000040E0F0FCFCFCFEFEFFFFFF"
340 CALL CHAR(104,A$)! Tuna 1
350 CALL CHAR(112,B$)! Tuna 2
360 CALL CHAR(120,C$)! Angel fish1
370 CALL CHAR(128,D$)! Angel fish2
380 CALL CHAR(136,E$)! Angel fish3

381 CALL CHAR(33,F$)! Boble 1
382 CALL CHAR(37,G$)! Boble 2
383 CALL CHAR(41,H$)! Boble 3

384 CALL CHAR(140,I$)! Stone

390 CALL MAGNIFY(3)

! CALL SPRITE(#sprite number,character value,sprite color,dotrow,dot-column,rowvelocity,column velocity,...)
! CALL MOTION(#sprite number, row velocity, column velocity,...)
! CALL PATTERN(#sprite number,character code)

391 !
392 ! Put 3 stones on the screen,
393 ! Sprites 14..16
394 FOR STONE=14 TO 16
395 PLACE=INT(RND*100) :: DISPLAY AT(1,1):PLACE! HMMM, Why dos the RND not work???
396 CALL SPRITE(#STONE,140,16,204,PLACE,0,0)
397 ! CALL COLOR(#STONE,15)
398 CALL SOUND(1000,-6,30)
399 NEXT STONE

410 !
420 ! Put 5 tuna fish on the screen,
430 ! Sprites 1..5
440 !
450 FOR TUNA=1 TO 5
460 CALL SPRITE(#TUNA,104,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
470 CALL COLOR(#TUNA,TUNA+2)
480 CALL SOUND(1000,-6,30)
490 NEXT TUNA
500 ! Put 5 GOLD fish on the screen,
510 ! Sprites 6..10
520 !
530 FOR GOLD=6 TO 10
540 CALL SPRITE(#GOLD,120,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
550 CALL COLOR(#GOLD,GOLD+2)
560 CALL SOUND(1000,-6,30)
570 NEXT GOLD
580 !
590 ! make random Goldfish Swim
600 !
610 GOLD=RND*4+6
620 XVEC=8*RND-4 :: YVEC=RND*3+5
630 FOR X=1 TO 10
640 CALL PATTERN(#GOLD,136)!  pattern 3
650 CALL SOUND(200,-6,30)
660 CALL PATTERN(#GOLD,128)
670 CALL MOTION(#GOLD,XVEC,YVEC)
680 CALL SOUND(200,-6,30)
690 CALL PATTERN(#GOLD,120)
700 NEXT X
710 CALL MOTION(#GOLD,XVEC/2,1)
720 !
730 ! make a random Tuna swim
740 !
750 TUNA=RND*4+1
760 FOR X=1 TO 12
770 CALL PATTERN(#TUNA,112)!  wiggle
780 CALL MOTION(#TUNA,30*RND-15,X*(RND*6))
790 CALL SOUND(50,-6,30)! DELAY
800 CALL PATTERN(#TUNA,104)
810 NEXT X
820 CALL MOTION(#TUNA,2*RND-1,RND*3-1)



831 !
832 ! make a random Boble rise
833 !
834 FOR BOB=11 TO 13 :: CALL SPRITE(#BOB,33,16,240,INT(RND*150),-3,0) :: NEXT BOB
835 FOR ANIM=33 TO 41 STEP 4
836 CALL PATTERN(#BOB,ANIM)!  wiggle
837 CALL MOTION(#BOB,-9,0)
838 CALL SOUND(50,-6,30)! DELAY
839 CALL PATTERN(#BOB,41)
840 NEXT ANIM
841 CALL MOTION(#BOB,-9,0)
842 GOTO 610

1000 END

 

Edited by oddemann
Aha... I see a BUG! BUT not all BUGS!!!
  • Like 1
Link to comment
Share on other sites

780 CALL MOTION(#TUNA,30*RND-15,X*(RND*6))

I am not at my programming computer but here are some things for you to work on for your study.


PS! How do you hide the programming text?

- Not sure which text you mean exactly. General idea: 

  - Use CALL COLOR() to make all the text characters transparent

  - Write the text to the screen

  - then change all the text characters to white.

OR remove those lines from the program?


PS!! How do you re-number the program outside of the TI?

-  Manually is the only way I know. But it is not to tricky with a text editor. (This is the reason that most other languages don't use line numbers :)  )


PS!!! If anyone else want to add to the Aquarium, would be cool to make a "Demo" that many people has added different stuff to it.

-  Yes


PS!!!! Could you Brian Fox make the sudden change in speed not be so great? I do not get that part of your code, so I don't want o mess with it. But I think that slow it a little, would look better.

- I will explain it and then you can make it what you want.

 

Here is where the movement is created for the "tuna" :) 

780 CALL MOTION(#TUNA,30*RND-15,X*(RND*6))

Here is your reference 

! CALL MOTION(#sprite number, row velocity, column velocity,...)

 

So the Tuna motion in up/down direction (ROW) is 30 x RND - 15.  This means you will get a RND number between 0 and 30, but then we subtract 15 so it will be a RND number between -15 and 15.

The Tuna "speed" is  RND*6 which is slow, but we multiply by the loop value X which goes up every time we go around the loop so the TUNA speed could be as high as 6 x the highest loop value (12)=72!

So that is pretty fast. But the next time through the loop the speed might slow down.  This was done to make them look erratic.

 

Try your own numbers now that you see what I did. Remove the X from the equation and it will be much slower or divide X by 2 to reduce the effect.

 

Regarding backgrounds.

 

Use HCHAR() to place your rocks. Sprites are for things that move.  Rocks are normally still. :) 

 

I think the bubbles could be placed better with a column value of RND*200+10. This would put them somewhere in the range of the 10..210 .

 

Make a copy and have fun with it. :) 

 

  • Like 1
Link to comment
Share on other sites

Now with Stones.... BUT, still struggling with the bubbles! Thx about the RND! No I got it. I was thinking it was like you said, @TheBF but I was "blind" for a moment.
Reveal hidden contents - the program lines, you can hide them so that this post is "neat" ;) 

New update...

 

100 ! Aquarium IV  Brian Fox 2020
110 ! Angel fish by Oddemann
115 ! Bobbls by Oddemann with MUCH help from ????
116 ! NOW with STONES (Help from The BF)
120 ! REQUIRES EXTENDED BASIC
130 CALL SCREEN(2)
140 CALL CLEAR
150 FOR I=1 TO 14 :: CALL COLOR(I,15,1):: NEXT I
160 PRINT "TI AQUARIUM IV": : : :
170 PRINT "This program allows you to"
180 PRINT "use your TI-99 to enjoy the"
190 PRINT "relaxing sight of fish"
200 PRINT "swimming by, without the"
210 PRINT "expense and bother of a"
220 PRINT "real aquarium."
230 PRINT : :"To end the program"
240 PRINT " press FCTN BREAK"
250 PRINT
260 FOR X=1 TO 600::NEXT X
270 CALL CLEAR
280 RANDOMIZE
290 A$="0000000043476F7F7F6F474300000000004020F0F8DCB6BFBFDEFCF820400000"
300 B$="0000010003272F3F3F2F270300010000000000F0F8DCB6BFBFDEFCF8F0000000"
310 C$="000C060383C3EF7F7F7FCFC786868E0C0000000080E0F8FCFEFAFEF8F0800000"
320 D$="0000060343416F3F3F3F4F47424202040000000080E0F8FCFEFAFEF8F0800000"
330 E$="000402030381C77F7F7FCFC78387860C0000000080E0F8FCFEFAFEF8F0800000"
331 F$="0E718E7000000000000000000000000000000000000000000000000000000000"
332 G$="708E710E00000000000000000000000000000000000000000000000000000000"
333 H$="7E817E0000000000000000000000000000000000000000000000000000000000"
334 I$="00000000000000081D3F3F7F7FFFFFFF000000000040E0F0FCFCFCFEFEFFFFFF"
340 CALL CHAR(104,A$)! Tuna 1
350 CALL CHAR(112,B$)! Tuna 2
360 CALL CHAR(120,C$)! Angel fish1
370 CALL CHAR(128,D$)! Angel fish2
380 CALL CHAR(136,E$)! Angel fish3

381 CALL CHAR(33,F$)! Boble 1
382 CALL CHAR(37,G$)! Boble 2
383 CALL CHAR(41,H$)! Boble 3

384 CALL CHAR(140,I$)! Stone

390 CALL MAGNIFY(3)

! CALL SPRITE(#sprite number,character value,sprite color,dotrow,dot-column,rowvelocity,column velocity,...)
! CALL MOTION(#sprite number, row velocity, column velocity,...)
! CALL PATTERN(#sprite number,character code)

391 !
392 ! Put 3 stones on the screen,
393 ! STONE 1..5
394 FOR STONE=1 TO 5
395 PLACE=INT(RND*30+1)
396 CALL HCHAR(23,PLACE,140,1) :: CALL HCHAR(23,PLACE+1,142,1) :: CALL HCHAR(24,PLACE,141,1) :: CALL HCHAR(24,PLACE+1,143,1)
397 ! CALL COLOR(#STONE,15)
398 CALL SOUND(1000,-6,30)
399 NEXT STONE

410 !
420 ! Put 5 tuna fish on the screen,
430 ! Sprites 1..5
440 !
450 FOR TUNA=1 TO 5
460 CALL SPRITE(#TUNA,104,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
470 CALL COLOR(#TUNA,TUNA+2)
480 CALL SOUND(1000,-6,30)
490 NEXT TUNA
500 ! Put 5 GOLD fish on the screen,
510 ! Sprites 6..10
520 !
530 FOR GOLD=6 TO 10
540 CALL SPRITE(#GOLD,120,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
550 CALL COLOR(#GOLD,GOLD+2)
560 CALL SOUND(1000,-6,30)
570 NEXT GOLD
580 !
590 ! make random Goldfish Swim
600 !
610 GOLD=RND*4+6
620 XVEC=8*RND-4 :: YVEC=RND*3+5
630 FOR X=1 TO 10
640 CALL PATTERN(#GOLD,136)!  pattern 3
650 CALL SOUND(200,-6,30)
660 CALL PATTERN(#GOLD,128)
670 CALL MOTION(#GOLD,XVEC,YVEC)
680 CALL SOUND(200,-6,30)
690 CALL PATTERN(#GOLD,120)
700 NEXT X
710 CALL MOTION(#GOLD,XVEC/2,1)
720 !
730 ! make a random Tuna swim
740 !
750 TUNA=RND*4+1
760 FOR X=1 TO 12
770 CALL PATTERN(#TUNA,112)!  wiggle
780 CALL MOTION(#TUNA,30*RND-15,X*(RND*2))
790 CALL SOUND(50,-6,30)! DELAY
800 CALL PATTERN(#TUNA,104)
810 NEXT X
820 CALL MOTION(#TUNA,2*RND-1,RND*3-1)



831 !
832 ! make a random Boble rise
833 !
834 FOR BOB=11 TO 13 :: CALL SPRITE(#BOB,22+BOB,16,240,RND*200+10,-9,0) :: NEXT BOB
835 FOR ANIM=33 TO 41 STEP 4
836 CALL PATTERN(#BOB,ANIM)!  wiggle
837 CALL MOTION(#BOB,-9,0)
838 CALL SOUND(50,-6,30)! DELAY
839 CALL PATTERN(#BOB,41)
840 NEXT ANIM
841 CALL MOTION(#BOB,-9,0)
842 GOTO 610

1000 END

 

Edited by oddemann
Link to comment
Share on other sites

Here is one way to do bubbles. :) 

 

There is a sub-routine to create them and another to destroy them. 

 

Spoiler


100 ! Aquarium IV  Brian Fox 2020
110 ! Angel fish by Oddemann
115 ! Bobbls by Oddemann with MUCH help from ????
116 ! NOW with STONES (Help from The BF)
120 ! REQUIRES EXTENDED BASIC
130 CALL SCREEN(2)
140 CALL CLEAR
150 FOR I=1 TO 14 :: CALL COLOR(I,15,1):: NEXT I
160 PRINT "TI AQUARIUM IV": : : :
170 PRINT "This program allows you to"
180 PRINT "use your TI-99 to enjoy the"
190 PRINT "relaxing sight of fish"
200 PRINT "swimming by, without the"
210 PRINT "expense and bother of a"
220 PRINT "real aquarium."
230 PRINT : :"To end the program"
240 PRINT " press FCTN BREAK"
250 PRINT
260 FOR X=1 TO 600 :: NEXT X
270 CALL CLEAR
280 RANDOMIZE
290 A$="0000000043476F7F7F6F474300000000004020F0F8DCB6BFBFDEFCF820400000"
300 B$="0000010003272F3F3F2F270300010000000000F0F8DCB6BFBFDEFCF8F0000000"
310 C$="000C060383C3EF7F7F7FCFC786868E0C0000000080E0F8FCFEFAFEF8F0800000"
320 D$="0000060343416F3F3F3F4F47424202040000000080E0F8FCFEFAFEF8F0800000"
330 E$="000402030381C77F7F7FCFC78387860C0000000080E0F8FCFEFAFEF8F0800000"
331 F$="0E718E7000000000000000000000000000000000000000000000000000000000"
332 G$="708E710E00000000000000000000000000000000000000000000000000000000"
333 H$="001C2E3E3E1C0000000000000000000000000000000000000000000000000000"
334 I$="00000000000000081D3F3F7F7FFFFFFF000000000040E0F0FCFCFCFEFEFFFFFF"
340 CALL CHAR(104,A$)! Tuna 1
350 CALL CHAR(112,B$)! Tuna 2
360 CALL CHAR(120,C$)! Angel fish1
370 CALL CHAR(128,D$)! Angel fish2
380 CALL CHAR(136,E$)! Angel fish3
381 CALL CHAR(33,F$)! Boble 1
382 CALL CHAR(37,G$)! Boble 2
383 CALL CHAR(41,H$)! Boble 3
384 CALL CHAR(140,I$)! Stone
390 CALL MAGNIFY(3)
391 !
392 ! Put 3 stones on the screen,
393 ! STONE 1..5
394 FOR STONE=1 TO 5
395 PLACE=INT(RND*30+1)
396 CALL HCHAR(23,PLACE,140,1):: CALL HCHAR(23,PLACE+1,142,1):: CALL HCHAR(24,PLACE,141,1):: CALL HCHAR(24,PLACE+1,143,1)
397 ! CALL COLOR(#STONE,15)
398 CALL SOUND(1000,-6,30)
399 NEXT STONE
410 !
420 ! Put 5 tuna fish on the screen,
430 ! Sprites 1..5
440 GOSUB 930
450 FOR TUNA=1 TO 5
460 CALL SPRITE(#TUNA,104,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
470 CALL COLOR(#TUNA,TUNA+2)
480 CALL SOUND(1000,-6,30)
490 NEXT TUNA
500 ! Put 5 GOLD fish on the screen,
510 ! Sprites 6..10
520 GOSUB 1000
530 FOR GOLD=6 TO 10
540 CALL SPRITE(#GOLD,120,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
550 CALL COLOR(#GOLD,GOLD+2)
560 CALL SOUND(1000,-6,30)
570 NEXT GOLD
580 !
590 ! make random Goldfish Swim
600 GOSUB 930
610 GOLD=RND*4+6
620 XVEC=8*RND-4 :: YVEC=RND*3+5
630 FOR X=1 TO 10
640 CALL PATTERN(#GOLD,136)!  pattern 3
650 CALL SOUND(200,-6,30)
660 CALL PATTERN(#GOLD,128)
670 CALL MOTION(#GOLD,XVEC,YVEC)
680 CALL SOUND(200,-6,30)
690 CALL PATTERN(#GOLD,120)
700 NEXT X
710 CALL MOTION(#GOLD,XVEC/2,1)
720 GOSUB 1000
730 ! make a random Tuna swim
740 !
750 TUNA=RND*4+1
760 FOR X=1 TO 12
770 CALL PATTERN(#TUNA,112)!  wiggle
780 CALL MOTION(#TUNA,30*RND-15,X*(RND*2))
790 CALL SOUND(50,-6,30)! DELAY
800 CALL PATTERN(#TUNA,104)
810 NEXT X
820 CALL MOTION(#TUNA,2*RND-1,RND*3-1)
840 GOTO 600

900 ! SUB-ROUTINE
910 ! make a random Boble rise
920 !
930 FOR BOB=11 TO 16
940 CALL SPRITE(#BOB,41,16,196,190,-9,RND*3-1)
950 CALL SOUND(INT(RND*100+200),110,30)
960 NEXT BOB
999 RETURN

1000 FOR BOB=11 TO 16 ! destroy bubbles
1010 CALL DELSPRITE(#BOB)
1020 NEXT BOB
1999 RETURN

 

 

Link to comment
Share on other sites

9 hours ago, TheBF said:

Here is one way to do bubbles. :) 

 

There is a sub-routine to create them and another to destroy them. 

 

 

Cool!!! GOSUB and RETURN now involved ;) Please set in your name on your ver. of it. For later it will be nice to see the changes and who put them into the program.

I hope that this program can evolve into something totally new and better. Also (at least for me) a way to share and learn ways to program.

I know from having seen other things... I can put an eye on the fish and make it blink. Can we put sea weed that is waving? We can make it so that at times "someone" is feeding the fish. Can we then make the fish eat to food? For a totally wacky strange thing... suddenly Jaws music and a shark comes and eat all the fish and then it all start over? Your imagination is the limitation. Also... it is a brain-storming and maybe you get inspired to make THE Game ;)

I hope over time, this program can change and evolve. Would be fun to see what we can make and inspire each other to make. (I don't have that much to contribute in ways of programming... BUT I will for sure not let that stop me ;), I am learning and it makes me happy )

I see that many people are making stuff on there own, this can be a nice way to learn, share and grow a program.

And MAYBE one day, it will get its OWN cart?

The USSD Aquarium! (Ultimate Supreme Super Duper)
Made by... MANY?

Link to comment
Share on other sites

OK... My last attempt... Building on TheBF... I put in IF THEN... BUT... since I am this Genius programming marvel... I don't get it to work... :p hehehe

Again... your hiding you program line in the post... how do you do that???? (Reveal hidden contents)

PS! The one that can make the bobbles animate all the way up... will make a major leap in the evolution of this program... is it YOU that will clam that title?

 

Spoiler

100 ! Aquarium V  TheBF 2020
110 ! Angel fish by Oddemann
115 ! Bobbls by Oddemann with MUCH help from ????
116 ! NOW with STONES (Help from TheBF)
120 ! REQUIRES EXTENDED BASIC
130 CALL SCREEN(2)
140 CALL CLEAR
150 FOR I=1 TO 14 :: CALL COLOR(I,15,1):: NEXT I
160 PRINT "TI AQUARIUM V": : : :
170 PRINT "This program allows you to"
180 PRINT "use your TI-99 to enjoy the"
190 PRINT "relaxing sight of fish"
200 PRINT "swimming by, without the"
210 PRINT "expense and bother of a"
220 PRINT "real aquarium."
230 PRINT : :"To end the program"
240 PRINT " press FCTN BREAK"
250 PRINT
251 ! YOUR NAME!!! Added stuff? Add your name here, please!
252 ! oddemann-Odd Kristensen, 
260 FOR X=1 TO 600 :: NEXT X
270 CALL CLEAR
280 RANDOMIZE
290 A$="0000000043476F7F7F6F474300000000004020F0F8DCB6BFBFDEFCF820400000"
300 B$="0000010003272F3F3F2F270300010000000000F0F8DCB6BFBFDEFCF8F0000000"
310 C$="000C060383C3EF7F7F7FCFC786868E0C0000000080E0F8FCFEFAFEF8F0800000"
320 D$="0000060343416F3F3F3F4F47424202040000000080E0F8FCFEFAFEF8F0800000"
330 E$="000402030381C77F7F7FCFC78387860C0000000080E0F8FCFEFAFEF8F0800000"
331 F$="0E718E7000000000000000000000000000000000000000000000000000000000"
332 G$="708E710E00000000000000000000000000000000000000000000000000000000"
333 H$="7E817E0000000000000000000000000000000000000000000000000000000000"
334 I$="00000000000000081D3F3F7F7FFFFFFF000000000040E0F0FCFCFCFEFEFFFFFF"
340 CALL CHAR(104,A$)! Tuna 1
350 CALL CHAR(112,B$)! Tuna 2
360 CALL CHAR(120,C$)! Angel fish1
370 CALL CHAR(128,D$)! Angel fish2
380 CALL CHAR(136,E$)! Angel fish3
381 CALL CHAR(33,F$)! Boble 1
382 CALL CHAR(37,G$)! Boble 2
383 CALL CHAR(41,H$)! Boble 3
384 CALL CHAR(140,I$)! Stone
390 CALL MAGNIFY(3)
391 !
392 ! Put 3 stones on the screen,
393 ! STONE 1..5
394 FOR STONE=1 TO 5
395 PLACE=INT(RND*30+1)
396 CALL HCHAR(23,PLACE,140,1):: CALL HCHAR(23,PLACE+1,142,1):: CALL HCHAR(24,PLACE,141,1):: CALL HCHAR(24,PLACE+1,143,1)
397 ! CALL COLOR(#STONE,15)
398 CALL SOUND(1000,-6,30)
399 NEXT STONE
410 !
420 ! Put 5 tuna fish on the screen,
430 ! Sprites 1..5
440 GOSUB 930
450 FOR TUNA=1 TO 5
460 CALL SPRITE(#TUNA,104,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
470 CALL COLOR(#TUNA,TUNA+2)
480 CALL SOUND(1000,-6,30)
490 NEXT TUNA
500 ! Put 5 GOLD fish on the screen,
510 ! Sprites 6..10
520 GOSUB 1000
530 FOR GOLD=6 TO 10
540 CALL SPRITE(#GOLD,120,1,90+30*(RND-0.5),1,4*RND-3,5*RND+1)
550 CALL COLOR(#GOLD,GOLD+2)
560 CALL SOUND(1000,-6,30)
570 NEXT GOLD
580 !
590 ! make random Goldfish Swim
600 GOSUB 930
610 GOLD=RND*4+6
620 XVEC=8*RND-4 :: YVEC=RND*3+5
630 FOR X=1 TO 10
640 CALL PATTERN(#GOLD,136)!  pattern 3
650 CALL SOUND(200,-6,30)
660 CALL PATTERN(#GOLD,128)
670 CALL MOTION(#GOLD,XVEC,YVEC)
680 CALL SOUND(200,-6,30)
690 CALL PATTERN(#GOLD,120)
700 NEXT X
710 CALL MOTION(#GOLD,XVEC/2,1)
720 GOSUB 1000
730 ! make a random Tuna swim
740 !
750 TUNA=RND*4+1
760 FOR X=1 TO 12
770 CALL PATTERN(#TUNA,112)!  wiggle
780 CALL MOTION(#TUNA,30*RND-15,X*(RND*4))
790 CALL SOUND(50,-6,30)! DELAY
800 CALL PATTERN(#TUNA,104)
810 NEXT X
820 CALL MOTION(#TUNA,2*RND-1,RND*3-1)
840 GOTO 600

900 ! SUB-ROUTINE
910 ! make a random Boble rise
920 !
930 FOR BOB=11 TO 16
935 FOR ANIM=33 to 41 STEP 4
! Trying to make the BOB animate... But, happens only in the beginnig
! How to make it happen all the way up?
! One static BOB is WAY to easy... :p hehehe
940 CALL SPRITE(#BOB,ANIM,16,196,190,-9,RND*3-1)
945 NEXT ANIM
950 CALL SOUND(INT(RND*100+200),110,30)
! Why did you do this=INT(RND*100+200)??? Trying to learn!
960 NEXT BOB
999 RETURN

1000 FOR BOB=11 TO 16 ! destroy bubbles
1005 CALL POSITION(#BOB,ROW,COL)
! Trying to delete the BOB when it comes to the top, but... It looks like it dos not delete. Why???
1010 IF ROW=1 THEN CALL DELSPRITE(#BOB)
1020 NEXT BOB
1999 RETURN

 

 

Edited by oddemann
Link to comment
Share on other sites

I have not done much XBASIC programming for decades. It's an interesting challenge given the slow speed. 

I have so many other things I want to try on my project that I probably can't contribute to a large scale program.

But you have a framework here to continue. :) I am thinking you are an artist of some kind. You have lots of good ideas.

There are many far better XBASIC experts than me here, so help is never far away.

 

 

Link to comment
Share on other sites

3 minutes ago, TheBF said:

I have not done much XBASIC programming for decades. It's an interesting challenge given the slow speed. 

I have so many other things I want to try on my project that I probably can't contribute to a large scale program.

But you have a framework here to continue. :) I am thinking you are an artist of some kind. You have lots of good ideas.

There are many far better XBASIC experts than me here, so help is never far away.

 

 

Sure... BUT... you have made a imprint on the program. I am for SURE not good at programming. BUT I really value ANY input that will make it grow or put new ideeas into the program.

From my point of view, you have added lots of value ;)

I guess I am more of an artist then a programmer :p hehehehe

Link to comment
Share on other sites

1010 IF COL=1 THEN CALL DELSPRITE(#BOB)

So i will give you questions for your homework.

 

What is COL? A variable.

How is connected to the Sprites?  :)  (maybe not)

 

We need some way to get the "LOCATION" of a sprite.

 

Lookup CALL LOCATE and CALL POSITION and see what you can do.

 

Link to comment
Share on other sites

1 minute ago, TheBF said:

1010 IF COL=1 THEN CALL DELSPRITE(#BOB)

So i will give you questions for your homework.

 

What is COL? A variable.

How is connected to the Sprites?  :)  (maybe not)

 

We need some way to get the "LOCATION" of a sprite.

 

Lookup CALL LOCATE and CALL POSITION and see what you can do.

 

I am reading on it...
I am a test first, then read again... test new idea IF not work THEN read more :p hehehehe More a player then a reader :p

My thinking was that CALL POSISTION(#BOB,ROW,COL) will give me the data I am looking for... I tried with ROW first. But nothing happend. Changed to COL. Forgot to change back. Looks like it woks now, I think?

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Is there a way for extended basic to detect if a file exists and how would extended basic handle a file that did not exist?

I've tried the, on warning next, I've tried the on error also and cannot seem to get past an open statement of a file that MAY or MAY NOT exist.

As in, if #1(.f.) go-to ...

Edited by GDMike
Link to comment
Share on other sites

This seems to work as I would expect. 

Not sure but I think you need the ON ERROR statement just before you plan to commit the crime. :) 

 

10 ON ERROR 1000
20 OPEN #1:"DSK1.TESTTHIS"
1000 PRINT "Don't try this at home!"
1010 STOP

 

  • Like 1
Link to comment
Share on other sites

4 hours ago, GDMike said:

I believe I did this and when I did whatever I was doing and ended up back at that on error line a SECOND time, I errored out.

I'll have to try it again..thx

I just consulted my old XB book.  ON ERROR make a sub-routine call.

See page 158. RETURN (ON ERROR)

You can do a RETURN NEXT  or a RETURN {LINE#}  to get to the place you want to be after the error occurs.

 

 

 

  • Like 2
Link to comment
Share on other sites

  • 2 months later...

New program I am testing... BUT... in line 160 I find this, "@=23" the character in the book dos not look anything like @, been trying to figure this one... I think it has to do with printing on paper. So the main question, is the listing correct with @ in it?

Book "entertainment-games-in-ti-basic-and-extended-basic", program: Biorhythm
From here: http://www.hexbus.com/tibooks/

Downloaded the files, then as it did not work, I "fixed" it (downloaded the PDF to look), but could not make out @ character. So I ask you!

 

Spoiler

10 !/////////////
20 !/ BIORHYTHM /
30 !/////////////
40 !
50 !///INITIALIZE///
60 DIM DOM(12) :: ON WARNING NEXT :: CALL INIT :: CALL LOAD(-31878,0)
70 DATA 31,28,31,30,31,30,31,31,30,31,30,31
80 FOR I=1 TO 12 :: READ S :: K=K+S :: DOM(I)=K :: NEXT I
90 CALL CHAR(39,"000000007E",96,"1899FF1818246642",104,"0066E7FFFF7E3C18",112,"1014583FFC1A2808",120,"817E665A5A667E81")
100 CALL COLOR(9,11,1,10,9,1,11,5,1,12,13,1)
110 !///OPENING///
120 CALL CLEAR :: CALL SCREEN(16) :: CALL COLOR(2,9,1)
130 A$=RPT$(" ",7) :: B$=RPT$("*",13) :: C$="*           *" :: PRINT A$;B$:A$;C$:A$;"* BIORHYTHM *":A$;C$:A$;B$: : : : : : : : : : : : : :"NEED INSTRUCTIONS?(Y/N)*";
140 CALL CHARPAT(42,A$) :: B$="000000103810"
150 CALL KEY(0,K,S) :: IF K=78 THEN 320 ELSE IF K<>89 THEN CALL SOUND(100,110,3) :: CALL CHAR(42,B$) :: CALL SOUND(200,110,16) :: CALL CHAR(42,A$) :: CALL SOUND(400,44733,30) :: GOTO 150
160 INPUT "TO PRINTER OR SCREEN?(P/S)":A$ :: IF A$="P" THEN FILE=1 :: @=23 :: OPEN #1:"RS232.DA=8.BA=4800" ELSE IF A$<>"S" THEN 160 ELSE FILE=0 :: @=1
170 !//INSTRUCTIONS//
180 DATA "********* BIORHYTHM ********",,"*THE THEORY OF BIORHYTHM","STATES THAT EVERYONE HAS","THREE CYCLES WHICH START ON"
190 DATA THE DAY OF HIS BIRTH.,,*THESE CYCLES ARE:,-----PHYSICAL CYCLE(23 DAYS),----EMOTIONAL CYCLE(28 DAYS)
200 DATA -INTELLECTUAL CYCLE(33 DAYS),,"*IN THIS PROGRAM,CYCLES SPAN",FROM -1(LOW) TO 1(HIGH).
210 DATA ,"*""HIGH"" DAYS OF A CYCLE ARE",WHEN FIGURES OF THAT CYCLE,"RISE ABOVE THE MIDDLE LINE,","AND ""LOW"" DAYS ARE BELOW IT."
220 DATA,*WHEN ALL 3 OF THE CYCLES,COINCIDE ABOVE THE MIDDLE,"LINE,PERSON IS AT HIS BEST!"
230 CALL CLEAR :: RESTORE 180 :: FOR I=1 TO 23 :: READ A$ :: PRINT #FILE:TAB(@);A$ :: NEXT I :: IF FILE=1 THEN 250 ELSE PRINT "****PRESS ANY KEY";
240 CALL KEY(0,K,S) :: IF S=0 THEN 240
250 CALL CLEAR :: PRINT "*WHEN ASKED FOR THESE KEYS, THEY HAVE THE FOLLOWING":"FUNCTIONS:"
260 PRINT:"-PROCEED: CONTINUE PROGRAM": :"-REDO: BACK TO INPUT SCREEN": :"-": IF IN INPUT, SCREEN WILL":"PRINT TO PRINTER 12 MONTHS"
270 PRINT "    IF IN GRAPH, SCREEN WILL PRINT TO PRINTER BIORHYTHM  GRAPH": :"-BEGIN: ASK FOR DIFFERENT   NAME": :"-BACK: END PROGRAM"
280 PRINT #FILE: :TAB(@);"*AVERAGE OF CYCLES IS THE":TAB(@);"AVERAGE ON DAY LISTED.";CHR$(12)
290 PRINT:"****PRESS ANY KEY";
300 CALL KEY(0,K,S) :: IF S=0 THEN 300 ELSE IF FILE=1 THEN CLOSE #1
310 !///START///
320 CALL CLEAR :: RD,PR=0 :: CALL CHAR(43,"0010101010101")
330 INPUT "WHAT IS YOUR NAME?":N$ :: CALL CLEAR :: PRINT: : :"HELLO ";N$: : : : : : : : : : : :: CALL SAY("HELLO")
340 !//MONTHS//
350 DATA JANUARY,3,FEBRUARY,0,MARCH,3,APRIL,2,MAY,3,JUNE,2,JULY,3,AUGUST,3,SEPTEMBER,2,OCTOBER,3,NOVEMBER,2,DECEMBER,3
360 !//BIRTHDATES//
370 !DATA ODD KRISTENSEN, AUGUST,11,1968
380 !DATA**IN THIS FORM:<NAME,MONTH,DATE,YEAR>. EXAMPLE: JOE BLOW,JANUARY,1,1892,MARY BLOW,APRIL,4,1983 ETC...
390 !DATA**BUT PUT IT BEFORE DATA ZZZ,ZZZ,0,0
400 DATA ZZZ,ZZZ,0,0
410 DISPLAY AT(1,1)ERASE ALL:"*********BIRTHDATE**********": : :"MONTH OF BIRTH:": :"DATE OF BIRTH:": :"YEAR OF BIRTH:"
420 IF RD THEN 450
430 RESTORE 370
440 READ A$,MO$,DA,YR :: IF A$="ZZZ" THEN 460 ELSE IF A$<>N$ THEN 440
450 DISPLAY AT(4,20)BEEP:MO$ :: DISPLAY AT(6,19):DA :: DISPLAY AT(8,19):YR :: GOTO 510
460 CALL SAY("PLEASE+ANSWER THEN PRESS+ENTER") :: ACCEPT AT(4,20)SIZE(-9)BEEP:MO$ :: ACCEPT AT(6,20)SIZE(-2)BEEP:DA :: ACCEPT AT(8,20)SIZE(-4)BEEP:YR
470 IF(DA>0 AND YR>0 AND DA=INT(DA)AND YR=INT(YR))THEN 510
480 CALL SAY("#THAT IS INCORRECT# #TRY AGAIN#") :: GOTO 460
490 IF I=13 THEN B$="WHAT IS A "&MO$&"?" ELSE B$=STR$(DA)&" DAYS IN "&MO$&"?!?"
500 DISPLAY AT(24,1):B$ :: GOTO 460
510 RESTORE 350
520 FOR I=1 TO 12 :: READ A$,BT :: IF A$=MO$ THEN MO=I :: I=14
530 NEXT I :: IF YR/4=INT(YR/4)AND BT=0 THEN BT=1
540 IF I=13 OR DA>BT+28 THEN 490
550 DISPLAY AT(24,1)BEEP:"PRESS PROCEED,REDO OR """
560 CALL KEY(0,K,S) :: IF K=6 THEN 460 ELSE IF K=34 THEN 570 ELSE IF K=12 THEN 600 ELSE 560
570 DISPLAY AT(24,1):"IS PRINTER READY?(Y/N):N" :: ACCEPT AT(24,24)SIZE(-1)VALIDATE("YN"):A$ :: IF A$="N" THEN 550 ELSE DISPLAY AT(24,1):"WHAT YEAR?1983" :: ACCEPT AT(24,11)SIZE(-4)VALIDATE(DIGIT):YR1
580 IF YR1<YR THEN 570
590 DISPLAY AT(24,1):"STARTING MONTH:JANUARY" :: ACCEPT AT(24,16)SIZE(-9)BEEP:MO1$ :: GOTO 690
600 DISPLAY AT(12,1):"*******PROJECTION DAY*******": : :"THE MONTH:": :"THE DATE:": :"THE YEAR:": : : : : :
610 IF K=34 THEN 720 ELSE CALL SAY("PLEASE+ANSWER THEN PRESS+ENTER")
620 DISPLAY AT(19,20):"1983"
630 ACCEPT AT(15,20)SIZE(-9)BEEP:MO1$ :: ACCEPT AT(17,20)SIZE(-2)BEEP:DA1 :: ACCEPT AT(19,20)SIZE(-4)BEEP:YR1
640 IF(DA1>0 AND YR1>0 AND DA1=INT(DA1)AND YR1=INT(YR1)AND YR<=YR1)THEN 740
650 CALL SAY("#THAT IS INCORRECT# #TRY AGAIN#") :: GOTO 630
660 IF I=13 THEN B$="   INVENTED A NEW MONTH?" ELSE B$="ONLY "&STR$(NT+28)&" DAYS IN "&MO1$
670 DISPLAY AT(24,1):B$ :: GOTO 630
680 !///LOOPS FOR 1 YEAR///
690 RESTORE 350
700 FOR I=1 TO 12 :: READ A$,NT :: IF A$=MO1$ THEN MO1=I :: I=14
710 NEXT I :: IF I=13 THEN 590
720 PR=1 :: DA1=15 :: FOR LFY=MO1 TO 12 :: RESTORE 350 :: FOR K=1 TO LFY :: READ MO1$,NT :: NEXT K :: MO1=LFY
730 DISPLAY AT(15,20)BEEP:MO1$ :: DISPLAY AT(17,19):DA1 :: DISPLAY AT(19,19):YR1 :: GOTO 790
740 RESTORE 350
750 FOR I=1 TO 12 :: READ A$,NT :: IF A$=MO1$ THEN MO1=I :: I=14
760 NEXT I :: IF YR1/4=INT(YR1/4)AND NT=0 THEN NT=1
770 IF I=13 OR DA1>NT+28 THEN 660
780 DISPLAY AT(24,1)BEEP:"   PRESS PROCEED OR REDO"
790 CALL KEY(0,K,S) :: IF K=6 THEN 630 ELSE IF K<>12 AND PR=0 THEN 790
800 !//DAYS LIVED//
810 DTB=INT(365.25*YR+DOM(MO-1))+DA
820 DTN=INT(365.25*YR1+DOM(MO1-1))+DA1
830 DL=DTN-DTB
840 !///SINE GRAPH///
850 DISPLAY AT(1,1)ERASE ALL:"*********BIORHYTHM**********": :"NAME: ";N$:"+=";MO1$;" ";STR$(DA1);",";YR1
860 CALL HCHAR(12,2,39,31) :: CALL VCHAR(5,16,43,14)
870 DISPLAY AT(20,1):CHR$(96);"=PHYSICAL CYCLE":CHR$(104);"=EMOTIONAL CYCLE":CHR$(112);"=INTELLECTUAL CYCLE"
880 DISPLAY AT(24,1):"PRESS REDO,BEGIN,",OR BACK"
890 CALL GRAPH(23,DL) :: CALL GRAPH(28,DL) :: CALL GRAPH(33,DL)
900 DISPLAY AT(23,1):"AVERAGE OF CYCLES:";SEG$(STR$((SIN(PI/180*360*DL/23)+SIN(PI/180*360*DL/28)+SIN(PI/180*360*DL/33))/3),1,7)
910 CALL KEY(0,K,S) :: IF K=6 THEN RD=1 :: GOTO 410 ELSE IF K=14 THEN 320 ELSE IF K=15 THEN CALL CLEAR :: STOP ELSE IF K<>34 AND PR=0 THEN 910
920 !///PRINTOUT///
930 @=16 :: GR$=CHR$(27)&"K"&CHR$(8)&CHR$(0) :: B$=CHR$(96)&CHR$(35)&CHR$(38)&CHR$(248)&CHR$(248)&CHR$(38)&CHR$(35)&CHR$(96)!/MAN/
940 C$=CHR$(56)&CHR$(124)&CHR$(126)&CHR$(31)&CHR$(31)&CHR$(126)&CHR$(124)&CHR$(56)!/HEART/
950 D$=CHR$(8)&CHR$(40)&CHR$(26)&CHR$(252)&CHR$(63)&CHR$(88)&CHR$(20)&CHR$(16)!/CROSS/
960 E$=RPT$(CHR$(0),8)!/SPACE/
970 F$=CHR$(0)&RPT$(CHR$(8),6)&CHR$(0)!/DASH/
980 G$=RPT$(CHR$(0),4)&CHR$(255)&RPT$(CHR$(0),3)
990 H$=CHR$(129)&CHR$(126)&CHR$(102)&CHR$(153)&CHR$(153)&CHR$(102)&CHR$(126)&CHR$(129)!/COINC/
1000 OPEN #1:"RS232.DA=8.BA=4800.CR"
1010 PRINT #1:CHR$(14);TAB(16);"BIORHYTHM";CHR$(10);CHR$(10);TAB(@);"NAME: ";N$;CHR$(10);TAB(@);"BIRTHDATE: ";MO$;" ";STR$(DA);",";YR;CHR$(10)
1020 PRINT #1:TAB(@);GR$&G$;CHR$(27);"E";"=";MO1$;" ";STR$(DA1);",";YR1;CHR$(@);CHR$(10);CHR$(27);"F";CHR$(10)
1030 IF DA1<>15 THEN 1060 ELSE A$="1234567890123456789012345678" :: IF MO1=2 AND YR1/4=INT(YR1/4)THEN A$=A$&"9" ELSE A$=A$&SEG$("901",1,NT)
1040 PRINT #1:TAB(@);
1050 FOR I=1 TO LEN(A$) :: PRINT #1:CHR$(27);"K";CHR$(2);CHR$(0);CHR$(0);CHR$(0);SEG$(A$,I,1) :: NEXT I :: PRINT #1:CHR$(10)
1060 FOR I=5 TO 18 :: A$="" :: FOR K=2 TO 32 :: CALL GCHAR(I,K,S) :: IF S=39 THEN A$=A$&F$ ELSE IF S=120 THEN A$=A$&H$ ELSE IF S>95 THEN 1080 ELSE IF S=43 THEN A$=A$&G$ ELSE A$=A$&E$
1070 GOTO 1090
1080 IF S=96 THEN A$=A$&B$ ELSE IF S=104 THEN A$=A$&C$ ELSE A$=A$&D$
1090 NEXT K :: PRINT #1:TAB(@);CHR$(27);"K";CHR$(248);CHR$(0);A$;CHR$(10) :: NEXT I
1100 PRINT #1:TAB(@);GR$&B$;"=PHYSICAL CYCLE";CHR$(10);TAB(@);GR$&C$;"=EMOTIONAL CYCLE";CHR$(10);TAB(@);GR$&D$;"=INTELLECTUAL CYCLE";CHR$(10)
1110 PRINT #1:TAB(@);GR$&H$;"=COINCIDENCE";CHR$(10)
1120 PRINT #1:TAB(@);"AVERAGE OF CYCLES:";SEG$(STR$((SIN(PI/180*360*DL/23)+SIN(PI/180*360*DL/28)+SIN(PI/180*360*DL/33))/3),1,7);CHR$(13)
1130 IF PR=1 THEN IF LFY/2=INT(LFY/2)THEN PRINT #1:CHR$(12)ELSE PRINT #1:RPT$(CHR$(10),5)
1140 CLOSE #1 :: IF PR<>1 THEN 910
1150 NEXT LFY :: PR=0 :: GOTO 910
1160 SUB GRAPH(A,B)
1170 FOR Y=2 TO 32 :: X=INT(SIN(PI/180*360*(B+Y-16)/A)*-6)+12
1180 CALL GCHAR(X,Y,C) :: IF C>95 THEN CALL SOUND(100,999,0) :: CALL VCHAR(X,Y,120)ELSE CALL VCHAR(X,Y,(A-23)/5*8+96)
1190 NEXT Y
1200 SUBEND

 

 

  • Like 1
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...