Terrapin Resources

Turtle Tuesdays Home

Turtle Tuesdays Archives

Click a month below to see its challenges. Click the See the solutions link to open the PDF in a new tab. Solutions are posted the following week.

Current and Past Challenges & Solutions (in PDFs)

“So incredibly important to start our youngest learners on a path to coding literacy—this program is engaging and effective.” Eileen H.

Welcome to Turtle Tuesdays!

Turtle Tuesdays offers fun programming challenges for Logo and (sometimes) Pro-Bot, InO-Bot, and Kinderlogo users. These challenges are also posted every Tuesday on Facebook and Instagram. All the challenges are archived here, with links and solutions in the sidebar. Easier designs await younger learners, while older students can tackle more difficult challenges. All students will enjoy creating code that makes their project special to them as they explore new commands. Encourage students to work collaboratively on projects.

If you don’t already have Logo, get the 14-day Free Trial and start coding!
Get an InO-Bot robot for free with a 3-year Logo Household License. Just $49.95 (plus S&H) for years of coding fun!
InO-Bot follows your Logo commands, just like the original floor turtle.


Turtle Tuesdays Challenge for July 2026

Let’s create a text-based adventure!

This month, Turtle Tuesdays will be totally different! You’ll embark on a month-long coding project in Logo. We’re going to create a text-based adventure program. (Get the 14-day Logo trial version here, if you don’t already have Logo.)

We’ll get you started and you can come back to this page every few days to get new hints and snippets of code to use. Some steps are easy and won’t take much time. Other parts are a bit more complicated, but we’ll guide you every step of the way. By the end of the month, you’ll have an adventure you’ll be proud of.

To do this project, you will need to know how to write procedures and create variables. If you haven’t done this before, you can follow the instructions in the Logo Works: Lessons in Logo book, which you can access with your Logo login code from this page.

Click to expand and read each section of the guide below to create your adventure game. New sections will be available every few days, so check back often.

Read First: About the Project

Together, we’ll create a text-based adventure game. The adventure will take place in a Mystery Mansion. You will enter commands to move from room to room, look at what’s in each room, explore items to get more details, take items that are useful, and eventually solve the mystery.

We’ll give you tips every step of the way. Your adventure can be as simple or as complex as you want, but it’s best to start with a simple plan and build on it after the basic program works.

This project will use property lists. If you haven’t used property lists before, no worries. You will soon learn how useful they can be. This adventure game is a perfect opportunity to use property lists. Rooms have properties, and the objects in them have properties.

The great thing about the design we will use is that you can easily create an entirely different adventure game by changing information in just two procedures. In October, you could turn it into a Haunted House. In December, it could become Santa’s Village.

There are many steps to this project. Every few days, you can open up the next step on this page.

You may find it useful to team up with someone as you create your program. Bouncing ideas off another person can make your project better. Your adventure “buddy” doesn’t have to be a programmer, just someone who is interested in your project and willing to help you think through it.

FYI: One of the earliest and most popular text adventure games was Zork, released 49 years ago (1977) to run on a PDP-10 mainframe computer. It was developed at MIT a little after Logo was created there. Read more about Zork.

Let’s get started! Go to Step 1.

Step 1: Create a map of the rooms in your mansion.

Shown at the right is a sample map of a mansion. It will serve as our guide as we code the adventure.

Your first job is to create a map of rooms in your mansion. There don’t need to be many rooms. Start with just a few. You can always add or remove rooms later. You don’t have to use the rooms shown here.

The only rules are:
• Each room has to share a wall with at least one other room.
• The name of the room can’t have a space in it. Use an underscore character instead of a space.

Come back in a couple of days to see how to use property lists in Step 2 so you can move from room to room in your mansion.

Click to download a PDF of Step 1.

Step 2: Set up how to get from room to room.

Click to download a PDF of Step 2.

Have you created a map of rooms in your mansion? Great! (If you haven’t, go do it now.)

Today, you will create commands so the player can move from room to room in your mansion.

To move around the mansion, you will use these directional commands: NORTH, SOUTH, EAST, WEST

Make a procedure called SETUP in the Logo Editor that will create your mansion and everything in it.

TO SETUP

END

The SETUP procedure should include an instruction that stores the names of the rooms in a variable, like this:

MAKE "ROOMS [ENTRY DINING_ROOM LIBRARY ...]

Next, choose the room that the player starts in. In our mansion, the room is called ENTRY. Put this instruction in the SETUP procedure, using the name of your starting room:

MAKE "ROOM "ENTRY

