by Flimbo » Mon Dec 05, 2011 2:29 pm
Many thanks Roody.
At a quick glance, both your suggestions will do.
Elegant coding too. Dammit!
It all started because of this "PC" scenery object that (admittedly for the sake of detail) I described as follows:
"Your personal computer is a fairly standard piece of equipment: case, keyboard, monitor and the ubiquitous mouse."
... which quickly brought me to code a separate scenery object for each of those parts.
As my .hex file grew heavier, I wondered if I could have got to the same result implementing a single PC object.
Such thing ended up with lots of nouns and synonims attached: "pc", "computer", "system", "case", "keyboard", "mouse", "screen", "display", "monitor"... hence my need of itercepting the exact dictionary entry used by the player, in order to provide the correct response to a simple "examine" command; that happening through a before.object routine.
Later on, things heated up, since the player may reasonably "move the mouse" or "switch off the screen" while leaving the pc on, or "switch the pc off" leaving the screen in stand-by mode, or quirkly try to "press the ESCAPE key on the mouse" instead of on the keyboard, which of course demands a proper reply... Soon the PC object became cumbersome and overly elaborated, so I dropped it and returned to the separate scenery objects.
Still, I'd be curious to compare how different the size of the .hex file would be between the two implementations.
At last, I mulled over how much time I should devote to irrelevant coding.
I could have easily made that computer an anonimous, scarcely interactive entity, but how old fashioned would have it been? Those old Infocom games weren't that bad, though ;-)
I guess it's only a matter of compromise...
Many thanks Roody.
At a quick glance, both your suggestions will do.
Elegant coding too. Dammit!
It all started because of this "PC" scenery object that (admittedly for the sake of detail) I described as follows:
"Your personal computer is a fairly standard piece of equipment: case, keyboard, monitor and the ubiquitous mouse."
... which quickly brought me to code a separate scenery object for each of those parts.
As my .hex file grew heavier, I wondered if I could have got to the same result implementing a single PC object.
Such thing ended up with lots of nouns and synonims attached: "pc", "computer", "system", "case", "keyboard", "mouse", "screen", "display", "monitor"... hence my need of itercepting the exact dictionary entry used by the player, in order to provide the correct response to a simple "examine" command; that happening through a before.object routine.
Later on, things heated up, since the player may reasonably "move the mouse" or "switch off the screen" while leaving the pc on, or "switch the pc off" leaving the screen in stand-by mode, or quirkly try to "press the ESCAPE key on the mouse" instead of on the keyboard, which of course demands a proper reply... Soon the PC object became cumbersome and overly elaborated, so I dropped it and returned to the separate scenery objects.
Still, I'd be curious to compare how different the size of the .hex file would be between the two implementations.
At last, I mulled over how much time I should devote to irrelevant coding.
I could have easily made that computer an anonimous, scarcely interactive entity, but how old fashioned would have it been? Those old Infocom games weren't that bad, though ;-)
I guess it's only a matter of compromise...