tibasic Posted August 20, 2019 Share Posted August 20, 2019 Listed below are 10-liner ideas that I considered for the recent contest but I rejected them for one reason or another. I included them here as they might contain some insights and ideas for others using TI Basic. The code can be copy-pasted into JS99'er or Classic99. For Classic99 use the paste XB option. There's some information on the code in the pdf. "Battle" is a mathematically based simulation. It is based on the well known Lanchester's square law used in combat and business simulations, e.g. to develop strategies to capture market share from monopolies. As it stands the program doesn't really do much. It is based on two coupled differential equations from the Lanchester's law wiki site. It's kind of fun playing around with the numbers. I'm not sure if it is even giving the correct results but maybe will be of interest to someone. 1 CALL COLOR(13,5,5) 2 CALL COLOR(14,7,7) 3 INPUT " "&CHR$(136)&" OPPONENTS LEVEL:1950 "&CHR$(128)&" YOUR TECHNOLOGY:19":C 4 INPUT " "&CHR$(136)&" OPPONENTS UNITS:100 "&CHR$(128)&" YOUR UNITS :":B(1) 5 B(2)=100 6 CALL CLEAR 7 I=I+0.5 8 CALL HCHAR(-5*(I=INT(I))-17*(I<>INT(I)),1,-128*(I=INT(I))-136*(I<>INT(I)),B(-1*(I=INT(I))-2*(I<>INT(I)))) 9 B(-1*(I=INT(I))-2*(I<>INT(I)))=B(-1*(I=INT(I))-2*(I<>INT(I)))-B(-1*(I<>INT(I))-2*(I=INT(I)))*0.01*(-C*(I<>INT(I))/50-(I=INT(I))) 10 ON (B(1)*B(2)<1)*((INT(I)-I)=0)+1-((INT(I)-I)=0)GOSUB 7,6,1 "Flak" was supposed to simulate flying an aircraft through some anti-aircraft fire. I wasn't convinced the gameplay was good/clear enough to enter it into the contest. Three hits from the flak and you're out. 1 CALL KEY(0,K,S) 2 Y=Y+(K=ASC("X"))*((15+Y)<(10+(10+SC*0.1*(SC<=100)+10*(SC>100))))-(K=ASC("E"))*((15+Y)>5) 3 CALL HCHAR(15+Y,14,ASC("_"),5) 4 CALL HCHAR(15+Y,16,ASC("o")) 5 RN=RND 6 CALL HCHAR(5*RN+5-(10+SC*0.1*(SC<=100)+10*(SC>100))*(RN>0.1),5*RND+14,42) 7 SC=SC-(INT(5*RN+5-(10+SC*0.1*(SC<=100)+10*(SC>100))*(RN>0.1))=(15+Y))*0.01+1 8 CALL CLEAR 9 IF (SC-INT(SC))>0.03+((15+Y)>=(10+(10+SC*0.1*(SC<=100)+10*(SC>100))))THEN 10 ELSE 1 10 PRINT "FLAK * __o__ *":::"KEYS: E & X":::"DISTANCE FLOWN:"&STR$(INT(SC))&" KM"::::: "Mission" was an experiment in using high quality graphics in a 10-liner. It probably incorporates all that I've learned from the other 10-liners I wrote. I wrote it a few days before the end of the contest. I didn't enter it because I couldn't settle on a back story or a concise description of the game. It's still not very clear to me how to explain it. I might develop this one further. Keys are 1, 2 and 3. Basically fly the ship until you reach the end of the mission which is when you score 200 points. Your mission is to fly as close as you can to the terrain and avoid some objects (black squares with a cross in them). 1 DATA 96,101028287C548282,97,101028385444,98,10283844,99,00FEBAD6EED6BAFE,100,3C4299858581423C,101,000018242418,102,1 2 READ A,A$ 3 CALL CHAR(A,A$) 4 CALL KEY(0,K,S) 5 CALL GCHAR(22.5-Y,15,CH) 6 CALL HCHAR(22.5-Y,16,(96+(51-K)*ABS(S))*((Y-INT(Y))<=0.5)*((51-K)*ABS(S)<=(CH-99))-CH*((Y-INT(Y))>=0.5)) 7 CALL HCHAR(20.5+Y*2*(Y<9),15-RND*2,(101.4-RND*2.4*(Y*2-INT(Y*2))*5)*(Y>0.9)*(Y<9)-102*((Y<1.0)+(Y>9)),4+RND*3-765*(Y<0.5)) 8 Y=Y+0.5001+(INT(Y)+0.5001)*(Y>21)+0.001*(((51-K)-(CH-99))=-1)*((Y*2-INT(Y*2))<=0.2) 9 PRINT SEG$("MISSION COMPLETED! SCORE:"&STR$(INT((Y*2-INT(Y*2))*1000)),1-28*((51-K)=(CH-99)),-56*((Y*2-INT(Y*2))>0.2)-28*((51-K)=(CH-99))); 10 ON (A<>102)-(((51-K)=(CH-99))-((S=0)*(CH=99))+((Y*2-INT(Y*2))*1000>200))+2 GOSUB 1,4,10 Very simple shoot 'em up type of game. I nearly entered this into the contest but I thought it wasn't that interesting although it's fun to play. 1 CALL CLEAR 2 CALL KEY(0,K,S) 3 X=X+(K=ASC("S"))*(S<>0)*(X>-15)-(K=ASC("D"))*(S<>0)*(X<15) 4 CALL HCHAR(23-(F-INT(F))*5,16+X,94) 5 X2=X2+(-1+2*RND)*(X2>-14)*(X2<16) 6 F=F-(X+1=INT(X2))*(K=32)*100-RND*(K<>32) 7 CALL HCHAR(2+(F-INT(F))*5,15+INT(X2),86) 8 CALL VCHAR(3-(F-INT(F))*5*(K<>32),15+INT(X2)*((F-INT(F))>0.8)*(K<>32)-(X+1)*(K=32),33*((F-INT(F))>0.8)*(K<>32)-34*(K=32),20-(F-INT(F))*5) 9 IF (F-INT(F)>0.8)*(INT(X2)=X+1)THEN 10 ELSE 1 10 PRINT ::::" ==< Z A P >==":::::"GAME OVER"::"SCORE:";-INT(F/100)*100::::"A * TI99/4A * 10 LINER"::"S=left D=right SPACE=fire"::"ENTER RUN TO PLAY AGAIN" ti9910liners.pdf 8 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.