ForumsProgramming ForumThy DungeonCalc!

7 5079
ubertuna
offline
ubertuna
2,123 posts
Shepherd

I was recently playing around with the program editor on my Calculator when I realised how easy it would be to make a "text adventure" style game using "If...ElseIf...Else...EndIf" and "Lbl...Goto" commands. I decided that I would make a calculator version of Homestarrunner.com's Thy Dungeonman! I am about 2/3 of the way done and when I'm finished, I'll post the code so that you guys can play it.

  • 7 Replies
nick_coolhaha
offline
nick_coolhaha
1,197 posts
Herald

Cool! I'll be looking forward to play your game haha.

X_Ray_Vision_Girl
offline
X_Ray_Vision_Girl
71 posts
Nomad

Ha ha nice it must be good.

ubertuna
offline
ubertuna
2,123 posts
Shepherd

Ok, it seems that some things need to be cleared up. For starters, I have a TI-89 Titanium graphing calculator. It comes with a program editing application. This allows me to write simple programs. I am making a game that is similar to the "dungeons and dragons" style text games. As for the code, here is a sample:
.
:
Lbl a
Disp "You are standing in yon dungeon. There is a flask, a rope, and a bone. Exits are north, south, and dennis."
Pause
ClearIO
Prompt "What shall you do",x
If x="get ye flask" Then
ClearIO
Disp "You cannot get ye flask. ye flask is bolted to the wall."
Pause
ClearIO
Goto a
ElseIf x="go north" Then
ClearIO
Goto b
Else
ClearIO
Disp "That does not computeth."
EndIf
.
:

Also, when this game is done you will only be able to play it if you have a graphing calculator with a program editor.

LordBob
offline
LordBob
517 posts
Nomad

you should make it a menu that will clear up confusion
Lbl A
Menu "What shall you do", "get ye flask",1,"go north",2."etc etc

Lbl 1
Disp "You cannot get ye flask"
Pause
GOTO A

ubertuna
offline
ubertuna
2,123 posts
Shepherd

Making a menu defeats the purpose of having a text adventure. Also, after about 4 hours of programming, the game is finally complete and I have eliminated most glitches. I will post all of the code tomorrow, there is a pretty fair amount of it and I don't feel like typing it all right now. I would appreciate it if anybody that has the right type of calculator (TI-89 or TI-89 Titanium) would volunteer to test the game and give feedback on it.

ubertuna
offline
ubertuna
2,123 posts
Shepherd

An UberPixel Production...


THY DUNGEONCALC (Beta 1)!


A Not-So-Epic Text Adeventure!

To play:
1. Go here to download TI Connect for your calculator.
2. Launch the TI Data editor, then create a new program file.
3. Copy/paste this code into your file:

