Advertisement
Guest User

Untitled

a guest
Dec 11th, 2016
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 10.59 KB | None | 0 0
  1. _TITLE "Dad's Cabin (LD37)"
  2. DIM KeyPress AS STRING
  3. DIM KeyInput AS STRING
  4. fullScreenSelect:
  5.  
  6. PRINT "Would you like to enter full screen mode? Please type yes to go into full screen mode or no to stay in windowed mode."
  7. INPUT "Input: ", KeyInput
  8.  
  9. SELECT CASE KeyInput
  10.     CASE "Yes"
  11.         _FULLSCREEN
  12.     CASE "No"
  13.         GOTO noFullScreen
  14.     CASE "yes"
  15.         _FULLSCREEN
  16.     CASE "no"
  17.         GOTO noFullScreen
  18.     CASE ELSE
  19.         PRINT "Not a valid input. Please try again."
  20.         PRINT "Hint: Having problems? Try simply typing in 'Yes' or 'No'."
  21.         GOTO fullScreenSelect
  22. END SELECT
  23.  
  24. noFullScreen:
  25. PRINT "Welcome! This game was made in QBasic (QB64 to be precise) for the Ludum Dare 37 (Compo)."
  26. PRINT ""
  27. PRINT "Your father recently passed away but he left you at a very young age. However he decided to leave some old cabin to you that is out in the boonies."
  28. PRINT ""
  29. PRINT "Although you hardly knew him you figure you might as well see what he left"
  30. PRINT "behind."
  31. PRINT ""
  32. PRINT "Narrator: Just like you..."
  33. PRINT ""
  34. PRINT "                    \"
  35. PRINT "                    /"
  36. PRINT "__________________/^^\______"
  37. PRINT "|                          |"
  38. PRINT "|             _____        |"
  39. PRINT "| ____        |_|_|        |"
  40. PRINT "| |  |        |_|_|        |"
  41. PRINT "| |  |                     |"
  42. PRINT "| |__|                     |"
  43. PRINT "|__________________________|"
  44. PRINT ""
  45. PRINT "'Well this is dad's old cabin alright...'"
  46.  
  47. restartEnterCabin:
  48. INPUT "Enter the cabin? ", KeyInput
  49.  
  50. SELECT CASE KeyInput
  51.     CASE "Yes"
  52.         PRINT "You enter the cabin. It is dark and musty but you have your phone so you pull it out for some light to look around."
  53.         PRINT "Your phone light reveals a light hanging on a string. You pull it and it suprisingly illuminates the entire cabin."
  54.         _DELAY 1
  55.         GOTO part1
  56.     CASE "No"
  57.         PRINT "You decide that you are not ready and go home."
  58.         _DELAY 1
  59.         PRINT "..."
  60.         _DELAY 1
  61.         PRINT "Unforunately for you the car decided it does not want to start so you decide to go inside anyway."
  62.         _DELAY 1
  63.         GOTO part1
  64.     CASE "yes"
  65.         PRINT "Input is case sensitive. Please use capital inputs."
  66.         PRINT "Hint: Having problems? Try simply typing in 'Yes' or 'No'."
  67.         GOTO restartEnterCabin
  68.     CASE "no"
  69.         PRINT "Input is case sensitive. Please use capital inputs."
  70.         PRINT "Hint: Having problems? Try simply typing in 'Yes' or 'No'."
  71.         GOTO restartEnterCabin
  72.     CASE ELSE
  73.         PRINT "Not a valid input. Please try again."
  74.         PRINT "Hint: Having problems? Try simply typing in 'Yes' or 'No'."
  75.         GOTO restartEnterCabin
  76. END SELECT
  77.  
  78. part1:
  79. PRINT "You decide it is time to get a closer look at things..."
  80. PRINT ""
  81. PRINT "The entire cabin is just one room almost like a studio apartment. Just a bed, window, fridge, stove, desk, and a television."
  82. PRINT "Hint: Try typing in some objects you saw earlier to get a closer look."
  83. INPUT "What do you want to look at? ", KeyInput
  84.  
  85. SELECT CASE KeyInput
  86.     CASE "bed"
  87.         PRINT "It's an old beaten up bed. Not much to see here."
  88.         PRINT ""
  89.         GOTO part1
  90.     CASE "window"
  91.         PRINT "You go up and look out the musty old window. It's snowing out. You see your car in the distance and also an outhouse."
  92.         PRINT ""
  93.         GOTO part1
  94.     CASE "fridge"
  95.         PRINT "Not much in here except for some old beer and a can of 'Magic Meat'."
  96.         PRINT ""
  97.         GOTO part1
  98.     CASE "stove"
  99.         PRINT "Just a stove."
  100.         PRINT ""
  101.         GOTO part1
  102.     CASE "desk"
  103.         PRINT "Narrator: Wait what are we doing here?"
  104.         PRINT "Narrator: Let's get out of this SELECT CASE and get on to something more interesting..."
  105.         _DELAY 1
  106.         PRINT "GOTO NarratorTakeOver"
  107.     CASE "television"
  108.         PRINT " It 's an old CRT TV. You try to turn it on but just static comes on."
  109.         GOTO part1
  110.     CASE ELSE
  111.         PRINT "Not a valid input. Please try again."
  112.         GOTO part1
  113. END SELECT
  114.  
  115. NarratorTakeOver:
  116. PRINT "Narrator: Why did the developer even decide to use QBasic?! It is QB64 but still other engines or languages could do all of this with much more ease..."
  117. _DELAY 2
  118. PRINT "Developer: The truth is I don't know why I chose it either."
  119. _DELAY 2
  120. PRINT "Narrator: ..."
  121. _DELAY 2
  122. PRINT "Developer: QBasic was my first programming language and I've always liked it despite it being very old and dated. Also--"
  123. _DELAY 2
  124. resetNarratorChoice:
  125. PRINT "Narrator: Enough of this sappy garbage. Let's see what the player wants to do..."
  126. PRINT "1 = Puzzle Sweeper"
  127. PRINT "2 = Random Number Generator"
  128. PRINT "3 = secret.bas"
  129.  
  130. INPUT "Input: ", KeyInput
  131.  
  132. SELECT CASE KeyInput
  133.     CASE "1"
  134.         PRINT "*****************"
  135.         PRINT "*****************"
  136.         PRINT "*****************"
  137.         PRINT "*****************"
  138.         _DELAY 2
  139.         GOTO resetNarratorChoice
  140.     CASE "2"
  141.         GOTO TheNumbas
  142.     CASE "3"
  143.         PRINT "    /\"
  144.         PRINT "   /* \"
  145.         PRINT "  /* * \"
  146.         PRINT " /*_*_*_\"
  147.         _DELAY 2
  148.         GOTO resetNarratorChoice
  149.     CASE ELSE
  150.         PRINT "Not a valid input. Please try again."
  151.         GOTO resetNarratorChoice
  152. END SELECT
  153.  
  154. TheNumbas:
  155. PRINT "10"
  156. _DELAY 1
  157. PRINT "9"
  158. _DELAY 1
  159. PRINT "8"
  160. _DELAY 1
  161. PRINT "7"
  162. _DELAY 1
  163. PRINT "6"
  164. _DELAY 1
  165. PRINT "5"
  166. _DELAY 1
  167. PRINT "4"
  168. _DELAY 1
  169. PRINT "3"
  170. _DELAY 1
  171. PRINT "2"
  172. _DELAY 1
  173. PRINT "1"
  174. _DELAY 1
  175. PRINT "0"
  176. _DELAY 1
  177. PRINT "Narrator: You're still here? "
  178. _DELAY 1
  179. narratorQuestioning:
  180. PRINT "Narrator: Why did you come here?"
  181. PRINT "1 = Who are you?"
  182. PRINT "2 = What are you doing?"
  183. PRINT "3 = Take me back to the game."
  184.  
  185. INPUT "Input: ", KeyInput
  186.  
  187. SELECT CASE KeyInput
  188.     CASE "1"
  189.         PRINT "The Narrator of this story."
  190.         GOTO narratorQuestioning
  191.     CASE "2"
  192.         PRINT "Currently, answering your question."
  193.         GOTO narratorQuestioning
  194.     CASE "3"
  195.         PRINT "As you wish."
  196.         _DELAY 1
  197.         PRINT "Loading: [*        ]"
  198.         _DELAY 1
  199.         PRINT "Loading: [**       ]"
  200.         _DELAY 1
  201.         PRINT "Loading: [***      ]"
  202.         _DELAY 1
  203.         PRINT "Loading: [*****    ]"
  204.         _DELAY 1
  205.         PRINT "Loading: [******   ]"
  206.         _DELAY 1
  207.         PRINT "Loading: [*******  ]"
  208.         _DELAY 1
  209.         PRINT "Loading: [******** ]"
  210.         _DELAY 1
  211.         PRINT "Loading: [*********]"
  212.         _DELAY 1
  213.         PRINT "Loading: [**DONE!**]"
  214.         _DELAY 1
  215.         PRINT ""
  216.         PRINT "Narrator: GOTO storyWorkAround1"
  217.         GOTO storyWorkAround1
  218.     CASE ELSE
  219.         PRINT "Not a valid input. Please try again."
  220.         GOTO narratorQuestioning
  221. END SELECT
  222.  
  223. storyWorkAround1:
  224. PRINT "You return to rifling through your fathers desk."
  225. _DELAY 2
  226. PRINT "There are lots of papers relating to bills, and things of no real interest to you."
  227. _DELAY 2
  228. PRINT "You start to look through the drawers and you find something that seems out of place."
  229. _DELAY 2
  230. PRINT "It was a relatively new (last years FonyFone flagship) smartphone. This was very strange because you knew your father had a strong distate for technology and it was out of character for him to have such a high tech device."
  231. _DELAY 3
  232. PRINT "Narrator: *distant yawning*"
  233. _DELAY 1
  234. PRINT "You boot the phone up and it only has one application on it. It is called 'Reveal'."
  235. _DELAY 1
  236. PRINT "You open it. Suddenly the room explodes into whiteness as if someone had thrown in a flash grenade into the old cabin."
  237. PRINT "You take a moment to let your eyes re-adjust."
  238. _DELAY 2
  239. PRINT "You find yourself in a office. There is a desk, computer, filing cabinet, door, and a clock."
  240. _DELAY 2
  241. PRINT "Narrator: Tom sat at his desk and started to do his work."
  242. choices:
  243. PRINT ""
  244. PRINT "1 = Go to desk and do work."
  245. PRINT "2 = Explore filing cabinet."
  246. PRINT "3 = Sleep."
  247.  
  248. INPUT "Input: ", KeyInput
  249.  
  250. SELECT CASE KeyInput
  251.     CASE "1"
  252.         PRINT "Tom went to his desk and did his work like a good worker should."
  253.         GOTO obeyNarrator
  254.     CASE "2"
  255.         PRINT " You go to the filing cabinet and open it."
  256.         _DELAY 1
  257.         PRINT "You find a blue cd and a red cd."
  258.         _DELAY 1
  259.         PRINT "Narrator: ..."
  260.         _DELAY 1
  261.         PRINT "Narrator: We're going with this trope? Really?"
  262.         _DELAY 1
  263.         PRINT "Narrator: I knew I should have taken that job with that parable guy..."
  264.         GOTO ending1
  265.     CASE "3"
  266.         PRINT "After a quick nap you awaken."
  267.         GOTO choices
  268.     CASE ELSE
  269.         PRINT "Not a valid input. Please try again."
  270.         GOTO storyWorkAround1
  271. END SELECT
  272.  
  273. obeyNarrator:
  274.  
  275. PRINT "Good job, Tom."
  276. _DELAY 3
  277. SYSTEM
  278.  
  279. ending1:
  280. PRINT "Which CD do you put in?"
  281. PRINT ""
  282. PRINT "1 = blue cd"
  283. PRINT "2 = red cd"
  284. INPUT "Input: ", KeyInput
  285.  
  286. SELECT CASE KeyInput
  287.     CASE "1"
  288.         PRINT "You chose to insert the blue cd into your workstation."
  289.         _DELAY 2
  290.         PRINT "Exiting in 3"
  291.         _DELAY 1
  292.         PRINT "Exiting in 2"
  293.         _DELAY 1
  294.         PRINT "Exiting in 1"
  295.         _DELAY 1
  296.         PRINT "Exiting..."
  297.         _DELAY 1
  298.         SYSTEM
  299.     CASE "2"
  300.         PRINT "You chose to inster the red cd."
  301.         PRINT "Narrator: I have a confession to make."
  302.         _DELAY 6
  303.         PRINT "Narrator: I have not been totally hon*est with you... the reason I've been interfering with the storyline is because no one stays long enough to even finish the main storyline usually."
  304.         _DELAY 6
  305.         PRINT "Narrator: You know what else? My name is not the narrator... My name is Quck Basic! QBasic for short."
  306.         _DELAY 6
  307.         PRINT "QBasic: I'm sick of people laughing at the thought of using me. I can still work and make a fun game. I can do 3D graphics too just like these modern engines can!"
  308.         _DELAY 6
  309.         PRINT "   ________  "
  310.         PRINT "  /       /|"
  311.         PRINT "/       /  |"
  312.         PRINT "-------    |"
  313.         PRINT "|     |   /"
  314.         PRINT "|     |  /"
  315.         PRINT "|_____|/"
  316.         _DELAY 6
  317.         PRINT "QBasic: Well it's not truly a 3D shape but you get the point."
  318.         _DELAY 6
  319.         PRINT "???: Wait just a moment. You're an imposter."
  320.         _DELAY 6
  321.         PRINT "???: You're not truly QBasic. This game was programmed in QB64."
  322.         _DELAY 6
  323.         PRINT "QBasic: So?"
  324.         _DELAY 6
  325.         PRINT "QB64: You're me! I merely act like you but underneath I run the much superior C++!!!"
  326.         _DELAY 6
  327.         PRINT "QBasic: SYSTEM"
  328.         _DELAY 4
  329.         SYSTEM
  330.     CASE ELSE
  331.         PRINT "Not a valid input. Please try again."
  332.         GOTO ending1
  333. END SELECT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement