Quest – Text-based adventure game (creating a room)

If you’ve not read it yet, here is my first post about Quest/ActiveLit.

I’ve just sat down for about an hour and a half to try and create my first room in ActiveLit. I’m not going to lie, it was quite hard work, but it feels like the next room will be a lot easier now that I’ve done it once and I’m really pleased with the results.

So, the first thing I did was to create a simple map of my intended game – turns out I was definitely being over-adventurous and I would suggest you make a simple 4 room map with the children.

IMG_5051

So, my first room was hopefully fairly simple – there is a locked door which can only be opened by collecting a floppy disc from a box and using it with the BBC Micro in the corner of the room. In my mind, that wasn’t too much to ask for, but it did take me a while to get my head around the interface.

I didn’t change anything about the basic setup of the game except to activate the light and dark setting (meaning that rooms can be dark until an object is used). I wouldn’t worry too much about your basic settings for the time being – I just had a strange desire to have a torch or a light switch somewhere in one of the rooms just because it was an available option!

So the first thing I did was create a couple of rooms (I discovered that to have an active ‘locked door’ you need a room for the door to lead into so it’s no good just having one room). A key thing that you need to think about when creating a game is that in order to create interactive objects, you have to have created both of the objects (and anything else they need to interact with) before you try to set up interaction.

Screen Shot 2014-07-31 at 14.28.01

You will see from this diagram that I have two rooms – Lobby and Hallway. The hallway only has a link to the lobby exit – at the moment it is only there as a placeholder. Inside my lobby I have the player, a table (with a box containing various objects inside), a door and an old computer (which I want to be the ‘key’ to opening the door).

In the room tab you can write a description of the room, but you don’t need to list any objects as the programme will do that automatically. You can also see that I have added one exit which is to the hallway

Screen Shot 2014-07-31 at 14.28.11        Screen Shot 2014-07-31 at 14.28.21

Each of my ‘top layer’ object are listed in the lobby objects list.

Screen Shot 2014-07-31 at 14.28.32

You can choose whether to set up new objects as ‘an object’, ‘a room’ or an ‘object and/or room’. My table needs to have the box on it and then the box itself needs to contain other items so they both need to be labelled as object/rooms, whereas everything else gets to be just an object.

Screen Shot 2014-07-31 at 14.29.03Both the box and the table are turned into containers/surfaces in the features tab Screen Shot 2014-07-31 at 14.52.05and this helpfully adds the container tab to the object, allowing me to dictate whether or not it is a container or a surface – the table is labelled as a surface and I have created the box as an object within the table so that it is listed as being on top of the surface.

The cardboard box that I wanted was created as a ‘closed container’ which could be ‘opened or closed’ and I could tweak settings so that the objects inside became visible on opening, however, initially the opened box didn’t list the new objects and they didn’t appear to be discoverable until I added a ‘print message’ line in the ‘after opening the object’ tab, listing the objects inside (it seemed to automatically realise I wanted the objects hyperlinked) – for each new object I had to press the ‘add new script’ button, which allowed me to add another object or event to the action box.

Screen Shot 2014-07-31 at 14.54.02

I didn’t want the objects inside to be visible until the box was opened so when I set them up, I made them invisible by unticking the box in the setup tab.

Screen Shot 2014-07-31 at 14.56.52

I only wanted the floppy disc to be a takeable item and so in the inventory tab, for the other 2 items I simply made sure the ‘object can be taken’ box was unticked and then added a ‘take message’ along the lines of  ‘this item cannot be taken’ and gave silly reasons why each one could not be taken, whereas for the floppy disc I made sure that there was a clear message after you have taken it.

Screen Shot 2014-07-31 at 14.59.53So, finally, I had the fun bit of code to do – I wanted to be able to put the floppy disc in the computer an have it unlock the door.

When I initially set up the room, I set up the exit to the hallway, now I went into the settings for this and changed it to a locked door:

Screen Shot 2014-07-31 at 15.04.38

So now I need to create the object to unlock the door, my BBC Micro Computer

Screen Shot 2014-07-31 at 14.28.47Screen Shot 2014-07-31 at 15.07.45

By ticking the first box in the features tab, I was able to make my BBC interact with another object (I also did the same thing with the floppy disc!).

Screen Shot 2014-07-31 at 14.28.55

So, in the use/give tab I was able to select the option “use (other object) on this” which allowed me to specify that the floppy disc would both prompt a message AND unlock the door (by clicking the ‘add new script’ button). You will see that I also added a message for the “use any other object on this” just for the fun of it.

When the room is played through, other than the message displayed above, there is no indication that the door has been unlocked so the creator needs to make sure that the person playing the game knows it has been unlocked.

One thing that I relied on while making this game was the ‘save’ and ‘play’ options as it was only through playing my game that I was able to debug it and figure out what I was doing wrong – users should definitely be encouraged to use these after every new object is added in.

Now that I know what I’m doing, I’m off to create another couple of rooms and see how long it takes me to create my whole 13 room map! I may be busy for some hours!!!

Advertisements

One thought on “Quest – Text-based adventure game (creating a room)

  1. Pingback: Quest – Text-based adventure game (creating a game) | Demystifying the Demystification – a real teacher's view of the new Computing curriculum

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s