dungeon()
Prgm
Disp "ye olde instructions"
Disp "type commands in quotes"
Disp "useth ye olde tounge"
Disp "get ye flask,go to"
Disp "yon dungeon"
Pause
ClrIO
Disp "UberPixel Presentsâ¦"
Pause
ClrIO
Disp "THY DUNGEONCALC"
Pause
ClrIO
Disp "A Not-So-Epic Text"
Disp "Adventure"
Pause
Lbl a
ClrIO
Disp "you are standing in yon"
Disp "dungeon. there is a rope,"
Disp "a flask, and a bone. exits"
Disp "are north, south, and"
Disp "dennis."
Pause
ClrIO
Disp "what shall you do?"
Prompt a
If a="get ye flask" Then
ClrIO
Disp "you cannot get ye flask."
Disp "ye flask is bolted to the"
Disp "wall."
Pause
ClrIO
Goto a
ElseIf a="get ye rope" Then
ClrIO
Disp "ye rope is acctually a"
Disp "snake! it bites you and"
Disp "you die."
Pause
ClrIO
Goto m
ElseIf a="get ye bone" Then
ClrIO
Disp "ye bone is old amd rotten."
Disp "it gives you ye plague!"
Pause
ClrIO
Goto m
ElseIf a="go north" Then
ClrIO
Goto b
ElseIf a="go south" Then
ClrIO
Goto c
ElseIf a="go to dennis" Then
ClrIO
Goto d
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto a
EndIf
Lbl b
Disp "you go north. you reach"
Disp "a cliff with spikes at the"
Disp "bottom. exits are south."
Pause
ClrIO
Disp "what shall you do?"
Prompt b
If b="go south" Then
ClrIO
Goto a
ElseIf b="go down" Then
ClrIO
Disp "ye spikes!"
Pause
ClrIO
Goto m
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto b
EndIf
Lbl c
Disp "you go south. you see a"
Disp "trinket. exits are north."
Pause
ClrIO
Disp "what shall you do?"
Prompt c
If c="get ye trinket" Then
ClrIO
Disp "what luck! you have found"
Disp "ye shiny golden trinket!"
Pause
ClrIO
Goto e
ElseIf c="go north" Then
ClrIO
Goto a
Else
ClrIO
Disp "that does not comuteth."
Pause
ClrIO
Goto c
EndIf
Lbl d
Disp "you arrive at dennis. he"
Disp "is wearing a frock coat"
Disp "and a jimber-jam. he paces"
Disp "nervously. exits are yon"
Disp "dungeon."
Pause
ClrIO
Disp "what shall you do?"
Prompt d
ClrIO
If d="talk to dennis" Then
ClrIO
Disp "dennis turns toward you"
Disp "and speakethsâ¦"
Pause
ClrIO
Disp "leave me alone, i lost my"
Disp "golden trinket."
Pause
ClrIO
Goto d
ElseIf d="go to yon dungeon" Then
ClrIO
Goto a
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto d
EndIf
Lbl e
Disp "you go south. you see no"
Disp "trinkets. exits are north."
Pause
ClrIO
Disp "what shall you do?"
Prompt e
If e="get ye trinket" Then
ClrIO
Disp "you already have ye"
Disp "trinket!"
Pause
ClrIO
Goto e
ElseIf e="go north" Then
ClrIO
Goto f
Else
ClrIO
Disp "that does not comuteth."
Pause
ClrIO
Goto e
EndIf
Lbl f
Disp "you are standing in yon"
Disp "dungeon. there is a rope,"
Disp "a flask, and a bone. exits"
Disp "are north, south, and"
Disp "dennis."
Pause
ClrIO
Disp "what shall you do?"
Prompt f
If f="get ye flask" Then
ClrIO
Disp "you cannot get ye flask."
Disp "ye flask is bolted to the"
Disp "wall."
Pause
ClrIO
Goto f
ElseIf f="get ye rope" Then
ClrIO
Disp "ye rope is acctually a"
Disp "snake! it bites you and"
Disp "you die."
Pause
ClrIO
Goto m
ElseIf f="get ye bone" Then
ClrIO
Disp "ye bone is old amd rotten."
Disp "it gives you ye plague!"
Pause
ClrIO
Goto m
ElseIf f="go north" Then
ClrIO
Goto n
ElseIf f="go south" Then
ClrIO
Goto e
ElseIf f="go to dennis" Then
ClrIO
Goto g
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto f
EndIf
Lbl g
Disp "you arrive at dennis. he"
Disp "is wearing a frock coat"
Disp "and a jimber-jam. he paces"
Disp "nervously. exits are yon"
Disp "dungeon."
Pause
ClrIO
Disp "what shall you do?"
Prompt g
If g="talk to dennis" Then
ClrIO
Disp "dennis turns toward you"
Disp "and speakethsâ¦"
Pause
ClrIO
Disp "leave me alone, i lost my"
Disp "golden trinket."
Pause
ClrIO
Goto g
ElseIf g="go to yon dungeon" Then
ClrIO
Goto f
ElseIf g="give ye trinket" Then
ClrIO
Disp "dennis taketh ye trinket"
Disp "gleefully."
Pause
ClrIO
Disp "you have foundeth my"
Disp "trinket! you can have"
Disp "this olde rope or this"
Disp "olde wrench!"
Pause
ClrIO
Goto h
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto g
EndIf
Lbl h
Disp "you are somewhere. dennis"
Disp "is gone. you see a rope"
Disp "and a wrench. exits are"
Disp "yon dungeon."
Pause
ClrIO
Disp "what shall you do?"
Prompt h
If h="talk to dennis" Then
ClrIO
Disp "dennis hath made off with ye trinket."
Pause
ClrIO
Goto h
ElseIf h="get ye rope" Then
ClrIO
Disp "you taketh ye olde rope."
Pause
ClrIO
Goto i
ElseIf h="get ye wrench" Then
ClrIO
Disp "you taketh ye olde wrench."
Pause
ClrIO
Goto j
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto h
EndIf
Lbl i
Disp "you are standing in yon"
Disp "dungeon. there is a rope,"
Disp "a flask, and a bone. exits"
Disp "are north."
Pause
ClrIO
Disp "what shall you do?"
Prompt i
If i="get ye flask" Then
ClrIO
Disp "you cannot get ye flask."
Disp "ye flask is bolted to the"
Disp "wall."
Pause
ClrIO
Goto i
ElseIf i="get ye rope" Then
ClrIO
Disp "ye rope is acctually a"
Disp "snake! it bites you and"
Disp "you die."
Pause
ClrIO
Goto m
ElseIf i="get ye bone" Then
ClrIO
Disp "ye bone is old amd rotten."
Disp "it gives you ye plague!"
Pause
ClrIO
Goto m
ElseIf i="go north" Then
ClrIO
Goto k
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto i
EndIf
Lbl j
Disp "you are standing in yon"
Disp "dungeon. there is a rope,"
Disp "a flask, and a bone. exits"
Disp "are north."
Pause
ClrIO
Disp "what shall you do?"
Prompt j
If j="get ye flask" Then
ClrIO
Disp "you cannot get ye flask."
Disp "ye flask is bolted to the"
Disp "wall."
Pause
ClrIO
Goto j
ElseIf j="get ye rope" Then
ClrIO
Disp "ye rope is acctually a"
Disp "snake! it bites you and"
Disp "you die."
Pause
ClrIO
Goto m
ElseIf j="get ye bone" Then
ClrIO
Disp "ye bone is old amd rotten."
Disp "it gives you ye plaguej"
Pause
ClrIO
Goto m
ElseIf j="go north" Then
ClrIO
Goto l
ElseIf j="use ye wrench" Then
ClrIO
Disp "you use dennis's olde"
Disp "wrench to remove ye flask"
Disp "from ye dungeon wall."
Disp "the long sought after"
Pause
ClrIO
Disp "flask is finally yours!"
Disp "â¦but you'r still trapped"
Disp "in yon dungeon. enjoy"
Disp "starving!"
Pause
Goto m
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto j
EndIf
Lbl k
Disp "you go north. you reach"
Disp "a cliff with spikes at the"
Disp "bottom. exits are south."
Pause
ClrIO
Disp "what shall you do?"
Prompt k
If k="go south" Then
ClrIO
Goto i
ElseIf k="go down" Then
ClrIO
Disp "ye spikes!"
Pause
ClrIO
Goto m
ElseIf k="use ye rope" Then
Disp "you use dennis's olde rope"
Disp "to absail down ye cliff."
Disp "thou hath reachethed"
Disp "freedom! you change thy"
Pause
ClrIO
Disp "name to kigalonian and"
Disp "live to a ripe old age,"
Disp "at which time the kerrek"
Disp "killeth thee."
Goto m
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto k
EndIf
Lbl l
Disp "you go north. you reach"
Disp "a cliff with spikes at the"
Disp "bottom. exits are south."
Pause
ClrIO
Disp "what shall you do?"
Prompt l
If l="go south" Then
ClrIO
Goto j
ElseIf l="go down" Then
ClrIO
Disp "ye spikes!"
Pause
ClrIO
Goto m
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto l
EndIf
Lbl n
Disp "you go north. you reach"
Disp "a cliff with spikes at the"
Disp "bottom. exits are south."
Pause
ClrIO
Disp "what shall you do?"
Prompt n
If b="go south" Then
ClrIO
Goto f
ElseIf n="go down" Then
ClrIO
Disp "ye spikes!"
Pause
ClrIO
Goto m
Else
ClrIO
Disp "that does not computeth."
Pause
ClrIO
Goto n
EndIf
Lbl m
Disp "game over"
Pause
ClrIO
Disp "restart?"
Prompt m
If m="yes" Then
ClrIO
Goto a
ElseIf m="no" Then
ClrIO
Stop
Else
ClrIO
Disp "that does not computeth."
Goto m
EndIf
EndPrgm

4. Save the file to your calculator.
5. To run the game, go to the "home" screen on your calculator and type in "dungeon()".

Instructions are included in the game, but here is a more detailed set:

1.You must type stuff in order to do stuff.
2.Everything that you type has to be in quotes.
3.You must use "ye olde tounge," so instead of typing "take flask" you have to type "get ye flask".
4.Only certain commands work. Here is a list:
go
get
give
use
If you tpe in an invalid command, you will get a message saying "That does not computeth."

If you find any bugs/glitches/errors, please post.

Enjoy!

ubertuna
offline
ubertuna
2,123 posts
Shepherd

Where ever you see "â¦" put "..."

Showing 1-7 of 7