Two new extensions for player happiness

Hi karlnp,

Thanks for posting-- I expect these problems are probably due to the fact that the various extensions are in a bit of a transitionary period right now, and there are updated versions of some that aren’t yet on the I7 extensions site. Sorry for the growing pains.

These will be up officially soon, but for now here are my current local versions of all of my extensions-- can you try installing the ones you’re using and let me know if you’re still getting errors?

(Note BTW that if you’re using Player Experience Upgrade you shouldn’t include any of the component extensions like Remembering… I wasn’t sure from what you posted if this was the case on your end.)

Ah, that’s got it. Thanks, Aaron!

I just noticed that Empty Transfer by Emily Short is not included in the Player Experience Upgrade. Maybe that’s an expert-friendly extension, but I pretty much expect the “empty” command to work in every game I play. What do you think about adding it?

Yeah, this would probably be a nice addition. I’ll consider it for the next release (although that may not be for a while). I’m a little concerned that it adds a lot of new rules for a fairly uncommon functionality improvement (how often do people really need to empty everything from a container? I’m not sure…) but I don’t really have a reasoned-out philosophy for when this tradeoff is worth it or not yet, anyway.

In general, I suppose I’m tending to err on the side of functionality for now, but if I start hearing a lot of complaints that nobody’s using the extension because it’s slowing down their game too much, I’d revisit things.

Do games really suffer from slowdown in Inform when they’re running on a modern computer (and not through an online interpreter)?

I guess the answer is ‘yes’ and I’m being rhetorical to learn stuff, 'cos I remember there was talk of slowdown in the multitudes extension thread.

It just kinda amazes me that a text adventure could ever experience slowdown with the brain-pulverising CPU power of today’s computers. Is it to do with the legacy nature of the Z-machine?

My 1.6Ghz Atom-based netbook definitely experiences mild slowdown whenever there is a significant number of custom parsing routines, active timers, etc. present.

If you do get reports of slowness talk to me. I’ve got a big block of accelerated function codes I’d love to specify.

So this is a good question. Modern computers should have aboslutely no problem running a text game. But clearly that depends on the interpreter that’s being used. And that in turn is dependent upon the nature of the z-machine itself.

What I’m most curious about (since my personal opinion is that the z-machine should be relegated to history) is whether this same situation applies to Glulx. Personally if I was going to invest a lot of time in a language and tool, any sign of performance limitations is something to worry about with a rules-based system. Do these slowdowns happen with Glulx? Acceleration routines are great stuff, but the very fact that you need them at all can often lead to a lot of band-aid approaches.

Accelerated functions are a relatively recent addition to the Glulx spec; raif has the original discussion. There were indeed some performance issues with Glulx games in the late 2008 / early 2009 era; Nightfall and Alabaster are the ones that come to mind.

Speaking as a player, this feels like a solved problem. I haven’t seen a Glulx game with comparable speed issues since.

You are skipping over the compiler, the library/extension code, and the compiler-generated code. You can’t ignore those levels. (That should be obvious from the fact that we’ve been using the same interpreters and z-machine spec for the past fifteen years, and we see slower games on faster computers.)

(For what it’s worth, Glulx has the same kind of architecture as the z-machine, and the I6 compiler generates the same kind of code for it. So you can expect the same sort of performance out of each, down to a constant factor.)

I think it’s just that I7 offers a lot of tools to do powerful things, but it doesn’t give clear insight into how expensive they are. So it’s easy to wind up with a lot of exponents on your big O, as it were.

This is not a problem with easy technological solutions. (Function acceleration is helpful, but ultimately it’s trying to fight those exponents with constant factors.) I’m sure that I could implement any given text game very efficiently for Z/Glulx, but that’s because I know the system and can dive in to rewrite stuff when necessary.

Try Under, In Erebus – Jenni and baf reported performance issues in standalone/offline terps (Jenni: “when I tried typing in the walkthrough last night, the standalone interpreter hung so badly that it took me over ten minutes to get through those, like, thirty or forty commands.”)

(Relying on their reports because I tried to play it in quixe on a slightly balky computer. That did not work well.)

FWIW, the performance issues with Alabaster were mostly due to the expense of scaling down graphics on some terps. The routines that do this have since been improved, but it would also have helped if I hadn’t accidentally blorbed in some overly-large versions of those files.

For those who didn’t major in Comp Sci, zarf did not mean Orgasm. :laughing:

One thing that does slow games down is using lots of regular expressions. They’re a relatively new feature which the old terps could never have made feasible. But they would also be very easy to accelerate.

Aaron, sorry to be late on this thread; I wanted to get things in my game to a safe state before upgrading your extensions. Nonetheless, I thought I found a bug in Smarter Parser causing a crash in Mac ZOOM with a “Glk Error - Unable to re-find array argument in Glk call” on the user command “What should i do” (also crashes iPad Frotz). I was using several older versions of your extensions (V10 of Smarter Parser, if that’s helpful).

