Glulx: Game pausing every turn?

So I had to switch to Glulx today when my game got too big, and now when I test it the game lags heavily on most commands (moving and looking most noticeably). Just curious if anyone might know why, this didn’t happen with z-code. The only major thing I changed about my game is I’m using the Patrollers extension and I have several wandering characters set up now. Thanks. :slight_smile:

Adding several characters using Patrollers is probably why your game is slowing down. I’m not familiar with Patrollers, but looking over it quickly, the pathfinding it requires would probably be fairly heavy once you have several character patrolling, especially if you have a large map. As to what you can do to speed things up… firstly, if you happen to have “Use slow route-finding.” set, remove that. Secondly, if you have any RoomLed patrollers, change them (if you can, of course) to DirectionLed patrollers to save the game having to do pathfinding for them.

Thank you. I did not set anyone to use slow route-finding manually, so do I assume that is not being used? (Sorry, but I didn’t see anything about that in the documentation.)

As for room-led, yes they are almost all room-led. I’ll just deactivate them for now then, because my game’s map was done for me by my brother and it’s a mess, some room exits aren’t even working. I have to basically re-do everything, so I’d better not set up direction tables for the NPCs yet. HOWEVER I do have the game divided into regions, do you know if I can make a Patroller Aimless and wander a Region? That would be ideal, but it’s not in the docs so it might not be possible. :confused: Thanks a lot. :slight_smile:

edit: Even with the Patrollers all deactivated there was a lag on the first movement in the game, ditto with removing Patrollers completely. It gets better after that first turn, but really is it normal for the game to lag so much at first with Glulx? The lag is better than it was, it’s only on the first turn instead of every turn, but that’s still kind of annoying. I have an NPC who presses a random button in the elevator every turn, might that cause it? If so, why is only the first turn affected?

By default, slow route-finding is used on Z-Code and fast route-finding on Glulx, so if you haven’t set it either way, it should be using fast. It’s mentioned in Writing with Inform 6.9, “Adjacent rooms and routes through the map”.

To be honest with you, I don’t know the answer to either of those questions…

Thanks though! :slight_smile:

It’s difficult to figure out the cause of your problem without seeing the source, but since posting it in its entirety is not feasible, maybe if you gave a little more info, we could help more. First of all, when you say “there was a lag on the first movement in the game”, you mean immediately before the first turn, right? (i.e. before the command prompt is printed the first time.) If so, that’s probably the result of “when play begins” rules. “Patrollers” has a few of these for initializing and debugging the patrollers, whether or not they’re active (that’s why deactivating them wouldn’t affect the start - up delay). However, you say that you removed Patrollers completely. Do you mean you didn’t include it at all? If that’s the case then obviously at least part of the problem is unrelated to the extension. Once again, if the time lag is before the first turn, it’s probably due to “when play begins” rules. Try posting those, along with the names of any extensions you’re using. Also, what kind of machine are you using?

I just completely redid the map, and the lag is gone. I guess the messy way my brother had done the map initially was confusing the game or something. I dunno. But the lag is gone now.