I’m trying to fix some speed problems in a big WIP primarily by whittling down the number (and kinds) of rules in it. One rule I come across during a LOOK is the “don’t mention undescribed items in room descriptions rule”. All it does is check to see if the object has the “undescribed” property set, and the only thing that property is used for is the player-character.
It bugs me to have that rule in there, executed once per object in the room, for every LOOK in the game, for such a one-off use. So I’ve de-listed it, and done this:
The player is scenery, not fixed in place.
The don't mention undescribed items in room descriptions rule is not listed in any rulebook.
The can't pull people rule is listed before the can't pull what's fixed in place rule in the check pulling rulebook.
The can't push people rule is listed before the can't push what's fixed in place rule in the check pushing rulebook.
The can't turn people rule is listed before the can't turn what's fixed in place rule in the check turning rulebook.
Everything seems to work, but, does anyone foresee any complications I’m likely to run into? I seem to remember this property & rule coming about around the time we could name the player, like “The player is Bob.”, due to problems with “your former self” cropping up. But is there any aspect here I’m missing?
This will probably affect the disambiguation of commands that refer to the player. I can only think of arcane cases where it matters.
You are right that it affects player-switching. If you switch to a different player object during the game, “your former self” will be left as scenery, and therefore invisible. If you don’t do that, never mind.
I will assert that a rule which is executed once per nearby object, during LOOK, is not your speed problem. Speed problems are caused when something happens hundreds of times.
thanks zarf. The PC isn’t changed in this work.
And while I normally agree that a rule executed a couple of times isn’t usually a performance issue, I have a chase scene running through a series of heavily-implemented rooms – like, most every one of the dozen or so nouns in each room description has a scenery object – so the player is likely to be entering one-letter compass directions as fast as he/she can type. Add to this that the “don’t mention player’s supporter in room descriptions” rule was also removed per the Mentioned In Room Description extension, and that’s approximately 100 rule invocations saved within a few seconds. It could be disastrous for the player if the game missed one of the inputted compass directions due to not being able to keep up with the typing.
So, performance stickler, but only for arcane reasons.