So I figured I’d upgrade to the latest Extensions from the Inform7 site to see if that error still occurs. Using Inform7 IDE Mac 6G60 I got the compile time message "Problem. You wrote 'if sp-debug is true, parser say "***Smarter Parser: matched on [why]."

I tried downloading the latest versions of your ZIP file extension as mentioned earlier on this thread and I’ve seemingly installed them, but I’m still getting the same compiler error message. Not sure if the order of included files is relevant here or not, but here’s what my includes are:

[code]Section - Extensions

Include Exit Lister by Eric Eve.
Include Measured Liquid by Emily Short.
Include Telephones by George Tryfonas.
Include Menus by Emily Short.
Include Assumed Conversers by Michael Martin.

Include Keyword Interface by Aaron Reed.
Include Extended Grammar by Aaron Reed.
Include Small Kindnesses by Aaron Reed.
Include Numbered Disambiguation Choices by Aaron Reed.
Include Smarter Parser by Aaron Reed. [v10 “what should i do” crashes ipad, Zoom ]
Include Poor Man’s Mistype by Aaron Reed.

[/code]
Because I use some other extensions (Exit Lister) and don’t use others (Remembering, Neutral Library), I wanted to upgrade these extensions one at a time rather than switch completely to the Player Experience Upgrade jumbo-pack. But if you tell me to bite the bullet, I’ll do that.

It may be that I’m doing something completely boneheaded here. Any suggestions?
I love these extensions, but I’m at a bit of a loss when I get error messages like the above. My only work around is to comment most of the extensions out. Any help is appreciated.
–Zack

The “Unable to re-find array argument in Glk call” error should not happen under any circumstances. I don’t suppose you can condense a simple case that reproduces it?

Hi Zack-- the version on the I7 extensions page should be the latest version right now, not the ones from the ZIP file.

Can you paste or email me the whole problem message you get related to sp-debug? I can’t replicate this on my system. It’s possible it’s a conflict with another extension— if possible, you might try commenting out the other extensions one at a time to see if the problem goes away at some point.

It’s definitely better for your purposes to stick to the individual extensions instead of using Player Experience Upgrade; it’s a nice omnibus, one-click solution, but not very flexible for doing lots of extensions mixing and matching.

Aaron,
I tried seeing what I could do to fix it or narrow down the issue to make it more reproducible but had no luck. So in the end, I just went with the whole “Player Experience Upgrade” and both issues (compiler error, Glk error) seemed to solve themselves. Maybe that wasn’t the bravest solution, but it was expedient. So far, I’ve not seen any other errors or conflicts with the other extensions I’m using, so maybe things are ok.

Nonetheless, I will try to pay attention if I see anything else that’s odd and report it in a more timely fashion.
Thanks again for all these great extensions and for making them work together. I hope to enter The Z-Machine Matter into IntroComp and I think your extensions give the game a lot more fit & finish.

–Zack

Yes, very much so. In fact, z-code games are typically much faster than Glulx on the same hardware. Probably this is mostly because with the more limited resource set, they just can’t get as computationally complex. But when you are experimenting with running your game in a browser, for example, you become aware of how much more taxing Glulx is on the CPU.

Paul.

I had my girlfriend play give my game a play test this weekend. It was only her second time every playing a text adventure, so when I found this extension I thought I just had to run her input through it to see what came up. Overall, I like the way it operates, although I have a few things crop up that I think could really be improved. What is the reason for having to use glulx? I don’t know much about the different interpreters, but what I get from the docs is that glulx is less portable. So what is really gained by switching interpreters?

Ok, on to more specific concerns:

>walk to mirror [Most IF separates space into a series of locations, each containing a set of objects. If you can see an object, you can usually interact with it without worrying about positioning. Try a command like EXAMINE SECRET DOOR for a closer look, LOOK to get a new description of this location, or a compass direction like (for example) NORTH or N to move to a different location.]
I like the spirit of this message, but I have a few complaints. First of all, since the idea of this extension is to improve the experience of people who are not experienced text adventurers, you should do away with the acronym IF. I can just imagine her asking me, “what is with this sentence? why is the word ‘if’ in a weird place and capitalized?” The abbreviation just seems unnecessary. But it doesn’t matter too much because of my second complaint…

My second complaint is that I don’t like the wishy-washy sense of the first sentence. The player doesn’t care how “most IF” operates, the player cares how this game operates. I would say make this sentence more concrete and give the author some documentation on how to override/change the text if need be. Or just drop the first sentence and start with “If you can see an object…” Shortening this message to just the details that are needed to correct this command would be a good thing, I think. Actually it might be good to match the object so that you could start off by saying “Since you can see the mirror, …” but maybe that is too specific.

Third, her command referred to the mirror, so I think the suggested command should be EXAMINE MIRROR (it’s an object in this room). Choosing a random item makes sense if she isn’t referring to a proper item, like if the command is “walk to corner” (which she did a few times).

