Items can now both have things in them and on them, so a
dresser might have some items in the
drawers but also lying on top of it.
I then set about creating chalk, chalkboards, and the
"draw" verb. I wanted to make
it so the player could draw whatever they wanted on a chalkboard as long as
there was some chalk around. However, my
draw function threw some compile time errors in, and I had some fun learning
about the difference between standard mode and strict mode compilation. Strict mode is extremely useful, and I don't
want to turn it off, but I get compile errors if I code properly (and just get
warnings if I cheat). I would hope that
there might be some way to use strict mode with exceptions for some blocks of
code during compile time, but I doubt it.
For now, I'm keeping strict mode on and making gunky code until I figure
out something better.
You can draw a lot of stuff! |
But in any case, the player can draw on the chalkboard now, any
number of times, provided there is some chalk in the room or in the player's
hand to draw with. The player can also
then look at the chalkboard and see what drawings have been made.
Making things appear reasonable in English with proper
punctuation was the hardest part. I
expect that probably will be tough overall.
I wonder if I should have a grammar function of some sort. That'll be a ball.
Also, for some reason, there was no error message for the
player when no command was recognized, so I added that. It's the little things that matter.
While I was typing this log up, I decided also to set a cap
on the number of drawings on a chalkboard before I forgot. So for right now it's set to eleven, so the
player can't be slammed with a list of a thousand images when they look at the
chalkboard. I definitely want to get the chalkboard erasable next.
Down the line it'll be neat to come up with a way to make it grungier
and grungier until it requires a washing to be able to draw anything
visible. But for now, I'll just make the
ability to erase the entire thing and that should work well enough. Also, a little extra fun you can do with the
space of eleven drawings:
No comments:
Post a Comment