Your SETUP procedure now looks something like this:

TO SETUP
MAKE "ROOMS [ENTRY DINING_ROOM LIBRARY ...]
MAKE "ROOM "ENTRY
END

Create a new procedure named SETUP_MAP. It will be called by the SETUP procedure.

TO SETUP_MAP

END

TO SETUP
SETUP_MAP
MAKE "ROOMS [ENTRY DINING_ROOM LIBRARY ...]
MAKE "ROOM "ENTRY
END

In the SETUP_MAP procedure, you will create a property list for each room. The property list will have a direction word followed by the room you get to if you type that direction. You will use the PPROPS command, a handy way to store multiple properties in a property list.

The name of the property list we will create first is "ENTRY, the name of the room.

Look at our mansion map. There is only one way to leave the ENTRY. If you go North from the ENTRY, you get to the HALL. If you try to go anywhere else, nothing is there.

PPROPS "ENTRY [NORTH HALL EAST NOTHING SOUTH NOTHING WEST NOTHING]

The property list has the property NORTH with a value of HALL. All the other directions have a value of NOTHING.

The Living_Room has rooms in all directions, so its property list will look like this:

PPROPS "LIVING_ROOM [NORTH GAME_ROOM EAST LIBRARY SOUTH HALL WEST DINING_ROOM]

Do you see how that works? If you go North from the Living Room, you get to the Game_Room. If you go East, you get to the Library. If you go South, you go back to the Hall. If you go West, you go to the Dining_Room.

Figure out the property list for each room in your mansion and put them all in the SETUP_MAP procedure. You’ll have a separate line for the property list for each room with its list of properties showing the direction words that will take you to a different room. Each direction word has either the name of a room or NOTHING. Make sure there is an even number of items in your property list.

The property list for each room will eventually contain many different properties.

Now that you have defined where the player can go from each room, you need to create procedures for those direction commands. The directional commands will use a GO_ROOM procedure that you will write in just a moment, after you have created these four procedures. Type these procedures into the editor.

TO NORTH
GO_ROOM "NORTH
END

TO EAST
GO_ROOM "EAST
END

TO SOUTH
GO_ROOM "SOUTH
END

TO WEST
GO_ROOM "WEST
END

The GO_ROOM procedure takes a direction as input, as in GO_ROOM "WEST. The procedure looks like this:

TO GO_ROOM :DIRECTION
MAKE "DIRECTION GPROP :ROOM :DIRECTION
IF :DIRECTION = "NOTHING THEN PRINT [YOU CAN'T GO THAT WAY.] STOP
MAKE "ROOM :DIRECTION
(PRINT [YOU ARE NOW IN THE] :ROOM)
END

You can just use these procedures as they are written, but for those who are curious, let’s see how the GO_ROOM procedure works.

The first line uses GPROP (short for Get Property) to look up the room that is in the direction of the input word in the property list for the current room, stored in the variable :ROOM.

MAKE "DIRECTION GPROP :ROOM :DIRECTION

If you type GPROP "ENTRY "NORTH, GPROP looks up what room is north of ENTRY. The result is "HALL. So, the instruction above sets the value of :DIRECTION to "HALL.

If there isn’t a property for the direction you type, you are told you can’t go that way.
IF :DIRECTION = "NOTHING THEN PRINT [YOU CAN'T GO THAT WAY.] STOP

If there is a room in the direction of the input, then you set that new room to be the current room and tell the player where they are now.
MAKE "ROOM :DIRECTION
(PRINT [YOU ARE NOW IN THE] :ROOM)

Let’s see if it works. After creating the GO_ROOM and the direction word procedures (NORTH, SOUTH, EAST, and WEST) in the Editor, click Run to execute the SETUP procedure.
If you are in the ENTRY and type SOUTH, what will you see? YOU CAN'T GO THAT WAY.
If you are in the ENTRY and type NORTH, what will you see? YOU ARE NOW IN THE HALL.

Don’t worry if you don’t yet fully understand the GO_ROOM procedure, as it is a bit complicated. You can just type it in and get it working.

After you have entered property lists for all the rooms and you can navigate to and from all the rooms (do lots of testing!), we’ll add objects to find and explore.

Remember to save your program!

Come back in a couple of days to add more to your adventure!

Step 3: Add instructions for the player.

Click to download a PDF of Step 3.

In our game, we give the player some tips on how to explore the adventure. Your directions might be different, but here is how our game starts.

