Challenge: Text Adventure


Hi Hops, can’t decide what Hopscotch project to make? Well, here you go. I’m challenging all you great coders out there to make a Text Adventure

What’s a Text Adventure?

Ok, so I don’t mean a Choose Your Own Adventure “story”. I’m referring to an entirely text-based interaction style of game where you move around and interact with a fictional world using two word commands. These commands are typically in the form of a verb & a noun, such as Take Key or Climb Tree. The objective is generally to find treasures which require solving puzzles along the way.

Each room gives a description, states Obvious Exits (generally North, South, East, West, Up, and/or Down) & Visible Items. You can carry a limited amount of items around with you and get a list of items you’re carrying using the command Inventory

Scott Adams created the first text-style adventure game for PC in 1978 (previous text adventure games could only be played on a mainframe). It was Scott Adams games and my attempts to create my own as a child that inspired my love of coding.

Here’s a list of Scott Adams classic adventures

As a tribute, I’m going to try to recreate Pirate Adventure.

Are you willing to accept the challenge and try to create a text adventure in Hopscotch. This is a genre of games entirely new to Hopscotch as far as I’m aware. Who’s in?

Tagging @Liza @awesomeonion for the nostalgia. I’m thinking you might remember these games? :smiley:

Using Bases in Hopscotch
Is it Possible to get Variables with Letters

For anyone who’s interested, let’s use this as a collaborative development topic to ask questions, post solutions for certain aspects of the code, and generally help others make a cool project!

Please, no off topic posts or spam. There’s plenty of other topics for that.


Heart this post if you want to be added to a tag list. I’d like to occasionally ask for opinions about the game/GUI design, perhaps ask for beta testing, or you might just be interested in occasional progress updates.

Text Adventure Tag List



I’ll try and make a game like that.


Text adventures? I LOVE TEXT ADVENTURES! In fact, I was considering making a text adventure in hopscotch myself!


This is an interesting concept, indeed. I might make something like this some time. I think that these kinds of games can get really popular on Hopscotch and they would also probably be really easy to understand and to play.


@Aariv @peppermintosfox @William04GamerA (all are welcome to participate)

That’s awesome. I’m glad you’re interested.

You could jump right into coding, but most likely you’ll want to do the creative part first and choose the setting & plot, design the “world” of the game, and figure out all the items & puzzles. I’d suggest making a map.

Here’s a simple, cheesy example I made up just to illustrate

You start in the Bed. And a walk through could be like this:

Read Sign
Sign says, “Bring treasures here and say Score”
Get up
Go East Going directions can be abbreviated by just typing the first letter
Go Door
I can’t do that yet. It’s locked
Unlock Door
Go Door
Climb Tree
Look Nest
I found something
*Jewel encrusted egg is added to Visible Items
Take egg
Go House
Go Bed
Say Score
You’ve found 1 of 1 treasures.
Congratulations, you won!


I already have a pretty good start on my version (made easier since I’m trying to recreate an existing game). I have a keyboard, command line & word interpreter, text displays up top, and it responds to a few commands

Text Adventure Tag List


Here’s my first question: I was originally going to recreate the iOS iPad keyboard, but then I thought it might be better to move the row of numbers above the standard layout as a keyboard “page” with numbers would have a lot of missing keys (the 2nd & 3rd row of symbols wouldn’t be needed)

Which would you prefer?

  • Number keys as shown below
  • Adding the “123” buttons & a 2nd page for the numbers

0 voters


Wow this sounds super cool!
Please tag me when you finish it!
also add me to the tag list please :)


Sure! Done. :+1:

And thanks for your vote. Just curious, if you don’t mind sharing, why the 2nd page?


I’ll start on the game ASAP!


Yeah, planning is important. Even THT suggested that you plan before you make in their old “make a quiz” video tutorial.


I’m just used to the Apple format of numbers.
Also I think it’ll be easier to click numbers if they’re bigger on another page instead of squeezed in at the top.
but it seems that everyone else likes that so maybe i’m just weird lol


Well, there was no right or wrong answer. Every opinion is valid :slightly_smiling_face:

But the iOS keyboards (that I was originally trying to replicate) don’t make the numbers larger. Essentially, if I added the “123” button, it’d switch the top row of Q-P to 1-0, while the two rows of A-M would get turned off since I don’t need the symbols that the iOS number keyboard displays on those rows.

I don’t really like having the numbers always displayed as I think it looks a bit cluttered, but I’m going to leave it that way for now…


This is certainly something to consider!


You could use the new system with swiping down on the keys to type another character.


Hi @CreationsOfaNoob. What do you mean by “new system”?

Text Adventure Tag List


Here’s what I have so far:

The development effort has 3 main components:

  • the GUI (keyboard, command line, text display)
  • a text adventure engine (interpreter)
  • the game data/logic

Game play isn’t correct yet. I just added a few rooms and items so I could develop the GUI & interpreter. The Intrepreter part of the code is intended to be generic and handle all low level functions so customized game data/logic can be added to easily create different text adventures.

Turns out that the keyboard & encoding of typed letters into words that are assigned to variables (evaluated by the interpreter) was the easiest part so far. The Interpreter & GUI text display without having string data types have been very challenging.



This topic inspired me to make this app:


That’s great! :smiley: Text based games are a relatively unexplored genre in Hopscotch. I’m looking forward to the final game! Please tag me, or feel free to discuss any development issues. :+1:

I don’t have the blinking curser or the adaptive letter spacing coded yet, but check out the keyboard and command line in the project linked just above.

The command line automatically indexes, backspaces, and calculates decimal values (base 37 encoding) of the 1st two words that are typed (displayed above in grey for development purposes).


Wow that looks so cool!!!
It definitely deserves game changers when it’s finished, I’ve never seen anything like that before on HS.