Jump to content
Sign in to follow this  
tibasic

Swamp path blues: 10 line TI Basic fun

Recommended Posts

I thought it would be fun, after reading the 10-line extended basic competition discussion, to see whether an unexpanded TI 10 line game could be written. This is what I came up with yesterday evening.

100 PRINT ::::"*** SWAMP PATH BLUES ***":::"DONT GET BOGGY FEET 1 & 3":::"F4 TO EXIT"::::TAB(24);"SCORE"::
110 CALL KEY(0,K,S)
120 X=X+(K-50)*ABS(S<>0)*ABS((K>48)*(K<52))
130 CALL VCHAR(24,X+8,42)
140 DIR=(RND>0.5)*2+1
150 X_R=X_R+DIR*ABS(((X_R+DIR)>-1)*((X_R+DIR)<18))
160 PRINT TAB(X_R+2);CHR$(30);TAB(X_R+10-INT(SC/30));CHR$(30);TAB(24);STR$(SC)
170 IF ((X+8)<(X_R+2+2))+((X+8)>(X_R+10-INT(SC/30)+2))THEN 170
180 SC=SC+1
190 GOTO 110

Keys are 1 and 3 for left and right to stay on the path. The path gets narrower as the game progresses. The game ends when you stray off the path and get stuck in the swamp. To play the game again press function+4 to exit the game and then type "RUN".

Share this post


Link to post
Share on other sites

WOW  crashes with *SYNTAX ERROR* in 100 every time!

 

Looks like the colons need spaces:

100 PRINT : : : : "*** SWAMP PATH BLUES ***": : : "DONT GET BOGGY FEET 1 & 3": : : "F4 TO EXIT": : : : TAB(24);"SCORE": : 

Share this post


Link to post
Share on other sites

????

When I copied and pasted it worked fine. Be sure you have pasted it into TI BASIC.

Sorry never use TI Basic as RXB runs TI Basic faster then TI Basic does.

 

I created RXB for one of these reasons.

Edited by RXB

Share this post


Link to post
Share on other sites

I thought it would be fun, after reading the 10-line extended basic competition discussion, to see whether an unexpanded TI 10 line game could be written. This is what I came up with yesterday evening.

Keys are 1 and 3 for left and right to stay on the path. The path gets narrower as the game progresses. The game ends when you stray off the path and get stuck in the swamp. To play the game again press function+4 to exit the game and then type "RUN".

 

Nice. I would maybe have liked for the player to be placed 1 or 2 lines higher on the screen.
 
It seems to be the same run every time. If I let it run without user input (using the keys), this is the scores I get:
 
TI Basic
62 points.
 
TI Extended Basic
25 points.
Has different background color.
 
RXB 2015E
47 points.
Has different graphics.

As mentioned (in the title) the game was designed for TI Basic.
 

 

Share this post


Link to post
Share on other sites

 

Nice. I would maybe have liked for the player to be placed 1 or 2 lines higher on the screen.
 
It seems to be the same run every time. If I let it run without user input (using the keys), this is the scores I get:
 
TI Basic
62 points.
 
TI Extended Basic
25 points.
Has different background color.
 
RXB 2015E
47 points.
Has different graphics.

As mentioned (in the title) the game was designed for TI Basic.
 

 

RXB has a different cursor and full lower real lowercase with decendor letters like j or g or y.

Share this post


Link to post
Share on other sites

Thanks everyone for trying it!!

 

Below is something sometimes99er requested. The player is placed one line higher. As a consequence it leaves a trail along the path. That might be useful perhaps if you want to see why you strayed close to the edge.

 

Different runs could perhaps be created by adding, e.g. "10 RANDOMIZE". Alternatively, without breaking the 10 line rule, you could press F4 immediately after running the program then enter "RANDOMIZE" at the command line and then type "CONTINUE".

 

I'm not planning on entering the competition but I'm looking forward to seeing the entries and perhaps will be inspired to try an Extended Basic for something.

100 PRINT ::::"*** SWAMP PATH BLUES ***":::"DONT GET BOGGY FEET 1 & 3":::"F4 TO EXIT"::::TAB(24);"SCORE"::
110 CALL KEY(0,K,S)
120 X=X+(K-50)*ABS(S<>0)*ABS((K>48)*(K<52))
130 DIR=(RND>0.5)*2+1
140 X_R=X_R+DIR*ABS(((X_R+DIR)>-1)*((X_R+DIR)<18))
150 PRINT TAB(X_R+2);CHR$(30);TAB(X_R+10-INT(SC/30));CHR$(30);TAB(24);STR$(SC)
160 IF ((X+8)<(X_R+2+2))+((X+8)>(X_R+10-INT(SC/30)+2))THEN 160
170 CALL VCHAR(23,X+8,42)
180 SC=SC+1
190 GOTO 110
Edited by tibasic

Share this post


Link to post
Share on other sites

 

I'm not planning on entering the competition but I'm looking forward to seeing the entries and perhaps will be inspired to try an Extended Basic for something.

 

Why not??? You are certainly one of the most creative TI BASIC programmer on this forum, and you already have an entry! I'm positive you will not be able to resist   :D

Share this post


Link to post
Share on other sites

 

Why not??? You are certainly one of the most creative TI BASIC programmer on this forum, and you already have an entry! I'm positive you will not be able to resist   :D

ok you talked me into it :) 

Share this post


Link to post
Share on other sites

Got to 104 on my first run through. Very neat little game for 10 lines. I remember a driving game similar to this in COMPUTE! magazine back in the day which took far more lines to do what this does. Very impressed!

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...