Adventure Game with text input
Moderator: MaxCoderz Staff
Adventure Game with text input
I'm working on adapting an old BASIC Adventure game skeleton for the calculator. It can accept two word input. Is there any interest for this, or is it too hard to type on the calculator?
You will only need to type two words, or even three letters of each word.
I will release the example game that was included in the book soon as a calculator BASIC program. (83/84 series)
You will only need to type two words, or even three letters of each word.
I will release the example game that was included in the book soon as a calculator BASIC program. (83/84 series)
Last edited by CompWiz on Fri 21 Oct, 2005 2:23 am, edited 1 time in total.
In Memory of the Maxcoderz Trophy
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
The adventure game in the book does not support pictures, but I could add them in after I get the first version working.
The typing shouldn't be too bad, as you only really have to type the first three letters of the two words you use.
The typing shouldn't be too bad, as you only really have to type the first three letters of the two words you use.
Last edited by CompWiz on Fri 21 Oct, 2005 2:23 am, edited 1 time in total.
In Memory of the Maxcoderz Trophy
How to Create Adventure Games by Christopher Lampton
copyright 1986
basically it is a book that leads you through creating an adventure game with explanations of each part, then gives you the code for the game they created and a skeleton so you can make one.
copyright 1986
basically it is a book that leads you through creating an adventure game with explanations of each part, then gives you the code for the game they created and a skeleton so you can make one.
Last edited by CompWiz on Fri 21 Oct, 2005 2:23 am, edited 1 time in total.
In Memory of the Maxcoderz Trophy
same here.necro wrote: that is a loooooooong time ago...I wasn't even alive...
stupid lack of subroutines(without using seperate programs) in ti Basic
Last edited by CompWiz on Fri 21 Oct, 2005 2:23 am, edited 1 time in total.
In Memory of the Maxcoderz Trophy
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
On www.unitedti.org there is a topic in Basic Programming about subroutines in basic. I think it is called "Basic Tricks" or somehting like that.
thanks, I'll look more into that tomorrow
Progress:
So far I have the text input and storing of input working. I also have the location statements(tells you where you are) working, but I may have to alter them slightly. I am working currently on a program to output the contents of a string to the screen with line breaks only after spaces, and combining the statements that you would recieve to save screen space.
Progress:
So far I have the text input and storing of input working. I also have the location statements(tells you where you are) working, but I may have to alter them slightly. I am working currently on a program to output the contents of a string to the screen with line breaks only after spaces, and combining the statements that you would recieve to save screen space.
In Memory of the Maxcoderz Trophy
Update: I finished the code for the program that will display the combined output from the game(this way it is not a new line for location, items, possible directions, etc..., and it saves screen space)
One problem: It doesn't run. I did throw it together fairly quickly, and it probably has a simple mistake somewhere. Also, it is exceedingly un-optimized(I want to optimize for size, as long as speed is reasonable)
The purpose of the program is to output to the screen the text in string1, while wrapping the text only on spaces, if possible. Also, it should be starting after whatever line was already on the display before this program was called. I would like to keep variable use to a minimum, if possible, as the rest of the program uses quite a few variables.
Here is the current code:
If the code is not as self-explanitory as it seems it is to me, just say so, and I can make comments.
One problem: It doesn't run. I did throw it together fairly quickly, and it probably has a simple mistake somewhere. Also, it is exceedingly un-optimized(I want to optimize for size, as long as speed is reasonable)
The purpose of the program is to output to the screen the text in string1, while wrapping the text only on spaces, if possible. Also, it should be starting after whatever line was already on the display before this program was called. I would like to keep variable use to a minimum, if possible, as the rest of the program uses quite a few variables.
Here is the current code:
Code: Select all
Lbl A
If (length(Str1)<1)
Return
If (inString(Str1," ")=1)
Then
sub(Str1,2,length(Str1)-1)->Str1
Goto A
End
If (inString(Str1," ")>16)
Then
Disp sub(Str1,1,16)
sub(Str1,17,length(Str1)-16)->Str1
Goto A
End
If (length(Str1)<16)
Then
Disp Str1
Return
End
For(X,1,16)
If (inString(Str1," ",X)>16)
Then
Disp sub(Str1,1,inString(Str1," ",X-1))
sub(Str1,1,inString(Str1," ",X-1))->Str1
Goto A
End
End
In Memory of the Maxcoderz Trophy
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
CompWiz, your code is pretty inefficient, so use this code instead. It should work for most cases, and it is relatively small and fast. Just remember to give credit. Also tell me if you find any problems with it.
Last edited by hart on Thu 19 Jan, 2006 10:05 pm, edited 1 time in total.