• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Retro Rendezvous

Connect, Collaborate and Code

  • Home
  • Recommended Resources
  • About Me
  • Contact Me
  • en EN
    • en EN
    • es ES

The Hobbit : Exploring Wilderland Completed

January 7, 2026 by Paul Bussey

This is the final version of “Exploring Wilderland” – a BBC BASIC game based on the original “The Hobbit” text adventure game by Melbourne House

This is running in Owlet, so you’ll need to click into the righthand window in order to start typing commands for the game.

Click HERE to run in Outlet

After some battling with logic bugs and memory management, I’m happy to share the working version of Exploring Wilderland.

This is a text adventure running in Mode 7 on a standard BBC Model B. While it looks like a standard adventure on the surface, underneath it’s running a simulation where NPCs (Thorin, Gandalf, Goblins, etc.) are actively competing with you.

Here is the rundown on how to play and a look under the hood for those interested in the code.

How to Play

The Objective:

The game has 10 valuable treasures scattered across 52 locations (from Beorn’s House to the Lonely Mountain). To win, you must find and TAKE all 10 items. Once your inventory holds every treasure, the game detects this and you win.

The Catch:

You aren’t alone. There are a number of NPCs (12 altogether) with some of them wandering the map. They will move between locations, open and close doors, and—most importantly—pick up and drop items. If you can’t find the Valuable Treasure, chances are a goblin (or even Thorin) has picked it up and walked off with it! You might have to follow them and wait for them to drop it.

Commands

The parser is designed for speed. You can abbreviate almost all commands.

The parser is quite basic, so if you use backspace or delete, it won’t recognise a command. Try and get commands typed in right first time!

Navigation: N, S, E, W, U (Up), D (Down), NE, SE, etc.

Interaction:

OPEN (or O): Opens a door if one is present.
CLOSE (or C): Closes a door.
TAKE (or T): Note: This command takes ALL loose objects in the current room. You do not need to type the noun (e.g., just type T, not TAKE SWORD).
DROP (or DR): Drops ALL items you are currently carrying.

Info: LOOK (L), INVENT (INV), SCORE (SC), HELP (H).

Strategy: WAIT (or WA). This passes time without moving, allowing you to see NPCs enter/leave or interact with the room. JUMP (or J) allows you to jump to a random location in the game.

Further Help

The map pretty much follows the original Hobbit text adventure, but the more random parts of the map (stuck in Goblins caves) have been toned down.

You can see the original “Guide to Playing the Hobbit” by Melbourne House to get a sense of all the locations. The location numbers in my game (in the DATA statements) match the location numbers in the book, so if you get lost, then the guide will be invaluable.

Click here for Guide to Playing the Hobbit PDF

Code Insight Under the Hood

For those looking at the listing, here is how we managed the memory on the Model B:

  1. Data Type Optimization

We were hitting memory limits, but rather than making the code unreadable by renaming every variable to A$ or X%, we optimized the data structures.
Originally, door statuses (“Open”/”Closed”) were stored as strings. We converted this to an Integer array (doorStatus%), which saves bytes for every door and is faster to process. We also stripped REM statements to claw back space.

  1. The “Living” AI (PROC_NPC)

The heart of the simulation is in PROC_NPC. Every turn, each NPC rolls a die:
They have a chance to OPEN or CLOSE a door if they are near one.
They have a chance to TAKE items if present, or DROP items if they are carrying them.
They attempt to move to adjacent rooms using the same exit data the player uses.

  1. Two-Way Door Logic

A tricky bug we solved involved doors. In many adventures, opening a door only updates the room you are standing in. In this game, PROC_OpenDoor and PROC_CloseDoor instantly calculate the location on the other side of the connection and update the exits for both rooms simultaneously. This means if Gandalf opens a door from the inside, you can walk in from the outside immediately.

Tweaking the Game

If you paste the code into your emulator and want to mess around, here are the key lines to look at:

Line 280 – Sets the starting location (normally set to 6) – so you can get the game to start in locations 1-52

Change the AI Personality (Line 924)

Currently, the code is: 924 action=RND(4)
This gives NPCs a 25% chance to try Opening, Closing, Taking, or Dropping.
Change it to RND(10) to make them less hyperactive (they will mostly just walk around).
Change it to RND(2) if you want a chaotic game where doors are constantly slamming shut!

Change the Win Condition (Line 670)

Currently, you need all 10 items (LEN(Inventory$)/2=NoOfObj%). You can lower this number if you want a quicker game.

I hope you enjoy exploring Wilderland!

Filed Under: Uncategorized

Primary Sidebar

Footer

The Venue

We meet at the Falkirk Business Hub.

Learn more about it here

The blog

Learn about my “rediscovery” of the BBC Micro B here in my blog

Recommended Resources

As I discover them I’ll be logging useful resources for Acorn machines HERE.