Author Topic: [video] How to Code a Text Adventure Game!  (Read 2801 times)

0 Members and 1 Guest are viewing this topic.

Offline johannhowitzer

  • Forum Regular
  • Posts: 118
    • View Profile
[video] How to Code a Text Adventure Game!
« on: July 18, 2021, 04:52:33 am »
This is a 20-minute tutorial on a smart way to code a text adventure in QB64.  Organizing your code in the way shown in this tutorial will make it much easier to keep track of things, and hopefully save you a lot of work.


Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: [video] How to Code a Text Adventure Game!
« Reply #1 on: July 18, 2021, 09:01:16 am »
Ok. I watched your video and found that the very first point you made was wrong... You stated that is was a 20 minute video when in fact it was 19:08 minutes!
Nah kidding. The video was brilliant. Explained how things were put together without overdoing the minutia. Which is 'my' way of saying that it was easy enough for even me to follow... I immediately opened "The Safe House"... I like the one or two word commands. Kept quite simple. I like simple. The descriptions of objects and locations certainly got the imagination going... Adding the 'Template' to the code was a great idea. Certainly helps to keep all the location information consistent should one want to add more 'rooms'. I will be going over the code, more thoroughly, after some much needed sleep.

Many thanks for the video. Very helpful.

J
« Last Edit: July 18, 2021, 09:02:54 am by johnno56 »
Logic is the beginning of wisdom.

FellippeHeitor

  • Guest
Re: [video] How to Code a Text Adventure Game!
« Reply #2 on: August 14, 2021, 10:16:04 pm »
Thanks for sharing, @johannhowitzer !

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: [video] How to Code a Text Adventure Game!
« Reply #3 on: August 14, 2021, 11:04:53 pm »
Please see my YouseTube (Italian version) tutorial for how to actually make a video run for 20 minutes.

Sorry I can't view it now. Something weird about the sound level. I can barely hear it at full volume on both the YouTube setting and my computer speakers setting, both at 100%. Maybe tomorrow morning, when the house isn't so lively. Yes Johnno, the house is the only thing lively around here! Actually, The f'idiots at Google could do a far better job if they introduced video sound recording standards.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: [video] How to Code a Text Adventure Game!
« Reply #4 on: August 15, 2021, 01:22:09 pm »
Okay, I had some quite time this morning to listing to and view the vid. The most important part is relating the high level of complexity that are the nature of a text adventure game. Tis includes the coding structure, and the highly sophisticated input and output requirements such games are based on. All of these advanced programming components are made possible in QB64, because it provides coders access to the incredible powers of SCREEN 0. That said, like I don't say it enough around here, the tutorial was easy to view, had good flow, and covered a lot of content. I found it to be well focused, and complete. I wouldn't recommend it for a beginner, but for someone who already understands how to incorporate subs and pass variables, I think the structural overview of this tutorial would be very beneficial.

Personally, I don't use constants, but prefer arrays with instr() to parse through what you do with constants and flags. I'm not saying it is a better method, because I don't make text games, so I would be open to trying your approach if I ever started such a project.

If you want to take this tutorial a step further, an idea I had, while viewing it, is to make a second tutorial to create a one room text game, using the structural components you outlined, but small enough that you could code and explain it in full, in another 20-min video. Something like a 150-line example program for movement and picking up objects, and maybe opening one door. Just a thought.

You have a good voice for making tutorials, but please mike up next time. I want the neighbors to be able to hear you next time. Those idiots use FreeBASIC!

Thanks for posting this. Maybe I'll be able to scrap my Ghost Town II project, after all.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/