Fourth, there are no exits from this room, at least not at this point. So to give a suggestion of a compass direction seems wholly inappropriate here. That phrase should be suppressed if a valid exit isn’t found. (“But it told me to try going north. Why didn’t it work?”)

>atari, come [In some stories, you can type CHARACTER, COMMAND to give someone else an order; but I couldn't understand what you said in that context.]
This is another message where I don’t like the “in some stories” part as referring to an unnecessarily vague classification of games, rather than referring to the behavior of this specific game. I think this message should be more direct and just say something like [You can try typing CHARACTER, COMMAND to give someone else an order (although they may not be inclined to obey you!). But in this case I couldn’t understand what you said in that context.]

[code]>go up the ladder
[I only understood the first part of that-- trying anyway.]

GO UP[/code]
This works without any problem message without the extension. Maybe there is something I could add to my code to get rid of the extra text but it seems like this extension shouldn’t make me have to do that, if possible.

>take journal [Which do you mean, 1) journal page 3, 2) journal page 4 or 3) journal page 5?]
This behavior is different. Inform for some reason simply chooses journal page 3. I’m not sure why it’s different, but there are some random events that were different in this playthrough and I suppose that is because the extension randomizes some of its text. I think in the playthrough without the extension it worked out so that journal page 5 was on a supporter, journal page 4 was held by another actor and journal page 3 was “just” in the room, which may be why Inform chose it.

>atari, sit [What do you want the small brown dog to sit?]
Grammar problems there. I assume it’s a generic message for “enter” since sit maps to enter and you’ve substituted the verb actually used. But something needs to be fixed here.

[code]>atari, sit
[nothing has better things to do.]

atari, sit on the sarcophagus
[The large stone sarcophagus has better things to do.]

[/code]
This was after I defined “Sitting is an action applying to nothing. Understand ‘sit’ as sitting.” These two should say “Atari has better things to do”, which they do without the extension.

[code](with the player experience upgrade extension)

atari, crawl
You speak.

atari, sit on the floor
You speak.

(without the extension)

atari, crawl
There is no reply.

atari, sit on the floor
There is no reply.[/code]
The response with the extension makes no sense, and is worse than the standard response. Crawl is not a defined verb in this game. And floor is not a noun in the game.

[code]>ladder
[Most IF separates space into a series of locations, each containing a set of objects. If you can see an object, you can usually interact with it without worrying about positioning. Try a command like EXAMINE PIECE OF BEEF JERKY for a closer look, LOOK to get a new description of this location, or a compass direction like (for example) DOWN or D to move to a different location.]

EXAMINE LADDERIt’s a sturdy wooden ladder, poking through a hole in the floor.
[/code]
Again, since the command inferred is examine ladder it’d be good if that was the suggestion in the hint. But I’m using this example because there is a problem with carriage returns there. Also, maybe a bit of a technicality, but “down” is not a compass direction (unless the player has a spherical compass…)

>floor [Look for specific nouns or directions in the description you see after typing LOOK; avoid general concepts like the floor and ceiling, or relative directions like left and right.]
This message is a little bit confusing, and I think could use some clarification. For example:
[You should avoid using general concepts like the floor and ceiling, or relative directions like left and right. Try typing LOOK and then using specific nouns or directions you see in the description with a verb, for example EXAMINE something.]

[code]>look at beach
Beach (north end)
You are at the north end of a nice beach. To the west, a vast ocean stretches out before you. The stream from the forest empties into the ocean just north of you. The beach extends to the south. A rather fine rain is falling.

walk on beach
[That’s not something you can see now, or I misunderstood you.][/code]

I like how look at beach will look in the room. I’m not sure how walk on beach should be handled, although having “look at beach” work fine but then to get “(the beach) is not something you can see now” seems a bit inconsistent.

>put everything on floor [You will need to be more specific. Try typing LOOK to get a description of your surroundings.]
This hint could be more specific, like “I’m not sure exactly what you mean. You might try a command like DROP EVERYTHING instead.”

[code]>open doogie bag

OPEN DOOR BAG
[I didn’t understand that. Try rephrasing your command another way.][/code]
The attempted correction is nice, but the doggie bag is an item that is actually present, and is a better match than “door bag” which isn’t an item at all. Although I see what happened, the first word was matched to door, and there is a door present. But doggie is still a better match to doogie than door. (Incidentally, “open doggy bag” was correctly matched to doggie bag, which made me very happy :slight_smile: )

>throw stick into pit [That's not something you can see now, or I misunderstood you.]
This message should be more specific, because the pit is visible but the stick isn’t, but my initial thought when I saw this message was that it didn’t see the pit. So something like “Either you don’t see any stick right now, or I misunderstood you” might be better.

>jump into pit [That's not something you can enter.]
The extension has somehow overriden my “instead of jumping into the pit” rule. Making the pit enterable is not an option, because it’s a backdrop, and besides jumping into it ends the game in death so making it enterable would not be useful.

Well that’s all for now. For the most part I like the results, and I will have my g/f test it again later with this extension enabled to see how it works for her.