You are in the main entry of the Mystery Mansion.
Type NORTH, SOUTH, EAST, or WEST to go to a different room.
Draw a map of the rooms so you know how to get around easily.
Type WHERE to see your current room.
Type LOOK to see what is in the room.
Type EXPLORE to check out an item.
Type TAKE to move an item into your inventory.
Type INVENTORY to see items you have found.

We tell the player where they are and the direction words to use to go from room to room.

We suggest that the player draws a map of the mansion when they discover the rooms so they can easily go to any room they want at any time.

There are five additional commands they can use.

WHERE tells them the current room.
LOOK lets them see what is in the room.
EXPLORE lets them see details about what is in the room.
TAKE lets them keep some items. Not all items can be taken (more about that later).
INVENTORY tells them what they have taken.

In the SETUP procedure add these tips. You may also want to start be going to TEXTSCREEN mode and erasing any existing text with CLEARTEXT. Your procedure might look something like this:

TO SETUP
SETUP_MAP
MAKE "ROOMS [ENTRY DINING_ROOM LIBRARY ...]
MAKE "ROOM "ENTRY
MAKE "INVENTORY []
TEXTSCREEN
CLEARTEXT
PRINT "|You are in the main entry of the Mystery Mansion.|
PRINT "|Type NORTH, SOUTH, EAST, or WEST to go to a different room.|
PRINT "|Draw a map of the rooms so you know how to get around easily.|
PRINT "|Type WHERE to see your current room.|
PRINT "|Type LOOK to see what is in the room.|
PRINT "|Type EXPLORE to check out an item.|
PRINT "|Type TAKE to move an item into your inventory.|
PRINT "|Type INVENTORY to see items you have found.|
END

See how we created a variable called INVENTORY to store the items you collect? It starts out with a value of an empty list because you haven’t collected anything yet.

The last line in the Editor should be SETUP. That runs the commands in the SETUP procedure.

In this adventure, you aren’t running a main procedure. You are giving toplevel commands in the Listener window. The words you type are names of procedures that run when you tell them to.

If you type a command that the adventure doesn’t know about, such as NORTHEAST, you will see a message that the word you typed is not a procedure.
Error: NORTHEAST is not a procedure

Can you figure out how to write the procedures called WHERE and INVENTORY? You already know the names of those variables. The procedures with those names just need to print the value of the variables to the Listener window.

Tip: If the INVENTORY variable is empty, you can tell the player that they haven’t found anything yet.

You may wish to add a TIPS command that shows the available commands. You can’t use HELP because that is already a primitive. TIPS would work, though. Add TIPS to the list of available commands in the SETUP procedure.

Remember to save your program!

Come back in a couple of days to learn how to organize your adventure.

Step 4: Organize your adventure.

Click to download a PDF of Step 4.

Before you can start adding things to the rooms for the player to explore, you need to make a plan.

Don’t use Logo. Use paper and pencil, or Notepad or other app on your computer.

Figure out what objects the player might find. Think of what the objects’ properties might be.

• What do they see when they look around the room?
• Does the room have an object in it?
• Can they take the object?
• What is special about the object? What do they see if they “explore” the object?
• Do they need to take the object now so they can use it later in some other room?
• How do you want the adventure to end? The player will want to solve it. It is called Mystery Mansion! Perhaps the player needs to have certain items in Inventory and be in a particular room to make something special happen. Do they need to have visited all the rooms?

You have a lot to figure out! Write it down so you have a plan to follow. Talk to your adventure “buddy” to bounce around ideas. Two heads are better than one, as they say!

Step 5: Set up your rooms.

Click to download a PDF of Step 5.

Now that you have decided what is in each room, you can start adding more details to your code.

The SETUP_MAP procedure that allows you to move from room to room can also include what people see if they type the LOOK command.

LOOK will be a property list within each room’s main property list. Just add another property called LOOK followed by a list of words that describe what the player will see when they look at the room.

Perhaps the Living Room has a beautiful rug on the floor. Then, the LIVING_ROOM code in the SETUP_MAP procedure would look like this:

PPROPS "LIVING_ROOM [
NORTH GAME_ROOM
EAST LIBRARY
SOUTH HALL
WEST DINING_ROOM
LOOK [YOU SEE A BEAUTIFUL RUG ON THE FLOOR.]
]

Note that you can press or after each property name and value so each one is on a separate line. That makes it easier to read. Just be sure to put the break after the first left bracket,`[`.

In order for players to look at the room, you’ll need to create a LOOK procedure. It looks up the value of the LOOK property in the current room’s property list.

TO LOOK
PRINT GPROP :ROOM "LOOK
END

