So I have code like this, but for 200-300 things, mostly scenery. (Hey! You in the back! Stop giggling!) As I understand, this might cut down compile time and, possibly, pause between moves fpr the user. (A small pause currently exists in the game. It’s A Roiling Original, if you’re curious.)
Plus, the organization would be useful to help me find obvious narrative bugs. But it’s a big enough change I wanted to check off with anyone willing to give helpful pointers where I may’ve missed a small adjustment that could have a big impact.
definition: an action (called ac) is procedural: [not part of the changed code, but just for reference] if examining, yes; if object-hinting, yes; if taking, yes; no; [there can be more. In fact there are in my code. I just want to establish that a procedural activity is something we should not generically reject. It's handy for time-based puzzles where certain obvious actions that don't take a minute in real life, shouldn't in the game.] mountain-scenery is scenery. wire-scenery is scenery. instead of doing something with wire-scenery: if action is procedural, continue the action; say "The wire has no special properties other than to keep you going south." instead of doing something with mountain-scenery: if action is procedural, continue the action; if current action is climbing or current action is entering, try going west instead; say "The mountain isn't particularly remarkable except for being too big to let you go west."
I’d love to cut this down, and normally I wouldn’t ask a question like this … but planning changes to 200-300 rules is a lot, so I wanted to see 1) if this was sensible and 2) if there were any details beforehand, so I wouldn’t be in a position to need/want to make potentially 200-300 changes, big or small, later. It just feels like I’m spinning a couple plates doing this–but also, if it works, I think it might be something worth sharing with less experienced programmers.
Below is uncompiled code, but I just wanted to get a big-picture view: is there anything I should add or tweak to my code-twiddling plans?
bound-scen is a kind of scenery. bound-scen has text called bound-text. bound-scen has a rule called bound-rule. mountain-scenery is scenery. bound-text is "The mountain isn't particularly remarkable except for being too big to let you go west." bound-rule is mountain-scenery-bound rule. this is the mountain-scenery-bound rule: if current action is climbing or current action is entering, try going west instead; wire-scenery is scenery. bound-text is "The wire has no special properties other than to keep you going south." instead of doing something with bound-scen: abide by the bound-rule rule of noun; [the default will be an empty rule that does nothing] say "[bound-text of the noun]"
Thanks for any help, and I hope this may help other people in some way.
On a related note, I have a lot of small questions like these & don’t want to throw them out too often, but on the other hand, I do think they could be useful for beginners to say “Hey, I didn’t quite realize you could even -consider- things like that.” Especially since the questions I ask generally discuss things I didn’t see were possible, or I assumed they were too complex, when I started. Is there a good place for these on the forum, and if so, do they need a special subforum or tags?