Jump to content
oddemann

HELP - I AM STUCK! - TI EXtended BASIC

Recommended Posts

You can easily paste BASIC listings into a disk image with TIImageTool (and then find the PRG file on the image). This is my way to work around the paste deficiency in MAME.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
55 minutes ago, TheBF said:

Try this for some ideas.  I removed CALL KEY because it slows down the loop.  BREAK is the only way out.

 

 

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)

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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"

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

 

 

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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.

 

 

Share this post


Link to post
Share on other sites

Oh I didn't understand.

 

So to hide your program

1. Press the "eye" on the control bar.  (spoiler)

2. Then press the </>     code button.

3.Put you code in the white window.

4.Press "insert in window"  button

 

 

  • Like 1

Share this post


Link to post
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

Share this post


Link to post
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.

 

Share this post


Link to post
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

Share this post


Link to post
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.

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...