In this example, if the player is in the Living Room and types LOOK, they will see this:
YOU SEE A BEAUTIFUL RUG ON THE FLOOR.

If there is nothing special to see in a room, the value of the LOOK property can be [THERE IS NOTHING TO SEE HERE.].

Remember to save your program!

Use your imagination and be creative as you design your adventure!

Step 6: Set up your objects.

Click to download a PDF of Step 6.

Have you decided what objects are in each room? Not every room needs to have an object.

To see what object is in a room, the player will type EXPLORE. We’ll get to that procedure shortly.

First let’s determine what properties an object might have and what conditions might occur.

• Can the player take the object? (Some may be too large or heavy.)
• What do you tell the player after they take the object?
• Does the player need to take the object in order to complete part of the adventure?
• Has the room been explored before and the object taken?
• Is there any particular action that occurs when they visit the room or take the object?

Create a SETUP_ITEMS procedure that will store all this information for each room. It is similar in structure to the SETUP_MAP procedure, but deals specifically with the objects the player finds. The beginning of this procedure might look like this:

TO SETUP_ITEMS
; set up the items, what is REQUIRED, etc.
PPROPS "ENTRY [
ITEM HAT ; the item that lies here
REQUIRED NOTHING ; nothing REQUIRED to TAKE that item
REMOVABLE TRUE ; you can take that item
EXPLORED FALSE ; true after EXPLORE has been called, FALSE to prevent TAKE
EXPLORE [THERE IS A HAT ON A HOOK.]
TAKE [YOU PUT THE HAT ON.]
ACTION [] ; an action that TAKE performs in the background
]
END

Here is what this code means and the details of each of these properties for objects:

• The first property in the room’s property list names the object that the player will find in the current room. The name of the property is ITEM and its value is what the item is, a HAT in this example.

• In the next line, the REQUIRED property indicates whether or not the item must be in Inventory when the player is in a specific room. If the value is NOTHING, then it is not required to complete the adventure. For example, if the game requires that the player has a MAP when in the LIBRARY, the property list in the LIBRARY property list would be REQUIRED MAP. The MAP would need to be an object that can be taken in a different room.

• The REMOVABLE property says whether or not the object in the room can be taken. Its value is either TRUE or FALSE. An object that can’t be removed is not required to finish the game.

• The EXPLORED property is either TRUE or FALSE. Its initial value is FALSE. When you explore a room, the EXPLORE procedure sets it to TRUE. This prevents the player from taking an object more than once. You can also use this property to determine if the player has explored every room.

• The value of the EXPLORE property is what the player sees when they type EXPLORE.

• The value of the TAKE property is what the player sees when they type TAKE. When they take an object, it goes into their Inventory.

• The value of the ACTION command is what might occur in that room. There is no ACTION command for the player to type. The action takes place behind the scenes. It might set a property, give you a hint, or even open up a new room! Most of the time the value of action will be [], or nothing.

The first set of properties in the procedure above is for the room named ENTRY. You can create a similar property list for each room. Give it a try!

You will need an EXPLORE procedure. This procedure, shown below, does two things:

  1. It displays text for the player to read.
  2. It changes the value of the EXPLORED property of that room to TRUE. That allows you to take it item (if it is removable).

TO EXPLORE
PRINT GPROP :ROOM "EXPLORE
PPROP :ROOM "EXPLORED TRUE
END

Now you need to add SETUP_ITEMS to the SETUP procedure you type to run the code.

TO SETUP
SETUP_MAP
SETUP_ITEMS
MAKE "ROOM "ENTRY
MAKE "INVENTORY []
TEXTSCREEN
CLEARTEXT
PRINT "|You are in the main entry of the Mystery Mansion.|
END

This part of the adventure is a bit tricky. You will have a lot of testing to do!

Remember to save your program!

A special gift awaits…

At the end of August, we will post our adventure game in the Logo Programming Library.

Coders who send us a completed and (hopefully) bug-free adventure by August 15 will receive a certificate from Terrapin by email. We will choose up to three submitted programs to feature in the Logo Programming Library! We’ll be looking for creativity and clean code.

Use this form to tell us you have completed the adventure: www.terrapinlogo.com/forms/share.html

We’ll take a look at your program, see if it qualifies, and let you know if you are a winner. There might even be a prize for you.

What if you have questions?

If you have any questions about coding your adventure, just ask us. We can look at your program and figure out why things aren’t working as you want. Let us know you would like help with your program and we will be in touch. Use this form: www.terrapinlogo.com/forms/share.html

Search Results for ""