StoryTllrC64 – your first project (3)
08
Before going on, as already anticipated, we’re going to remove the specific global verb handling and simply include the standard library.
That way we’re getting all the default behaviors – including the messages for unknown verbs.
Then let’s add an image for each room, just so that they look cooler.
But even if now these two locations look cooler, they’re still not good enough. Why so? Because, being this a graphical-text-adventure, we don’t want only (or mainly) graphics, but also text. We want to be able to interact, to explore the game locations, using verbs. So we need descriptions at least for some of the objects we mention (or that they’re supposed to be there).
To do that we need to add objects in the game script. But what kind of objects do we really need?
If you don’t even get the question, it’s fine. In the real world, objects are simply straight objects.
But in a game, some objects are more real than others.
The ones that are important for the game can probably be taken and moved around, while the ones that are just there to enrich a room perception, well, they are scenery. They just need a description. Or a few specific verb handling.
In the stdlib.hjt you’ll find some object classes. They can be changed or added, but they are just different for the attributes they’re assigning to their objects.
In our library scenery are the objects that are there, that you can check or interact with, but that you won’t see in the room objects list. sceneryobj are instead automatically “visible” in the room description in a special way. The normalobj have also a takeable flag that’s used by the get/take verb to know if it’s possible to put them inside your inventory.
Let’s add something to our rooms, so that’s easier to understand the differences between these three kinds of elements.
And let’s also add a “real” object – your cellphone – not tied to a specific room, even if starting in one specifically.
If we’ve something like that in the stdlib…
…entering in the living room we’ll get 1) the room description and 2) a list of listable objects – in this case our bike.
We can’t get it (so we’ll get the default message for this verb) but we can examine it. And we can of course examine also all the other local objects, even if they’re not so important for the game that we want them listed when you check the room.
The last thing I want to underline is the normal object – that’s to say our cellphone. A visible, listable, and takeable “global” object that we decide to put in the bedroom from the start.
So entering the bedroom we can see it, but we can also take it, and have it in our inventory.
And, well, if we want to do so, we can also drop it in the living room, adding this object to the listable ones there.
The game so far is minimal – but it starts to feel like a game, doesn’t it?
The only missing thing is at least a puzzle to solve. Something we need to figure out, to reach a goal.