Jump to content

oddemann

Members
  • Content Count

    99
  • Joined

  • Last visited

Community Reputation

37 Excellent

About oddemann

  • Rank
    Star Raider
  • Birthday 08/11/1968

Contact / Social Media

Profile Information

  • Gender
    Male
  • Interests
    TI 99/4A, PC and games, but my main focus is photo and drawing digitally.
  1. That was great help, did a v9t9 and then it worked! Thx,arcadeshoppe!
  2. Some of the games works on C99 and some dos not load???
  3. $540.000, bets $500, 56 spins so fare... 1.000.000, 500, 150 1.500.000, 500, 160 1.600.000, 500, 275 2.140.000, 500, 300 8.950.000, 500, 2675 - Looks like this will go on for ever... 12.500.000 500, 4400 13.041.500, 500, 4430 13.680.000, 500, 4475 14.234.000, 500, 4495 48.454.000, 500, 17025 103.360.000, 500, 37700 109.333.000, 500, 39606 - 40.000 Spins is it! 109.515.000, 500, 40000 - "Game Over" How do I upload a pic. to show off ?
  4. So simpel and so few lines and it is almost a game aready! Same PDF as above DOTS 100 CALL CLEAR :: CALL SCREEN(11):: CALL CHAR(33,"000000006060",96,"AAFFFEDFBEBBBEBFAAFFFE8F8E9B9E9FAAFFDEFFFEF70EFFAAFFDEFFE60706FF") 110 CALL CHAR(100,"BFBEBBBEDFFEFFAA9F9E9B8E8FFEFFAA55FF7BFF7FEF70FF55FF7BFF67E060FF"):: CALL COLOR(1,15,2,2,5,5) 120 CALL HCHAR(24,1,40,64)::CALL VCHAR(1,31,40,96):: P=102 :: CALL SPRITE(#1,P,16,17,17) 130 FOR R=1 TO 50 :: RANDOMIZE :: CALL PEEK(-31808,X,Y) :: CALL HCHAR(INT(X/12)+2,INT(Y/10)+4,33) :: NEXT R :: R,C=3 140 CALL JOYST(1,X,Y):: IF X AND Y THEN 140 ELSE IF X THEN P=100+X/2 :: X=SGN(X) ELSE IF Y THEN P=98+Y/2 :: Y=-SGN(Y) 150 CALL GCHAR(R+Y,X+C,CH) :: IF CH=40 THEN CALL SOUND(-60,110,9) :: GOTO 140 ELSE C=C+X :: R=R+Y 160 CALL PATTERN(#1,P):: CALL LOCATE(#1,R*8-7,C*8-7):: IF CH=33 THEN CALL SOUND(-100,-7,6) :: CALL HCHAR(R,C,32) 170 CALL PATTERN(#1,P+1) :: IF X OR Y THEN CALL SOUND(-90,660,9) :: CALL HCHAR(R-Y,C-X,40) :: GOTO 140 ELSE 140
  5. Sprite fun! EX B. http://aa-ti994a.oratronik.de/smart_programming_guide_for_sprites.pdf 100 CALL CLEAR :: CALL SCREEN(2) :: CALL CHAR(46,"0000001818") :: CALL SPRITE(#2,94,16,180,1,0,5) 110 FOR N=0 TO 25 :: RANDOMIZE :: CALL PEEK(-31808,Y,X):: CALL SPRITE(#3,65+N,16,Y/2+1,X+1):: CALL SOUND(-60,660, 120 CALL POSITION(#3,Y,X,#2,R,C) :: CALL SPRITE(#1,46,16,R,C,(Y-R)*.49,(X-C)*.49) :: CALL SOUND(476,-3,14) 130 CALL SOUND(120,110,6)::CALL DELSPRITE(#1):: CALL PATTERN(#3,35):: CALL SOUND(100,220,6):: NEXT N :: GOTO 110
  6. 100 REM GUNNERY 110 REM COPYRIGHT FREDERICK HOLTZ AND ASSOCIATES 120 REM 5/1/83 130 REM PROGRAM RUNS IN TI- BASIC 140 CALL CLEAR 150 CALL CLEAR 160 PRINT "WELCOME TO THE GAME OF GUN-" 170 PRINT 180 PRINT "NERY. YOU ARE THE GUNNERY" 190 PRINT 200 PRINT "OFFICER AND ARE T0 FIRE ON" 210 PRINT 220 PRINT "A DISTANT TARGET. TO DO" 230 PRINT 240 PRINT "THIS, YOU MUST CONSIDER" 250 PRINT 260 PRINT "THE RANGE AND INPUT THE" 270 PRINT 280 PRINT "PROPER ELEVATION WHICH" 290 PRINT 300 PRINT "IS OFTEN A DECIMAL SUCH AS" 310 PRINT 320 PRINT "65.3 FOR INSTANCE. THE COM-" 330 PRINT 340 PRINT "PUTER WILL TELL YOU WHETHER" 350 PRINT 360 PRINT "YOUR SHOT IS LONG OR SHORT" 370 PRINT 380 PRINT "AND BY HOW MANY METERS." 390 FOR DLAY=1 TO 2000 400 NEXT DLAY 410 CALL CLEAR 420 PRINT "WHEN YOU STRIKE THE TARGET," 430 PRINT 440 PRINT "THE COMPUTER WILL TELL YOU" 450 PRINT 460 PRINT "HOW MANY SHOTS YOU FIRED." 470 PRINT 480 PRINT "GOOD LUCK!!!" 490 PRINT 500 PRINT 510 PRINT 520 PRINT "PRESS (ENTER) TO CONTINUE." 530 INPUT ER$ 540 RANDOMIZE 550 Y=59000-INT(RND*24000)+1 560 CALL CLEAR 570 PRINT "MAXIMUM RANGE IS 60,000" 580 PRINT "METERS. DISTANCE TO TARGET" 590 PRINT "IS";Y;"METERS." 600 PRINT 610 PRINT "ELEVATION" 620 INPUT E 630 CALL SOUND(250,-6,0) 640 NJ=NJ+1 650 IF E<85 THEN 1040 660 IF E>95 THEN 860 670 CALL CLEAR 680 PRINT "YOUR SHOT WENT STRAIGHT UP!" 690 PRINT 700 FOR I=1 TO 10 710 FOR DLAY=1 TO 150 720 NEXT DLAY 730 PRINT TAB(15);"." 740 CALL SOUND(100,1500,0) 750 NEXT I 760 PRINT TAB(13);"BOOM!!" 770 FOR DLAY=1 TO 50 780 NEXT DLAY 790 CALL SOUND(2000,-6,0) 800 CALL SCREEN(1) 810 FOR DLAY=1 TO 100 820 NEXT DLAY 830 CALL SCREEN( 840 CALL CLEAR 850 GOTO 610 860 CALL CLEAR 870 PRINT "THAT SHOULD MAKE YOU A HERO!" 880 PRINT "THAT ROUND MIGHT HIT MARS!" 890 C=1 900 FOR DLAY=1 TO 750 910 NEXT DLAY 920 GOTO 840 930 CALL CLEAR 940 PRINT TAB(3);"NEWS FLASH!!!" 950 PRINT 960 PRINT 970 PRINT "MARS STRUCK" 980 PRINT "BY MYSTERY PROJECTILE!!" 990 PRINT 1000 C=0 1010 RETURN 1020 PRINT "ILLEGAL!!" 1030 GOTO 840 1040 IF C<>1 THEN 1060 1050 GOSUB 930 1060 IF E<1 THEN 1020 1070 E2=2*E/57.2958 1080 J=60000*SIN(E2) 1090 N=Y-J 1100 D=INT(N) 1110 IF ABS(D)< 100 THEN 1140 1120 IF Y-J<0 THEN 1330 1130 IF Y-J > 0 THEN 1350 1140 CALL CLEAR 1150 CALL SOUND(4000,-6,0) 1160 CALL SCREEN(2) 1170 FOR DLAY=1 TO 850 1180 NEXT DLAY 1190 CALL CLEAR 1200 CALL SCREEN( 1210 PRINT "TARGET DESTROYED !!!" 1220 PRINT 1230 PRINT 1240 PRINT 1250 PRINT 1260 PRINT "YOU FIRED";NJ;"ROUNDS!!" 1270 PRINT 1280 PRINT 1290 PRINT 1300 INPUT "PRESS (ENTER) TO CONTINUE":ER$ 1310 NJ=0 1320 GOTO 560 1330 PRINT "SHORT BY";ABS(D);"YARDS" 1340 GOTO 610 1350 PRINT "LONG BY";ABS(D);"YARDS" 1360 GOTO 610
  7. TOWER OF HANOI 10 DIM A(10,5),V(30),W(15) 20 CALL CLEAR 30 CALL SCREEN( 40 PRINT TAB(10); "TOWER OF HANOI" 50 PRINT 60 PRINT 70 PRINT "AIM: MOVE ALL DISCS TO C" 80 PRINT 90 PRINT "RULE 1: ONLY MOVE ONE DISC EACH MOVE" 100 PRINT 110 PRINT "RULE 2: LARGE DISCS MUST NOT SIT ON SMALL DISCS" 120 PRINT 130 PRINT "PRESS ANY KEY TO START" 140 PRINT 150 CALL KEY(3,A1,B) 160 IF B=0 THEN 150 170 CALL CLEAR 180 PRINT 190 PRINT TAB(10); "TOWER OF HANOI" 200 PRINT 210 PRINT "HOW MANY DISCS DO YOU WANT?" 220 PRINT 230 PRINT "CHOOSE A NUMBER BETWEEN 2 AND 5" 240 PRINT 250 PRINT 260 CALL KEY(3,A1,B) 270 IF B=0 THEN 260 280 IF A1>49 THEN 300 290 GOTO 310 300 IF A1<54 THEN 360 310 PRINT 320 PRINT "YOU HAVE TYPED AN INVALID NUMBER" 330 FOR I=1 TO 500 340 NEXT I 350 GOTO 170 360 C=A1-48 370 FOR I=1 TO 21 380 READ V(I) 390 NEXT I 400 DATA 73,78,86,65,76,73,68,32,77,79,86,69 410 DATA 84,82,89,32,65,71,65,73,78 420 FOR I=1 TO 11 430 READ W(1) 440 NEXT I 450 DATA 84,89,80,69,32,65,32,77,79,86,69 460 FOR I=C TO 1 STEP -1 470 READ A(I,1) 480 A(I,2)=0 490 A(I,3)=0 500 NEXT I 510 DATA 1,2,3,4,5 520 H(1)=C 530 H(2)=0 540 H(3)=0 550 CALL CLEAR 560 CALL SCREEN(7) 570 PRINT 580 PRINT TAB(9); "TOWER OF HANOI" 590 PRINT 600 PRINT 610 PRINT "TARGET MOVES ";2^C-1 620 PRINT 630 PRINT "MOVES MADE ";M 640 FOR I=1 TO 17 650 PRINT 660 NEXT I 670 A$="FFFFFFFFFFFFFFFF" 680 B$="0000000000000000" 690 CALL CHAR(40,A$) 700 CALL CHAR(41,B$) 710 CALL CHAR(96,A$) 720 CALL COLOR(9,14,7) 730 CALL HCHAR(19,1,96,32) 740 CALL HCHAR(20,1,96,32) 750 CALL HCHAR(21,1,96,32) 760 CALL HCHAR(22,1,96,32) 770 CALL HCHAR(20,5,65) 780 CALL HCHAR(20,15,66) 790 CALL HCHAR(20,25,67) 800 GOSUB 5000 810 GOSUB 6000 820 IF H(I1)>0 THEN 940 830 FOR I=1 TO 12 840 CALL HCHAR(6,18+I,V(I)) 850 NEXT I 860 FOR I = 13 TO 21 870 CALL HCHAR(8,6+I,V(I)) 880 NEXT I 890 FOR I=1 TO 500 900 NEXT I 910 CALL HCHAR(6,19,41,12) 920 CALL HCHAR(8,19,41,9) 930 GOTO 800 940 IF H(I2)=0 THEN 960 950 IF A(H(I1),I1)>A(H(I2),I2) THEN 830 960 H(I2)=H(I2)+1 970 A(H(I2),I2)=A(H(I1),I1) 980 A(H(I1),I1)=0 990 H(I1)=H(I1)-1 1000 M=M+1 1010 M$=STR$(M) 1020 FOR I=1 TO LEN(M$) 1030 CALL HCHAR(6,14+I,ASC(SEG$(M$,I,1))) 1040 NEXT I 1050 GOSUB 5000 1060 IF H(3)<>C THEN 800 1070 PRINT "CONGRATULATIONS!!!!" 1080 GOTO 1080 5000 CALL COLOR(2,11,7) 5010 FOR P=1 TO 3 5020 FOR I=1 TO C 5030 R1=1+10*(P-1) 5040 R2=5-A(1,P) 5050 R3=2*A(I,P)-1 5060 R4=20-I*2aa 5070 IF A(I,P)=0 THEN 5110 5080 CALL HCHAR(R4,R1+R2,40,R3) 5090 CALL HCHAR(R4-1,R1+R2,40,R3) 5100 GOTO 5130 5110 CALL HCHAR(R4,R1,41,9) 5120 CALL HCHAR(R4-1,R1,41,9) 5130 NEXT I 5140 NEXT P 5150 RETURN 6000 CALL COLOR(5,2,7) 6010 CALL COLOR(6,2,7) 6020 CALL COLOR(7,2,7) 6030 CALL COLOR(8,2,7) 6040 FOR Y=1 TO 11 6050 CALL HCHAR(6,18+Y,W(Y)) 6060 NEXT Y 6070 CALL KEY(3,A1,B) 6080 IF B=0 THEN 6070 6090 FOR Y=1 TO 11 6100 CALL HCHAR(6,18+Y,41) 6110 NEXT Y 6120 CALL KEY(3,A2,B) 6130 IF B=0 THEN 6120 6140 I1=A1-64 6150 I2=A2-64 6160 RETURN
  8. SPEECH WITH PRIMARY STRESS 100 REM STRESS POINT 11 0 CALL CLEAR 120 OPEN #1:"SPEECH",OUTPUT 130 PRINT "SPEECH WITH PRIMARY STRESS" 140 FOR I=1 TO 5 150 READ A$ 160 PRINT :: A$ 170 PRINT #1:A$ 180 NEXT I 190 DATA "HEAR THIS STRESS POINT" 200 DATA "^HEAR THIS STRESS POINT" 210 DATA "HEAR ^THIS STRESS POINT" 220 DATA "HEAR THIS ^STRESS POINT" 230 DATA "HEAR THIS STRESS ^POINT" 240 END
  9. Duck Leader Douglas E. Smith and Douglas W. Smith This is no time to be feather-brained or daffy. There are hunters lurking in the maze of reeds ahead, and ifyou make a wrong turn, you and your friends will be duck soup. Two skill levels, ten difficulty ratings. This game will challenge your skill and memory. Your assignment, as the leader of a squadron of 30 ducks, is to direct them through a series of marsh mazes to the safety of a duck sanctuary. You must swim through five different mazes, each of which has invisible reed patches and hidden hunters. The reeds will send you back to the beginning of the maze. If you find a hunter, you will lose a duck. Save as many ducks as possible for a high score. Lose your squadron and it's all over. Favorite Duck After typing in the program, it's a good idea to list the program, check for errors, and then save a copy to tape or disk before running the program. When you start the game, the title graphics will appear, followed by several questions. 1. LEVEL=?(1=HELP/ 2=NO HELP) Enter 1 until you have gained confidence in your memory and problem-solving ability. With level 1 you may use the H key to quickly view the location of the reeds and hunters in the marsh (up to five times during one game). Level 2 will double your possible score, but you cannot use the H key for help. 2. DIFFICULTY=(1-10) I For your first game, enter 1. After some practice try the other difficulty ratings. Ratings 1-4 are easy, 5-7 are hard, and 8-10 are very challenging. The difficulty rating determines the complexity of the maze. 3. INSTRUCTIONS ? (Y/N) Enter Y to read the instructions before the game begins. This screen briefly describes the game and the functions of the appropriate keys used for the game. It also shows the graphic characters used for the reeds, hunters, and the marsh exit. 4. FIRST NAME OF THE LEAD DUCK? Type in your first name or the name of your favorite duck, and press ENTER. The game will then begin. If you entered Y for instructions, they will appear first. Hit the 1 key to begin play. At first the outline of the marsh appears, and then the positions of the reeds and hunters are indicated. You have 15 seconds to study the locations before the reeds and hunters become invisible. Successful Maneuvers The duck on the left side of the marsh represents your squadron. Move the duck by using the arrow keys (E, S, D, and X). You do not have to press ENTER or use the FCTN key. If you hit the sides of the marsh or the invisible reed, your ducks will bounce back to the starting position, but you do not lose any ducks. Meeting a hunter will result in gunfire and the loss of a duck, with the survivors returning to the start again. The positions of the reeds and hunters do not change until you reach the exit to the next marsh. Your goal is to maneuver your squadron to the right side of the marsh and out the exit to the next marsh. Once you have passed through the five marshes to safety, the program will congratulate you, show you the remaining ducks, and print your score. The highest possible score is 6000 and can be achieved only at level 2 with the difficulty rating 10. Nobody has achieved this score to date. The marsh border color changes to red if the squadron is depleted to ten or fewer ducks. Losing all the squadron will put you in Duck Soup, and give you a zero score. After the score is printed, the program will ask PLAY AGAIN? (Y/N). Enter Y to play again at the last selected level and difficulty. Enter N to choose a different level and difficulty. The Hkey may be used if you selected level 1. Pushing the H key while playing the game will give you a quick look at the marsh. Using this key does not change the position of the duck. You are limited to only five helps per game. Remember the highest score using level 1 will be half that of level 2. On occasion, the program will generate a maze which is impossible to cross. (Ducks don't always have it easy, do they?) Press the N key and you will move to a new marsh. The change in marshes will cost the squadron five ducks, so use the N key only if there is no way out. Some Noteworthy Routines The "Duck Leader" program employs several very useful TI BASIC routines. Creation of the maze is accomplished using the RND function to place the reeds and hunters (lines 620-670). The CALL GCHAR in line 800 tests the randomly determined position for characters already present on the marsh. Line 800 checks to see if an empty space is present and, if not, calls for a new set of coordinates to be generated. The CALL KEY routine (line 890) is used to move the duck through the marsh. Keys 68, 69, 83, and 88 determine the direction of the move. Once again the CALL GCHAR is used to test for an empty space. If found, the duck is printed in that position. If a reed or hunter is found, lines 1250-1260 execute the proper action. Several loops and counters pause the program and keep track of the ducks. Lines 690-720 give you time to view the maze before the characters become invisible. The H key sends the program to lines 1140-1220, making the maze visible. The ducks left are counted in lines 980 and 1310. The number of marshes traversed is counted in line 1380. The score is calculated in line 1550 and the ducks saved in line 1540. Changing the Difficulty You may wish to make the game less difficult by making one or more of the following changes: 1. Set the final value in the FOR-NEXT loop in line 690 to a higher value to increase the length of time you have to view the maze. 2. Increase the final value for Xin the FOR-NEXT loop beginning in line 1170 to give you a longer look when you use the H key. 3. Change the 5 in line 1150 to a greater number to increase the number of times you can use the H key. Duck Leader 120 RANDOMIZE 130 GOSUB 1720 140 CALL COLOR(13,2,1) 150 CALL COLOR(14,5,16) 160 CALL COLOR(11,13,1) 170 CALL COLOR(12,10,1) 180 CALL CLEAR 190 CALL SCREEN(12) 200 FOR X=1 TO 19 210 PRINT " DUCK LEADER DUCK LEADER" 220 NEXT X 230 PRINT 240 GOSUB 330 250 GOSUB 1420 260 INPUT "LEVEL=?(1=HELP/2=NO HELP)":LEVEL 270 INPUT "DIFFICULTY=?(1-10)":DIF 280 IF (DIF<1)+(DIF>10)THEN 270 290 INPUT "INSTRUCTIONS?(Y/N)":INS$ 300 INPUT "FIRST NAME OF LEAD DUCK?":NAME$ 310 IF INS$="Y" THEN 420 320 GOTO 520 330 FOR Y=12 TO 14 STEP 2 340 FOR X=1 TO 32 350 CALL HCHAR(Y,X,129) 360 CALL SOUND(25,-5,15) 370 CALL HCHAR(Y,X,128) 380 CALL HCHAR(Y,X,32) 390 NEXT X 400 NEXT Y 410 RETURN 420 CALL CLEAR 430 PRINT NAME$:: 440 PRINT "YOU ARE THE LEADER OF A": :"SQUADRON OF THIRTY DUCKS.": :"PADDLE THROUGH FIVE MARSHES": : 450 PRINT "TO SAFETY!!": :"USE ARROW KEYS TO MOVE": :"H-KEY FOR HELP(ONLY FIVE)": :"N-KEY=NEW MARSH(-5 DUCKS)": : 460 PRINT "WATCH OUT FOR REEDS..": :"AND HUNTERS!!": :"REEDS":"HUNTERS":"EXIT" 470 CALL HCHAR(21,12,112) 480 CALL HCHAR(22,12,113) 490 CALL HCHAR(23,12,137) 500 INPUT "ENTER 1 TO START":SRT 510 GOTO 520 520 REM MARSH 530 CALL SCREEN(15) 540 CALL CLEAR 550 PRINT TAB(10);"MARSH #";MARSH+1 560 CALL HCHAR(2,3,136,28) 570 CALL HCHAR(22,3,136,28) 580 CALL VCHAR(2,3,136,20) 590 CALL VCHAR(2,30,136,20) 600 CALL VCHAR(6,7,136,12) 610 CALL VCHAR(9,30,137,7) 620 FOR X=1 TO (DIF*5) 630 GOSUB 750 640 CALL HCHAR(ROW,COL,112) 650 GOSUB 750 660 CALL HCHAR(ROW,COL,113) 670 NEXT X 680 CALL HCHAR(12,5,128) 690 FOR X=1 TO 50 700 CALL COLOR(13,9,1) 710 CALL COLOR(13,2,1) 720 NEXT X 730 CALL SCREEN(13) 740 GOTO 830 750 REM RAN ROW+COL 760 ROW=INT(22*RND) 770 IF ROW<3 THEN 760 780 COL=INT(30*RND) 790 IF COL<4 THEN 780 800 CALL GCHAR(ROW,COL,GRC) 810 IF GRC<>32 THEN 760 820 RETURN 830 REM MOVE DUCK 840 R=12 850 C=5 860 CALL HCHAR(R,C,129) 870 CALL SOUND(25,-5,15) 880 CALL HCHAR(R,C,128) 890 CALL KEY(0,KEY,ST) 900 IF (KEY=68)+(KEY=69)+(KEY=72)+(KEY=78)+(KEY=83)+(KEY=88) THEN 910 ELSE 890 910 IF KEY=72 THEN 1140 920 IF KEY=78 THEN 980 930 CALL HCHAR(R,C,32) 940 IF KEY=68 THEN 1060 950 IF KEY=69 THEN 1080 960 IF KEY=83 THEN 1100 970 IF KEY=88 THEN 1120 980 DL=DL+5 990 IF DL>19 THEN 1000 ELSE 1040 1000 CALL COLOR(14,5,9) 1010 IF DL>=30 THEN 1020 ELSE 1040 1020 DL= 30 1030 GOTO 1470 1040 CALL SOUND(100,500,0) 1050 GOTO 520 1060 C=C+1 1070 GOTO 1230 1080 R=R-1 1090 GOTO 1230 1100 C=C-1 1110 GOTO 1230 1120 R=R+1 1130 GOTO 1230 1140 IF LEVEL<>1 THEN 890 1150 IF HELP=5 THEN 1210 1160 CALL SCREEN(15) 1170 FOR X=1 TO 50 1180 NEXT X 1190 HELP=HELP+1 1200 CALL SCREEN(13) 1210 CALL SOUND(5,1000,1) 1220 GOTO 890 1230 CALL GCHAR(R,C,GR) 1240 IF GR=32 THEN 860 1250 IF (GR=136)+(GR=112) THEN 1350 1260 IF GR=113 THEN 1280 1270 IF GR=137 THEN 1370 1280 CALL HCHAR(R,C,120) 1290 CALL SOUND(1,200,1) 1300 CALL HCHAR(R,C,113) 1310 DL=DL+1 1320 IF DL=20 THEN 1330 ELSE 1340 1330 CALL COLOR(14,5,9) 1340 IF DL=30 THEN 1470 ELSE 840 1350 CALL SOUND(50,-1,10) 1360 GOTO 840 1370 REM NEW MARSH 1380 MARSH=MARSH+1 1390 IF MARSH=5 THEN 1470 1400 GOSUB 1420 1410 GOTO 520 1420 FOR SC=4 TO 16 1430 CALL SCREEN(SC) 1440 CALL SOUND(1,3000,1) 1450 NEXT SC 1460 RETURN 1470 REM END OF GAME 1480 CALL CLEAR 1490 CN=INT( (28-LEN(NAME$))/2) 1500 PRINT TAB(CN);NAME$:: 1510 IF DL=30 THEN 1640 1520 GOSUB 1420 1530 GOSUB 1420 1540 DS=30-DL 1550 SCORE=LEVEL*DIF*DS*10 1560 PRINT "CONGRATULATIONS YOU SAVED ": :TAB(10):DS;"DUCKS!": :TAB(5);"F0R A SCOREOF ";SCORE 1570 FOR X=1 TO 12 1580 PRINT 1590 NEXT X 1600 CL=INT( (32-DS)/2) 1610 CALL HCHAR(6,CL,128,DS) 1620 GOSUB 330 1630 GOTO 1660 1640 REM DUCK SOUP 1650 PRINT "OH NO!! YOU'RE DUCK SOUP": :TAB (11)5"SCORE=0": : 1660 INPUT "PLAY AGAIN?(Y/N)":PLAY$ 1670 DL=0 1680 HELP=0 1690 MARSH=0 1700 CALL COLOR(14,5,16) 1710 IF PLAY$="Y" THEN 520 ELSE 1810 1720 REM CALL CHAR 1730 CALL CHAR(128,"00040B04FE7C8800") 1740 CALL CHAR(129,"00081608FE7C4400") 1750 CALL CHAR(136,"00AAAAAAAAAAAAAA") 1760 CALL CHAR(137,"00080C7E0C080000") 1770 CALL CHAR(112,"00AAAAAAAAAAAAAA") 1780 CALL CHAR(113,"0000609090677C64") 1790 CALL CHAR(120,"8142241818244281") 1800 RETURN 1810 END
  10. Worm of Bemer - COOL! Same PDF as above! Stephen D. Fultz TI Translation by Patrick Parrish Nerm the worm is lost in Bemer Castle and needs your help to get home. You must guide him through 11 rooms and help him find magic mushrooms to eat along the way. The journey is a navigator's nightmare, because you never know where the next mushroom will grow, and if Nerm hits a wall or gets trapped by his tail, he loses one of his lives. "Worm of Bemer" is a fast-paced arcade game in which Nerm the Worm travels through rooms eating magic mushrooms. Nerm is lost in Bemer Castle and wants to return home. Guide Nerm to a mushroom using the keyboard arrow keys (E, S, D, and X) so he can keep up his strength for the journey. After eating five mushrooms in a room, Nerm can exit to the next room. You must guide Nerm through 11 rooms before he finds his home. You start out with four lives. If you touch anything besides a mushroom you will lose a life. At the top of the screen you will see the current score, what room Nerm is in, how many mushrooms Nerm must eat to open the exits, and how many lives Nerm has left, includ ing the current life. You get 100 points, plus bonus points, for every mushroom you eat. Nerm gets a bonus life after completing the first two rooms and another for every third room thereafter. Adding More Features You can learn a lot about programming and games by modifying the action and settings in Worm of Bemer. Some features you might add include a routine to save the high score to disk, adding more players, or having Nerm go to a different room ' depending on which exit he takes. Simpler enhancements would be changing the number of mushrooms that Nerm must eat or changing his speed. Worm of Bemer 3 DIM NN(29),RANK$(12) 5 GOSUB 11000 10 GOTO 5000 20 FOR I=1 TO LEN(H$) 30 CALL HCHAR(ROW,COL+I,ASC(SEG$(H$,I,1))) 35 NEXT I 40 RETURN 100 CALL KEY(0,K,ST) 105 IF (K<>68)+(OD=2)THEN 110 106 DX=1 107 DY=0 108 DI=1 110 IF (K<>83)+(OD=1) THEN 115 111 DX=-1 112 DY=0 113 DI=2 115 IF (K<>69)+(OD=3) THEN 120 116 DY=-1 117 DX=0 118 DI=4 120 IF (K<>88)+(OD=4) THEN 140 125 DY=1 130 DX=0 135 DI=3 140 CALL HCHAR(YA,XA,136) 145 OD=DI 150 XA=XA+DX 152 YA=YA+DY 154 L=LEN(XA$) 156 XA$=XA$&CHR$(XA) 158 YA$=YA$&CHR$(YA) 160 CALL GCHAR(YA,XA,Z) 162 IF Z<>32 THEN 200 164 CALL HCHAR(YA,XA,128) 166 CALL SOUND(1,622,2) 168 IF L<WO THEN 100 170 CALL HCHAR(ASC(YA$),ASC(XA$),32) 172 LL=LEN(XA$)-1 174 XA$=SEG$(XA$,2,LL) 176 YA$=SEG$(YA$,2,LL) 180 GOTO 100 200 CALL SOUND(100,311,2) 201 CALL HCHAR(YA,XA,128) 203 GOSUB 6600 205 IF Z<>MUSH THEN 260 210 WO=WO+15+2*LO 212 IF WO<185 THEN 215 214 WO=185 215 RANDOMIZE 216 XX=RND*28+3 218 X=RND*19+4 220 CALL GCHAR(X,XX,H1) 222 IF H1<>32 THEN 216 224 SC=SC+100+LO*7 228 HI=HI-1 230 GOSUB 6600 232 IF HI>0 THEN 245 234 CALL HCHAR(3,17,104) 236 CALL HCHAR(13,2,104) 238 CALL HCHAR(13,31,104) 240 CALL HCHAR(23,17,104) 241 FOR I=3 TO 30 STEP 3 242 CALL SOUND(100,1900,I) 243 NEXT I 244 GOTO 100 245 CALL HCHAR(X,XX,MUSH) 250 GOTO 100 260 IF Z=104 THEN 270 261 IF LI=1 THEN 7500 264 GOSUB 7500 266 GOTO 290 270 CALL HCHAR(YA,XA,136) 272 GOSUB 7000 275 FOR DE=110 TO 880 STEP 32 277 PRINT 279 CALL SOUND(1,DE,2) 280 CALL SOUND(-1,DE,2) 281 NEXT DE 282 LO=LO+1 283 IF LO=12 THEN 1200 284 WO=5 285 L1=L1+1 286 IF LO>EX THEN 9100 287 CALL COLOR(14,L1,1) 288 CALL CLEAR 289 GOSUB 1300 290 GOSUB 6600 300 ON LO GOTO 5080,400,500,550,600,700,800,450,550,1000,1100,1200 399 GOTO 5080 400 REM SECOND SCREEN 410 CALL HCHAR(13,5,120,24) 420 GOTO 5080 449 REM SCREEN 450 CALL VCHAR(7,15,120,16) 455 CALL HCHAR(9,6,120,22) 460 GOTO 5080 499 REM FOURTH SCREEN 500 CALL HCHAR(6,5,120,24) 505 CALL HCHAR(20,5,120,24) 510 GOTO 5080 549 REM FIFTH SCREEN 550 CALL HCHAR(7,6,120,22) 555 CALL VCHAR(8,15,120,16) 560 GOTO 5080 599 REM FRAME 6 600 CALL HCHAR(12,3,120,13) 610 CALL HCHAR(12,19,120,12) 620 GOTO 5080 699 REM FRAME 7 700 FOR I=8 TO 18 710 CALL HCHAR(I,7,120,7) 715 CALL HCHAR(I,18,120, 720 NEXT I 725 GOTO 5080 799 REM FRAME 8 800 CALL HCHAR(8,3,120,13) 805 CALL HCHAR(14,12,120,19) 810 CALL HCHAR(18,3,120,13) 815 GOTO 5080 999 REM FRAME 9 1000 GOSUB 1400 1015 FOR T=5 TO 21 1020 CALL HCHAR(T,4,32,16) 1025 NEXT T 1030 GOTO 5080 1100 GOSUB 1400 1110 FOR T=5 TO 21 1115 CALL HCHAR(T,4,32,20) 1120 NEXT T 1125 GOTO 400 1199 REM YOU WIN!! 1200 CALL CLEAR 1205 CALL SCREEN(3) 1206 FOR I=4 TO 8 1207 CALL COLOR(I,2,1) 1208 NEXT I 1210 PRINT TAB(9);"NERM'S HOME!" 1220 PRINT 1230 PRINT 1240 PRINT TAB(10);"THANK YOU!" 1250 FOR T=1 TO 9 1260 PRINT 1270 NEXT T 1275 FOR T=1 TO 3 1280 FOR I=110 TO 880 STEP 30 1283 CALL SOUND(1,I,2) 1284 CALL SOUND(-1,I,2) 1285 NEXT I 1286 FOR I=880 TO 110 STEP -30 1287 CALL SOUND(1,1,2) 1288 CALL SOUND(-1,I,2) 1289 NEXT I 1290 NEXT T 1291 CALL SCREEN(2) 1293 GOTO 7700 1300 CALL CLEAR 1305 PRINT "SCORE :";TAB(20);"ROOM :" 1310 PRINT "MUSHROOMS :";TAB(20);"LIVES :" 1320 FOR T=1 TO 21 1330 PRINT 1340 NEXT T 1350 RETURN 1400 FOR T=5 TO 21 1410 CALL HCHAR(T,4,120,26) 1420 NEXT T 1430 RETURN 4999 REM UP THE GAME 5000 GOSUB 10000 5005 MUSH=112 5010 LI=4 5015 SC=0 5020 LO=1 5035 HI=5 5040 WO=5 5045 EX=2 5050 L1=3 5055 GOSUB 5500 5060 CALL CLEAR 5065 CALL SCREEN(2) 5066 FOR I=3 TO 8 5067 CALL COLOR(I,16,1) 5068 NEXT I 5070 GOSUB 1300 5075 GOSUB 6600 5080 XA$="" 5081 YA$="" 5085 XA=17 5086 YA=18 5091 DX=0 5093 DY=-1 5103 IF HK6 THEN 5107 5105 HI=5 5107 IF HI>-1 THEN 5110 5109 HI=0 5110 DI=4 5115 FOR I=2 TO 31 STEP 29 5120 CALL VCHAR(3,I,120,21) 5125 NEXT I 5130 FOR I=3 TO 23 STEP 20 5135 CALL HCHAR(I,3,120,28) 5140 NEXT I 5145 CALL HCHAR(24,3,137,28) 5150 IF HI>0 THEN 5174 5155 CALL HCHAR(3,17,104) 5160 CALL HCHAR(12,2,104) 5165 CALL HCHAR(12,31,104) 5167 CALL HCHAR(23,17,104) 5171 GOTO 150 5174 RANDOMIZE 5175 XX=RND*28+3 5178 X=RND*19+4 5180 CALL GCHAR(X,XX,HI) 5185 IF HI<>32 THEN 5174 5190 CALL HCHAR(X,XX,MUSH) 5200 GOTO 150 5500 CALL CLEAR 5505 PRINT TAB(10);"GET READY!" 5510 FOR T=1 TO 12 5515 PRINT 5520 NEXT T 5525 FOR I=1 TO 14 5530 CALL SOUND(100,NN(I),2) 5535 NEXT I 5540 RETURN 6599 REM PRINT SCORE 6600 H$=STR$(SC) 6603 ROW=1 6604 COL=10 6605 GOSUB 20 6607 H$=STR$(LO) 6608 COL=28 6609 GOSUB 20 6610 H$=STR$(HI) 6611 ROW=2 6620 COL=14 6625 GOSUB 20 6630 H$=STR$(LI) 6635 COL=29 6640 GOSUB 20 6650 RETURN 6999 REM NERM LEAVES 7000 SP=SP-5 7005 GOSUB 6600 7010 HI=5 7015 L=LEN(XA$) 7020 FOR I=1 TO L 7025 CALL SOUND(2,110+1*2,2) 7030 CALL HCHAR(ASC(YA$),ASC(XA$) 7035 LL=LEN(XA$)-1 7040 XA$=SEG$(XA$,2,LL) 7045 YA$=SEG$(YA$,2,LL) 7050 NEXT I 7060 RETURN 7499 REM OOP!! 7500 CALL CLEAR 7505 PRINT TAB(13);"OOPS" 7510 FOR I=1 TO 12 7515 PRINT 7520 NEXT I 7525 LI=LI-1 7547 FOR I=14 TO 24 7549 CALL SOUND(10,I*40,2) 7551 NEXT I 7553 FOR I=1 TO 30 7555 NEXT I 7560 IF LI<1 THEN 7700 7575 GOSUB 1300 7600 RETURN 7699 REM THE GAME ENDS 7700 CALL CLEAR 7704 FOR I=3 TO 8 7705 CALL COLOR(I,16,1) 7706 NEXT I 7710 IF HS>SC THEN 7750 7720 HS=SC 7721 FOR I=1 TO 5 7722 PRINT 7723 NEXT I 7725 PRINT TAB(;"NEW HIGH SCORE" 7728 FOR T=110 TO 1760 STEP 50 7729 CALL SOUND(2,T,2) 7730 NEXT T 7740 FOR I=1 TO 5 7743 PRINT 7745 NEXT I 7750 PRINT TAB(7);"YOUR SCORE: ";SC 7755 PRINT 7760 PRINT TAB(7) ;"HIGH SCORE: ";HS 7770 FOR I=1 TO 3 7775 PRINT 7780 NEXT I 7785 PRINT TAB(5);"YOUR NEW RANK IS :" 7790 PRINT 7795 PRINT TAB(9);RANK$(LO) 7796 FOR I=15 TO 29 7797 CALL SOUND(100,NN(I),2) 7798 NEXT I 7800 PRINT 7805 PRINT 7806 PRINT 7810 PRINT "(C TO CONTINUE Q TO QUIT)" 7815 FOR T=1 TO 4 7816 PRINT 7817 NEXT T 7820 CALL KEY(0,K,ST) 7830 IF ST=0 THEN 7820 7840 IF (K<>67)*(K<>81)THEN 7820 7845 IF K=67 THEN 5000 7850 STOP 9099 REM EXTRA LIFE 9100 CALL CLEAR 9110 PRINT TAB(11);"BONUS LIFE" 9120 FOR I=1 TO 12 9125 PRINT 9130 NEXT I 9132 FOR I=1 TO 30 STEP 2 9134 CALL SOUND(100,1175,I) 9136 NEXT I 9140 EX=EX+3 9145 LI=LI+1 9150 GOTO 287 10000 CALL CLEAR 10001 FOR T=3 TO 8 10003 CALL COLOR(T,2,1) 10006 NEXT T 10010 CALL COLOR(14,3,1) 10015 CALL SCREEN(15) 10020 PRINT TAB(10);"WELCOME TO" 10021 FOR T=1 TO 4 10022 PRINT 10023 NEXT T 10025 PRINT TAB(;"NERM OF BEMER" 10028 FOR T=1 TO 9 10030 PRINT 10032 NEXT T 10034 PRINT "USE E,S,D, & X KEYS TO MOVE" 10036 PRINT 10040 CALL HCHAR(21,3,136,4) 10042 CALL HCHAR(21,8,128) 10045 FOR I=1 TO 22 10047 CALL HCHAR(21,6+1,136) 10050 CALL HCHAR(21,7+I,128) 10052 CALL SOUND(10,622,2) 10055 CALL HCHAR(21,2+I,32) 10057 FOR T=1 TO 20 10058 NEXT T 10060 NEXT I 10065 FOR T=1 TO 100 10070 NEXT T 10075 RETURN 10999 REM REDEFINE CHARS 11000 FOR I=104 TO 136 STEP 8 11015 READ A$ 11020 CALL CHAR(I,A$) 11025 NEXT I 11030 DATA FFFFFFFFFFFFFFFF,187EFFFF18181818,FF81BDA5A5BD81FF 11032 DATA 8142243C7E5A3C18,387CFEFEFEFE7C38 11033 CALL COLOR(10,2,2) 11035 CALL COLOR(11,14,1) 11040 CALL COLOR(12,2,10) 11045 CALL COLOR(13,7,1) 11050 CALL CHAR(137,"FFFFFFFFFFFFFFFF") 11060 FOR I=1 TO 9 11065 READ RANK$(I) 11070 NEXT I 11075 FOR I=10 TO 12 11080 RANK$(I)="HALL OF FAME" 11085 NEXT I 11090 DATA ZERO,ROOKIE,NOVICE,AVERAGE 11092 DATA MASTER,GRAND MASTER,WIZARD,GRAND WIZARD 11094 DATA SUPER STAR 11100 FOR I=1 TO 29 11110 READ NN(I) 11120 NEXT I 11130 DATA 262,349,40000,349,392,40000,392,440,523,440,523,440,349,40000 11135 DATA 349,40000,40000,262,247,262,294,294,262,40000,40000,40000,330,330,349 11140 RETURN
  11. Simpel but very cool game! Runway 180 130 CALL CLEAR:: CALL SCREEN(5):: CALL COLOR(1,16,1,2,16,1,3,16,1,4,16,1,5,16,1,6,16,1,7,16,1,8,16,1) 140 DISPLAY AT(10,9):USING "RUNWAY 180" 150 FOR B=0 TO 30 STEP 2 :: CALL SOUND(-10, 110,30,110,30,2500,30,-8,B) :: CALL SOUND (-10,110,30,110,30,4000,30,-8,B):: NEXT B 160 CALL CLEAR:: DISPLAY AT(10,9):USING "PRESS" :: DISPLAY AT(12,9) :USING "I-FOR INSTRUCTIONS" 170 DISPLAY AT(14,14):USING "OR" :: DISPLAY AT(16,9):USING "G-FOR GAME" 180 CALL KEY(0,K,S):: IF S<>1 THEN 180 190 IF K=103 THEN 330 200 IF K=105 THEN 220 210 PRINT "ALPHA LOCK MUST BE OFF" :: PRINT:: PRINT "TRY AGAIN" :: FOR DELAY=1 TO 600 :: NEXT DELAY :: GOTO 160 220 CALL CLEAR :: PRINT "YOU ARE PILOTING A JET" :: PRINT :: PRINT "AIRCRAFT WHICH HAS BEEN " :: PRINT :: PRINT "CLEARED TO LAND ON": : 230 PRINT "RUNWAY 180." :: PRINT :: PRINT :: GOSUB 310 240 CALL CLEAR :: PRINT "USE YOUR JOYSTICK TO CONTROL" :: PRINT :: PRINT "SINK RATE AND AIRSPEED.":: 243 PRINT "JOYSTICK CONTROL-" :: PRINT 245 PRINT "LEFT: ACCELERATE" :: PRINT "RIGHT: BRAKE" :: PRINT "UP: DECREASE SINK RATE" 247 PRINT "DOWN: INCREASE SINK RATE" :: PRINT 250 PRINT "FIREBUTTON CONTROLS LANDING" :: PRINT :: PRINT "GEAR." :: PRINT :: PRINT :: GOSUB 310 :: CALL CLEAR 260 PRINT "TO RECOVER FROM A STALL" :: PRINT :: PRINT "INCREASE AIRSPEED ABOVE 60.":: PRINT :: PRINT "IF YOU CANNOT STOP BEFORE":: 270 PRINT "TOWER REACHES LEFT SIDE OF" :: PRINT :: PRINT "SCREEN, INCREASE AIRSPEED" :: PRINT 280 PRINT "TO 60 AND LIFT OFF FOR":: PRINT:: PRINT "ANOTHER PASS." :: PRINT :: PRINT :: GOSUB 310 :: CALL CLEAR 290 PRINT "YOU MAY HAVE FOUR PASSES":: PRINT :: PRINT "AT THE RUNWAY.....":: PRINT:: PRINT "BEWARE OF THE WIND SHIFTS!":: PRINT:: PRINT 300 PRINT "GOOD LUCK!!!!" :: PRINT :: PRINT:: PRINT :: PRINT :: GOSUB 310 :: GOTO 330 310 PRINT :: DISPLAY AT(24,1):USING "HIT ANY KEY TO CONTINUE" 320 CALL KEY(0,R8,S8) :: IF S8<>1 THEN 320 ELSE RETURN 330 A1=1 340 REM INITIALIZE —> 350 A=0:: B=-75:: LG=0:: CALL SCREEN(2) 360 CALL CLEAR :: CALL CHAR(33,"FFFFFFFFFFFFFFFF"):: CALL COLOR(1,8,1) 370 LC=0:: FOR Z=1 TO 16 :: CALL HCHAR(Z,1,33,32):: NEXT Z 380 CALL CHAR(42,"FFFFFFFFFFFFFFFF"):: CALL COLOR(2,13,1) 390 FOR Z=17 TO 20 :: CALL HCHAR(Z,1,42,32):: NEXT Z 400 RANDOMIZE 410 REM DEF CHAR 420 CALL CHAR(96,"00000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF") 430 CALL CHAR(120,"0030181C3F1F0700") 440 CALL CHAR(121,"000000") 450 CALL CHAR(122,"00000000FCFF8000") 460 CALL CHAR(123,"00000000") 470 CALL CHAR(104,"00000000071F151F") 480 CALL CHAR(105,"0203030203030203") 490 CALL CHAR(106,"00008080E0F8A8F8") 500 CALL CHAR(107,"C040C0C040C0C0C0") 510 CALL CHAR(124,"0030181C3F1F07050000") 520 CALL CHAR(126,"00000000FCFF88840000") 530 CALL CHAR(125,"00000000") 540 CALL CHAR(127,"00000000") 550 CALL CHAR(128,"00000000021F3B00") 560 CALL CHAR(129,"000000000E56E300") 570 CALL CHAR(130,"00000000") 580 CALL CHAR(131,"00000000") 590 REM DRAW DISPLAY 600 CALL SPRITE(#1,96,2, 180, 1,0,B):: CALL COLOR(#1,16) 610 CALL SPRITE(#2,120,2,10,245,A,0):: CALL COLOR(#2,7) 620 CALL SPRITE(#3,104,2,110,250,0,-2) 630 CALL MAGNIFY(4) 640 FOR C5=1 TO 40 :: CALL LOCATE(#2,10,C5):: NEXT C5 :: GOSUB 870 650 REM MAIN LOOP 660 GOSUB 1120 :: GOSUB 890 670 IF J=0 THEN 690 680 CALL MOTION(#1,0,B,#2,A,0) 690 CALL COINC(#2,170,40,9,T) 700 CALL COINC(#3,110,1,4,DA) 710 CALL COINC(#2,240,40,9,E):: IF E=-1 THEN A=1 :: GOSUB 890 :: GOTO 680 720 IF DA=-1 THEN 1320 730 IF T<>-1 THEN 660 740 CALL MOTION(#2,0,0) 750 IF A>1 THEN GOSUB 920 :: GOSUB 960 GOTO 1660 760 IF LG=0 THEN 1660 770 GOTO 1760 780 REM UPDATE DISPLAY 790 IMAGE SINK RATE: ### 800 IMAGE RUNWAY ENDS ### YDS 810 IMAGE AIRSPEED: ### 820 IMAGE TOUCH DOWN 830 IMAGE SINK RATE TOO HIGH 840 IMAGE AIRSPEED TOO HIGH 850 IMAGE CRASH LANDING 860 IMAGE STALL WARNING! 870 DISPLAY AT(1,10)SIZE(20):USING "ATTEMPT NO. #":A1 880 RETURN 890 DISPLAY AT(3,10)SIZE(20):USING 790:A 900 DISPLAY AT(5,10)SIZE(20):USING 810:-B 910 RETURN 920 DISPLAY AT (7,5)SIZE(20) :USING 830 930 RETURN 940 DISPLAY AT(7,5)SIZE(20)BEEP:USING 840 950 DISPLAY AT(9,5)SIZE(20):USING "BOUNCE":: RETURN 960 DISPLAY AT(9,5)SIZE(20):USING 850 970 RETURN 980 CALL HCHAR(7,5,33,27):: DISPLAY AT(9,5)SIZE(20):USING 820 990 RETURN 1000 DISPLAY AT(9,5)SIZE(20):USING "WARNING" 1010 DISPLAY AT ( 11,5)SIZE(20) :USING 800:RE 1020 RETURN 1030 CALL HCHAR(7,5,33,27)::RETURN 1040 CALL HCHAR(9,5,33,27) ::RETURN 1050 CALL HCHAR(11,5,33,27):: RETURN 1060 DISPLAY AT(9,5)SIZE(20):USING "LIFT OFF" :: CALL HCHAR(11,5,33,27):: RETURN 1070 DISPLAY AT(3,10):"END OF RUNWAY ":: DISPLAY AT(5,10):USING "NEW APPROACH" :: DISPLAY AT(7, 10) :USING "NECESSARY" 1080 RETURN 1090 PRINT "THAT'S 5 PASSES AT THE" :: PRINT :: PRINT "RUNWAY. TURN IN YOUR" ::PRINT :: PRINT "PILOT LICENSE AND PUT": : 1100 PRINT "SOMEONE ELSE IN THE" :: PRINT :: PRINT "COCKPIT" :: PRINT :: RETURN 1110 DISPLAY AT(7,9)BEEP SIZE(20) :USING 860 :: RETURN 1120 REM JOYST/ LANDING GEAR 1130 CALL KEY(1,RV,ST):: IF RV=18 AND LG=0 THEN 1190 1140 CALL JOYST(1,X,Y):: IF X=0 AND Y=0 THEN GOSUB 1210 :: RETURN 1150 A=A-Y/4 :: B=B+X/4 1160 IF ABS(A)>127 THEN A=127*SGN(A) 1170 IF B>-50 THEN 1430 1180 J=1 :: RETURN 1190 CALL PATTERN(#2,124) 1200 A=A+3 :: B=B+20 :: LG=1 :: GOTO 1160 1210 REM COMPLICATIONS 1220 CP=INT(RND*16) 1230 IF CP=1 THEN B=B-1 1240 IF CP=6 THEN B=B+1 1250 IF CP=10 THEN A=A-1 1260 IF CP=15 THEN A=A+1 1270 J=0 :: RETURN 1280 IF ABS(A)>127 THEN A=127*SGN(A) 1290 GOTO 1310 1300 IF B<-127 THEN B=-127 1310 J=1 :: RETURN 1320 REM NEW APPROACH 1330 CALL MOTION(#2,0,0):: CALL POSITION(#2,R4,C4) 1340 IF A1>4 THEN 1400 1350 CALL DELSPRITE(#1,#3):: CALL CLEAR 1360 GOSUB 1070 1370 CALL PATTERN(#2,120) 1380 FOR X = C4 TO 255 :: CALL LOCATE(#2,INT(R4),X):: R4=R4-(R4/(255-C4)):: NEXT X 1390 A1=A1+1 :: GOTO 340 1400 CALL DELSPRITE(ALL):: CALL CLEAR 1410 GOSUB 1090 1420 FOR DELAY=1 TO 900 :: NEXT DELAY :: GOTO 1970 1430 REM STALL 1440 GOSUB 1110 1450 CALL MOTION(4»2,0,0) 1460 CALL POSITION(#2,SR,SC) 1470 CALL LOCATE(#2,SR,SC) 1480 CALL COINC(#2,170,40,2,T) 1490 CALL COINC(#3,110,1,2,DE):: IF DE=-1 THEN A1=A1+1:: GOSUB 870:: IF A1>4 THEN 1400 1500 IF T=-1 THEN 1660 1510 SR=SR+4 1520 CALL KEY(1,RV,ST) 1530 IF RV=18 AND LG=1 THEN 1610 1540 CALL JOYST(1,X,Y):: IF X=0 AND Y=0 THEN 1470 1550 B=B+X/4 1560 REM 1570 IF B<-60 THEN 1640 1580 CALL M0TI0N(#1,0,B) 1590 GOSUB 890 1600 GOTO 1470 1610 CALL PATTERN(#2,120) 1620 A=A-3 :: B=B-22 :: LG=0 1630 GOTO 1560 1640 GOSUB 1030 1650 RETURN 1660 REM CRASH 1670 CALL MOTION(#1,0,0,#2,0,0,#3,0,0,#4,0,0) 1680 CALL SOUND(1000,-7,0) 1690 FOR P=1 TO 10 1700 CALL SCREEN(2) 1710 CALL SCREEN(16):: NEXT P :: CALL SCREEN(2) 1720 CALL PATTERN(#2,128) 1730 FOR DELAY=1 TO 400 :: NEXT DELAY 1740 CALL DELSPRITE(ALL) 1750 GOTO 1970 1760 REM TOUCHDOWN/BRAKE/T&G 1770 GOSUB 980 :: IF B<-53 THEN 1940 1780 CALL JOYST(1,X,Y) :: B=B+X/2 1790 IF B>-1 THEN 1880 1800 CALL MOTION(#1,0,B) 1810 CALL COINC(#3,110,1,4,DA) 1820 IF DA=-1 THEN RE=0 :: GOSUB 1010 :: GOTO 1660 1830 CALL DISTANCE(#3,110,1,RQ) 1840 RE=INT(SQR(RQ)):: GOSUB 1000 :: GOSUB 900 1850 CALL KEY(1,RV,ST):: IF RV=18 AND B<-60 THEN GOSUB 1060 :: A=A-2 :: GOTO 1870 1860 GOTO 1780 1870 CALL MOTION(#2,A,0):: FOR DELAY=1 TO 200 :: NEXT DELAY :: GOTO 650 1880 REM SCORING 1890 CALL MOTION(#1,0,0,#2,0,0 ,#3,0,0,#4,0,0) 1895 FOR DELAY=1 TO 800 :: NEXT DELAY 1900 CALL DELSPRITE(ALL):: CALL CLEAR 1910 PRINT "CONGRATULATIONS !": : 1920 PRINT "YOUR SCORE IS : "; (RE/A1)*10:: 1930 GOTO 1990 1940 A=A-2 :: CALL MOTION(#2,A,0) :: GOSUB 940 1950 FOR DELAY=1 TO 20 :: NEXT DELAY 1960 A=A+2 :: GOSUB 1030 :: GOSUB 1040 :: GOTO 650 1970 REM PLAY AGAIN 1980 CALL CLEAR 1990 PRINT "PLAY AGAIN (Y/N)?" 2000 CALL KEY(2,RV,SV) 2010 IF SV=0 THEN 2000 2020 IF RV=15 THEN 2050 2030 IF RV=18 THEN 330 2040 GOTO 1990 2050 END
  12. Sprite Editor - Something wrong with CALL KEY i think!!! Larry Long Here's a way to get maximum use of sprites on the TI-99/4A—and a program that generates listings for your sprite creations. Requires Extended BASIC. A very powerful yet often unused feature of the TI-99/4A is its ability to display and control sprites. With the 99/4A and the Extended BASIC Module, it's possible to generate 28 sprites for display and independent simultaneous movement. Program 1 should convince any doubters that this can be done. Although a lot of colored letters floating around the screen are a bit pointless, if we can modify and control the sprites, we will have a most useful feature. Sprites can be designed by drawing on a piece of graph paper and then converting the on/off pixels to a hexadecimal number. If the two largest sizes of sprites are used, the hexadecimal number describing the shape of the sprite would be 64 characters long (for a more extensive discussion on sprite creation see "A Beginner's Guide to Sprites" elsewhere in this book). A solution is a sprite editor that will allow us to draw the pattern we want on the screen and then have the com puter create the program we need to make that sprite pattern. Program 2 will do exactly that, and more. It will allow us to edit the sprite pattern. Then, when we press the L key, it will display a complete listing that would, if copied on paper and then entered into the computer, provide a sprite and the necessary routine to control its movement. Your Options When you run the program, the first display screen will be a design grid with a box-shaped cursor. The area under the cursor will initially be white (signifying an off pixel). Press 1 to change the color beneath the cursor to black (representing an on pixel) or to move the cursor about the grid using the arrow keys. To turn off a particular pixel, press 0 and the back ground color will be returned to white. When you have ""*] completed your design, press the P key to see it displayed as a sprite. At this point, you are given several options. You can magnify your newly constructed sprite (M key), change its color. (C key), change its background color (B key), or set it in motion (E, S, D, X keys). If you are not pleased with the sprite's shape, you can modify it by striking the T key or (if the changesrequired are quite drastic) simply press the A key to start with a fresh grid. On the other hand, if you are satisfied with your sprite and its color and directional parameters, press the L key to create the BASIC statements needed to achieve these effects. If using the sprite editor is your only concern, then skip the rest of this article and go straight to Program 2 and enjoy this easy access to sprites. How the Editor Works To understand what makes the editor work, let's take a general overview of the program: Lines 100-260 Set up screen display. 270-460 The main loop of the designing portion of the program. 470-680 Evaluate the design, put its values in an array, read the values in the array, convert them to hexadecimal numbers, and then build a 64-character string to describe the sprite pattern. 690-770 Put the sprite on the screen and display new program instructions. 780-930 Main loop of the implementation portion of the program. 940-980 Change size of sprite. 1000-1150 Display a listing of the sprite program. 1160-1220 Change the color of the sprite and screen. A cursor is needed to indicate where you are located on the design grid. I chose to use a sprite (line 220) because I could move it around freely without disturbing the display under it. Repositioning the cursor is accomplished in line 380 with a CALL LOCATE. The arrow keys reposition the cursor, and the ENTER key changes the area under the cursor. What makes "Sprite Editor" so valuable is its ability to generate the hexadecimal pattern for the sprite. The loop from line 500 through line 560 determines the character in each position of the design grid and stores that value in the array B (R,C). Line 570 provides a string with all of the possible hexadecimal digits placed in ascending order. Line 580 sets M$ to null. The loop from line 590 to line 630 evaluates the array elements and converts each row in the left half of the design grid to a pair of hexadecimal digits and concatenates them to M$. Line 620 is probably the most significant line in ' this loop, as it provides the hexadecimal numbers. It causes the computer to look at a particular digit (element) in HEX$ determined by the values calculated for HIGH and LOW. Lines 630-680 perform the same operation as 590-630, only for the right half of the design grid. Line 690 assigns the hexadecimal numbers to ASCII characters 104, 105, 106, and 107. It is necessary to specify only the first character number in the CALL CHAR statement. When this feature is used, it is required that you start with a character that is evenly divisible by 4. Line 730 actually displays the sprite. Lines 740-770 provide instructions for the implementation portion of the program. Lines 780-830 check for specific key presses and provide appropriate branching to list the program; end the program; start from the beginning; change the background color; modify the existing sprite; change sprite size; or change sprite color. Lines 840-920 check for arrow key presses and then increment or decrement sprite speed. Lines 940-980 change sprite size. Lines 1000-1150 display a program listing that would generate a sprite like the one designed by the Sprite Editor. One problem with listing the program is displaying the quote character. The computer interprets it to mean that you want to end the PRINT statement. The solution is to redefine an unused character (I chose the lowercase n) to look like the quote character. Finally, lines 1160-1220 allow you to change the color of the sprite and screen. 100 CALL MAGNIFY(2):: FOR X=1 TO 28 :: CALL SPRITE(#X,64+X,X/2,96,128,INT(RND*100)-50,INT(RND*100)-50):: NEXT X :: GOTO 100 100 REM SPRITE EDITOR 110 DIM B(16,16):: SC=8 130 C1=7 140 CALL CHAR(100,"") 150 CALL CHAR(101,"FFFFFFFFFFFFFFFF") 160 CALL CHAR(102,"FFFFC3C3C3C3FFFF") 170 CALL COLOR(9,2,16) 180 CALL CLEAR 190 DISPLAY AT(1,10):"SPRITE EDITOR" 200 FOR R=1 TO 16 :: CALL HCHAR(4+R,2,100,16):: NEXT R 210 CALL MAGNIFY(1) 212 IF K=84 THEN GOTO 217 215 CALL SCREEN( 217 CALL DELSPRITE(ALL) 220 CALL SPRITE(#28,102,14,32, 225 CALL HCHAR(21,1,32,31):: CALL HCHAR(22,1,32,31) 230 DISPLAY AT (22,2):"E=UP X=DOWN S=LEFT D=RIGHT" 240 DISPLAY AT(23,2):"PRESS 1 - PIXEL ON ,0 - OFF" 250 DISPLAY AT(24,2):"PRESS P TO DISPLAY SPRITE" 260 R=1 :: C=1 265 KHAR=100 270 CALL KEY(0,K,S) 271 IF S=0 THEN 270 272 IF K=48 THEN KHAR=100 274 IF K=49 THEN KHAR=101 280 IF K=83 THEN C=C-1 :: GOTO 320 290 IF K=68 THEN C=C+1 :: GOTO 320 300 IF K=69 THEN R=R-1 :: GOTO 320 310 IF K=88 THEN R=R+1 :: GOTO 320 312 IF K=80 THEN 470 320 IF C<1 THEN C=16 330 IF C>16 THEN C=1 340 IF R<1 THEN R=16 350 IF R>16 THEN R=1 380 CALL LOCATE(#28,(8*R)+25,8*C+1) 420 CALL HCHAR(4+R,1+C,KHAR) 430 CALL SOUND(20,200,5) 460 GOTO 270 470 CALL DELSPRITE(ALL) 480 CALL HCHAR(21,1,32,128) 490 DISPLAY AT(22,2):"PLEASE WAIT WHILE I THINK." 500 FOR R=1 TO 16 510 FOR C=1 TO 16 520 CALL GCHAR(4+R, 1+C,GC) 530 GC=GC-100 540 B(R,C)=GC 550 NEXT C 560 NEXT R 570 HEX$="0123456789ABCDEF" 580 M$="" 590 FOR R=1 TO 16 600 LOW=B(R,5)*8+B(R,6)*4+B(R,7)*2+B(R,+1 610 HIGH=B(R,1)*8+B(R,2)*4+B(R,3)*2+B(R,4)+1 620 M$=M$&SEG$(HEX$,HIGH,1)&SEG$(HEX$,LOW,1) 630 NEXT R 640 FOR R=1 TO 16 650 LOW=B(R,13)*8+B(R,14)*4+B(R,15)*2+B(R,16)+1 660 HIGH=B(R,9)*8+B(R,10)*4+B(R,11)*2+B(R,12)+1 670 M$=M$&SEG$(HEX$,HIGH,1)&SEG$(HEX$,LOW,1) 680 NEXT R 690 CALL CHAR(104,M$) 700 CALL MAGNIFY(3) 710 MM=3 720 M=4 730 CALL SPRITE(#1,104,C1,50,170,0,0) 740 DISPLAY AT(21,2):"C COLOR M MAGNIFY T EDIT" 750 DISPLAY AT(22,2):"A ERASE Q QUIT B BACKGRD" 760 DISPLAY AT(23,2):"E=UP X=DOWN S=LEFT D=RIGHT" 770 DISPLAY AT(24,:"L LISTS PROGRAM" 780 CALL KEY(0,K,S) 790 IF K=76 THEN GOTO 1000 800 IF K=81 THEN GOTO 990 810 IF K=65 THEN GOTO 100 812 IF K=66 THEN GOSUB 1200 815 IF K=84 THEN GOTO 210 820 IF K=77 THEN GOTO 940 830 IF K=67 THEN GOTO 1160 840 IF K=83 THEN H=H-2 850 IF K=68 THEN H=H+2 860 IF K=69 THEN V=V-2 870 IF K=88 THEN V=V+2 880 IF V>120 THEN V=120 890 IF V<-120 THEN V=-120 900 IF H>120 THEN H=120 910 IF H<-120 THEN H=-120 920 CALL MOTION(#1,V,H) 930 GOTO 780 940 CALL MAGNIFY(M) 950 MM=M 960 IF M=3 THEN M=4 ELSE M=3 970 FOR D=1 TO 20 :: NEXT D 930 GOTO 780 990 STOP 1000 REM PROGRAM LISTER 1005 CALL SCREEN( 1010 CALL CHAR(110,"002424") 1020 CALL CLEAR 1030 PRINT " PROGRAM LISTING" 1035 CALL DELSPRITE(ALL) 1040 PRINT 1050 PRINT ">100 CALL CHAR(104,n";:: FOR W=1 TO 64 :: PRINT SEG$(M$,W,1) ;:: NEXT W :: PRINT "n)" 1055 PRINT ">105 CALL SCREEN(";SC;")" 1060 PRINT ">110 CALL MAGNIFY (";MM;")" 1070 PRINT ">120 CALL SPRITE(#1,104,";C1;",150,150,";V;",";H; ")" 1080 PRINT ">130 CALL KEY(0,K,S)" 1090 PRINT ">140 IF K=63 THEN H=H+2" 1100 PRINT ">150 IF K=83 THEN H=H-2" 1110 PRINT ">160 IF K=88 THEN V=V+2" 1120 PRINT ">170 IF K=69 THEN V=V-2" 1130 PRINT ">180 CALL MOTION(#1,V,H)" 1140 PRINT ">190 GOTO 130" 1150 PRINT :: PRINT :: PRINT :: PRINT :: PRINT 1155 DISPLAY AT(21,3):"A – ERASE Q- QUIT" 1156 CALL KEY(0,K,ST):: IF ST=0 THEN 1156 1157 IF K=81 THEN GOTO 990 1158 IF K=65 THEN GOTO 100 1159 GOTO 1156 1160 C1=C1+1 :: IF C1>16 THEN C1=2 1170 CALL COLOR (#1,C1) 1180 CALL KEY(0,K,S):: IF S THEN 1180 ELSE 780 1200 REM SCREEN COLOR CHANGE 1210 SC=SC+1 :: IF SC=17 THEN SC=2 1220 CALL SCREEN(SC) 1230 CALL KEY(0,K,S):: IF 3 THEN 1230 ELSE RETURN
  13. "Programmers blindness" I remember, the PDF would not copy correct and I copy same line to not have to write "DATA" again and was then "mind blind" to that. Thx, Lee!
  14. ****SPRITE DEMO**** (Again same PDF) 100 CALL CLEAR 110 PRINT TAB(5):"****SPRITE DEMO****" 120 PRINT :: PRINT "DESIGNED TO ACCOMPANY" 130 PRINT """A BEGINNER'S GUIDE TO SPRITES IN TI EXTENDED BASIC""" 170 FOR D=1 TO 1000 :: NEXT D 180 CALL CLEAR 190 PRINT "THIS DEMONSTRATION FOLLOWS THE SEQUENCE OF THE ARTICLE." 200 PRINT :: PRINT "THE PROGRAM STEPS USED ARE THE SAME AS THOSE USED IN THE ARTICLE." 210 PRINT :: PRINT "AT THE END OF EACH DEMO. A TONE WILL SOUND." 220 PRINT :: PRINT "THEN PRESS LETTER Q TO CON- TINUE WITH THE NEXT DEMO." 230 FOR D=1 TO 1000 :: NEXT D 240 CALL CLEAR 250 A$="010204020123568D" 260 B$="8D56230102040201" 270 C$="8040204080C46AB1" 280 D$="B16AC48040204080" 290 CALL CHAR(96,A$&B$&C$&D$) 300 CALL CHAR(90,"1818183C3C3C66C3") 310 CALL SCREEN(15) 320 CALL SPRITE(#1,96,7,95,75) 330 CALL SPRITE(#2,90,2,170,125) 335 FOR D=1 TO 500 :: NEXT D 340 GOSUB 2500 350 CALL MAGNIFY(2) 360 DISPLAY AT(3,3):"MAG. FACTOR 2" 370 FOR D=1 TO 500 :: NEXT D 380 CALL MAGNIFY(3) 390 DISPLAY AT(3,3)ERASE ALL:"MAG. FACTOR 3" 400 FOR D=1 TO 500 :: NEXT D 410 CALL MAGNIFY(4) 420 DISPLAY AT(3,3)ERASE ALL:"MAG. FACTOR 4" 430 FOR D=1 TO 500 :: NEXT D 440 CALL CLEAR 450 CALL CHAR(130,"1818183C3C3C66C3") 460 GOSUB 3000 465 DISPLAY AT(2,3):"MAG. FACTOR 3" 467 DISPLAY AT(3,3):"UNWANTED CHARACTERS NOW RE- MOVED WHEN ""FREE"" CHAR- ACTER CODE USED" 468 FOR D=1 TO 500 :: NEXT D 470 FOR D=1 TO 500 :: NEXT D 480 CALL MAGNIFY(4) 490 DISPLAY AT(3,3)ERASE ALL:"MAG. FACTOR 4" 500 FOR D=1 TO 500 :: NEXT D 510 CALL MAGNIFY(3) 520 DISPLAY ERASE ALL 530 GOSUB 2500 535 DISPLAY AT(2,3):"POSITION DEMO" 536 FOR D=1 TO 500 :: NEXT D 540 CALL POSITION(#1,DR1,DC1) 550 CALL POSITION(#2,DR2,DC2) 560 PRINT TAB(6);"ROW"," COL" 570 PRINT "#1: ";DR1,DC1 580 PRINT "#2: ":DR2,DC2 590 FOR D=1 TO 500 :: NEXT D 600 GOSUB 2500 610 CALL CLEAR 620 GOSUB 3000 625 DISPLAY AT(2,3):"CHARPAT DEMO" 626 FOR D=1 TO 300 :: NEXT D 630 CALL CHARPAT(130,CP2$):: PRINT CP2$ 640 FOR CC=96 TO 99 650 CALL CHARPAT (CC,CP1$) 660 PRINT CP1$ :: NEXT CC 670 FOR CC=42 TO 52 STEP 10 680 CALL CHARPAT(CC,CP$) 690 PRINT TAB(2);CHR$(CC);" ";CP$ :: NEXT CC 700 FOR D=1 TO 500 :: NEXT D 710 GOSUB 2500 720 CALL CLEAR 730 GOSUB 3000 735 DISPLAY AT(2,3):"DISTANCE DEMO" 736 FOR D=1 TO 300 :: NEXT D 740 CALL DISTANCE(#1,#2,X) 750 DST=SQR(X) 760 PRINT DST 770 CALL DISTANCE(#1,1,1,Y) 780 DIS=SQR(Y) 790 PRINT DIS 800 FOR D=1 TO 500 :: NEXT D 810 GOSUB 2500 820 CALL CLEAR 830 GOSUB 3000 835 DISPLAY AT(2,3):"LOCATE DEMO" 836 FOR D=1 TO 300 :: NEXT D 840 CALL LOCATE(#2,1,200) 850 FOR D=1 TO 500 :: NEXT D 860 CALL LOCATE(#2,16,16) 870 FOR D=1 TO 500 :: NEXT D 880 CALL LOCATE(#2,170,125) 890 FOR D=1 TO 500 :: NEXT D 900 GOSUB 2500 905 DISPLAY AT(2,3)ERASE ALL:"PATTERN DEMO" 906 FOR D=1 TO 300 :: NEXT D 910 CALL CHAR(140,"80C0783F3F78C080") 920 CALL PATTERN(#2,140) 930 FOR D=1 TO 500 :: NEXT D 940 CALL PATTERN(#2,130) 950 GOSUB 2500 960 GOSUB 3500 965 DISPLAY AT(2,3)ERASE ALL:"MOTION DEMO" 966 FOR D=1 TO 300 :: NEXT D 967 DISPLAY ERASE ALL 970 FOR D=1 TO 3000 :: NEXT D 980 GOSUB 2500 990 GOSUB 3500 995 DISPLAY AT(2,3)ERASE ALL:"DELSPRITE DEMO" 996 FOR D=1 TO 300 :: NEXT D 997 DISPLAY ERASE ALL 1000 FOR D=1 TO 2200 :: NEXT D 1010 CALL DELSPRITE(#2) 1020 FOR D=1 TO 1000 :: NEXT D 1030 GOSUB 2500 1040 CALL CLEAR 1045 CALL SPRITE(#2,130,2,170,125) 1050 GOSUB 4000 1055 DISPLAY AT(2,3):"USE OF CALL KEY TO INITIATE MOTION" 1056 FOR D=1 TO 300 :: NEXT D 1057 DISPLAY ERASE ALL 1060 FOR D=1 TO 2000 :: NEXT D 1080 GOSUB 2500 1090 GOSUB 3500 1095 DISPLAY AT(2,3)ERASE ALL:"COINC DEMO" 1096 FOR D=1 TO 300 :: NEXT D 1100 CALL COINC(#1,#2,15,C1) 1110 CALL COINC(#2,1,125,1,C2) 1120 PRINT C1 1130 IF C1=-1 THEN 1150 ELSE 1140 1140 IF C2=-1 THEN 1200 ELSE 1100 1150 CALL SCREEN(11) 1160 CALL SOUND(100,262,2) 1170 FOR D=1 TO 200 :: NEXT D 1180 CALL SCREEN(15) 1190 GOTO 1100 1200 CALL SCREEN(4) 1210 CALL SOUND(100,523,2) 1220 FOR D=1 TO 200 :: NEXT D 1230 CALL SCREEN(15) 1240 GOTO 1100 1250 STOP 2500 DISPLAY BEEP 2510 CALL KEY(0,K,S) 2520 IF S=0 THEN 2510 2530 IF K=81 THEN 2540 ELSE 2510 2540 RETURN 3000 CALL SCREEN(15) 3010 CALL SPRITE(#1,96,7,95,75) 3020 CALL SPRITE(#2,130,2,170,125) 3030 CALL MAGNIFY(3) 3040 RETURN 3500 CALL SPRITE(#1,96,7,95,75,50,-50) 3510 CALL MOTION(#2,-5,0) 3520 RETURN 3530 STOP 4000 DISPLAY AT(3,3):"PRESS SPACE BAR TO START MOTION OF SPACESHIP SPRITE" 4005 FOR D=1 TO 200 :: NEXT D 4006 DISPLAY ERASE ALL 4010 CALL KEY(0,K,S) 4020 IF S=0 THEN 4010 4030 IF K=32 THEN 4040 ELSE 4010 4040 CALL MOTION(#2,-5,0) 4050 RETURN
×
×
  • Create New...