top expert

i am my own ghost

Let’s Make IF #14: scenery and more scenery.

last time on Let’s Make IF…

Yesterday, I was able to keep up a brisk pace in terms of generating text descriptions and responses. This is because of the up-front work I did with tables and complex descriptions. I also continued with implementing a kind of action, “cat behavior,” that should feature many unique responses.

taking the stage.

Marbles and D. should be backtracking to the stage at this point. D is almost certainly there, since he has a head start. Marbles could be dawdling or rushing. I have to account for either case. Once D gets there, some text will print about his current fascination (remember that?). D does not pressure Marbles to hurry, which is different from the situation with the doors in the prologue.

There isn’t a whole lot she can do at the moment, though there is a lot that she can look at. She can see the stage with the lights up, for one thing, and the stage looks different now. This is another complex situation; the stage will look different depending on whether or not D and Marbles have seen the stage up close. I’ll probably need to do another complicated substitution for that.

I’m starting to second-guess myself about the ending of act one–maybe I should wrap it up when Marbles and D examine the box. These texts are getting too complex, for one thing, and I’m even varying some action feedback based on it. The design calls for pivoting on scenes, and I like that design. Stand by…. OK. I’ve gone back and made the changes. The scene will now end when the box is examined.

act i ends when the box is examined.

I have a pretty strong implementation of the throughline up to the end of act i. However, there is a lot of scenery to build out. I’ve replaced the original clutter with something more detailed.

act i	"[if the clutter is in the location]The stage was covered with human thisses and thats, so much so that it was confusing to look at all of it. The strangest details jumped out at me. For example, there was a very large fake dinosaur[em]I recognized it from one of D's books[em]standing on two feet. Nearby, I saw a large teeter-totter of some sort. A jumble of rope and wood dangled high above the box. There was also a miniature car that looked just a little too small for D. That wasn't everything, either, but I'd never get to eat my food if I told you everything that was there. For now, let's just say that it was a lot, that it was a mess.[otherwise]From a distance, the mess onstage was less overwhelming to look at, but it was still a lot to describe. A wooden dinosaur and the black box were the two most prominent items onstage, though a child-sized, miniature car also stood out. I had no idea what those things were for. Humans are just weird, as I'm sure you know."

Note that I’ve introduced some new nouns (dinosaur, the car, a rope ladder). I’ll keep introducing new stuff with every scene. It’s going to get very busy up there. This is all in service to the big interaction (I don’t want it to be a puzzle) at the heart of the game, which I really want to feel like a kind of playground.

I will have to implement the mentioned nouns, of course, and add some cat behaviors to the mix.

Rolling out these new nous is easy. First, I’ll create them.

the car is nowhere.
the description of the car is "[a variable description]".
the car is a prop in act i.
the car is scenery.

Then, create a table of descriptive text and add the table name to the “table of references.” The hard work of action implementation remains, of course. Players will probably try to enter it, for instance. That’s in addition to all of the cat behavior. That’s ok, this is the kind of thing I want to spend time on. This is a children’s story, after all. I want the player to be able to try lots of things as a cat.

First, though: did you notice that I said the car was “nowhere?” That makes sense as a starting place, since it doesn’t exist for the player until act i. I think it makes sense to move everything as a batch. I’ll set that up.

when act i begins:
repeat with item running through things:
if the item is a prop in act i:
now the item is in center stage;

Just to make sure that I get everything, I’ll visit center stage during Act I and use the SHOWME command to see what’s currently there:

>showme

Center Stage - room
myself - cat
My human boy, D - person
rope ladder
car
dinosaur
clutter
box

Note that this is not a list of everything that is in the player’s scope. We’ve expanded that significantly to allow players to see into remote locations. This only prints things in the current location (we can see the contents of another room if we specify it in our command).

I haven’t described myself or D yet, but I’ve deliberately put that off. I decide to have only three smelling responses: the box, the room, and everything else. I’m not sure if these should change over time. Perhaps I might redo later at the same scale (just a few items) because everything is going to smell like the thing in the box. For now, I have smell covered until act ii ends. That’s accomplished by using this as a condition:

if [or when] act iii has not happened

This can be dropped into action processing without any fuss.

Since *MEOW AT* is Marble’s way of communicating with D, I think it’s important that those vary. They will almost certainly vary by scene, now that I think about it, since D and Marbles will see the game world differently. There’s also a need to avoid the awkwardness of D saying the same thing, word for word, over and over. That seems a little unpolished, doesn’t it? In practice, that means handing things this way:

carry out meowing at the ladder during act ii:
if D is in center stage:
say "[one of]D looked up. What's that Marbles? It looks like some kind of rope ladder. I wonder what it's for? If somebody unrolled it, it'd probably reach into the black box. Though gosh, I wouldn't want to climb in there, would you?[or]D took another look at the ropes. I see it, Marbles. I bet I know what you're thinking: 'it has to be good for something!' I agree with you. I wonder what it's for?[or]D looked at the ropes yet again, as if hoping an idea would come to him.[stopping]"

Ending with a repeatable action seems the best way to go. Note that I have no idea if “during act ii” is correct. I need to get further into the game before I can know how to proceed.

There isn’t a lot more to report! I have the dinosaur, car, and rope ladder completed. This ought to keep moving at a good clip for at least two more scenes.

Here is a link to every source code update.

Here is a link to today’s code. For best results, paste into an Inform 7 IDE.

next.

Since I’m more than halfway through implementing the nouns onstage, I will probably start on Act II unless some tech problems arise. It’s a short act, two, that can be completed in three turns (I don’t think that will be the typical play experience, though). Maybe we’ll get to Act III!