Adventures in Interactive Fiction

Success is North of Failure

Spring Cleaning and Small Triumphs

Ah, a day of blissful laziness.  I slept until a shameful hour, finished playing my Lost game, and spent time working on my own game.  A large part of today’s work was actually just code cleanup – putting things in logical order, and fixing my headings (I had books inside of chapters, volumes inside of parts – it was a complete mess) which rendered the new “Contents” pane much more usable.

Fitted out a couple more rooms with scenery and objects, including a filing cabinet, which led to today’s triumph.  I wanted to have it so that only one drawer in the cabinet could be open at a time, without actually requiring the player to close one himself.  My first 15 attempts at coding it ended in run-time errors (and to think, I was so giddy when there were no compile-time errors!) so I started drafting a plea for help on raif.

It’s sort of amusing – I agonize over my  pleas for help because I’m always just slightly worried that someone will take one look at my bad code and laugh at me.  I know no one would; it’s just an irrational fear.  So in response to that fear, I kept flipping between my post and my code, trying to fix my code up in a way that at least got my intention across without looking woefully incompetent.

And wouldn’t you know it – in the process of making my code presentable, I ended up figuring it out for myself.  Ah, the sweet bliss of being able to cancel a post…

When I created this cabinet, I realized I needed to create a kind called “drawer” so that I could have 3 of them that acted in conjunction with each other.  I suppose there is some way to do it without creating the “drawer” kind, but I can’t imagine it would be more graceful than what I achieved (that’s not to say there’s not a more graceful way than the one I did use, of course).

So eventually, I made it so that any attempts to open a drawer would automatically close a drawer that was already open.  This also gave me a chance to really strengthen my understanding of “calling names”, which I think I finally really “get”.

Things are definitely getting easier and more intuitive.  Best of all, I’m really having fun.

Advertisements

May 24, 2008 - Posted by | Uncategorized

3 Comments »

  1. I have started working on something for the first time in Inform 7 and have also been very pleasantly surprised by how steadily things have become more intuitive.

    Comment by jeremy | May 25, 2008 | Reply

  2. Hi. I did some inform7 coding for my degree project in computer science and also bumped into some of your problems – you should check out the examples from the ifarchive db, there you will find an example that deals exactly with the drawer problem. Also, if u want, I can help you in developing matters.
    cristina_ursi2001@yahoo.com is my e-mail, write me if u like , good luck and take care!

    Comment by winniethepooh | June 14, 2008 | Reply

  3. and u should really stop complaining about the laziness or predisposition of letting things go easily. it happens to all of us 😐
    the important thing is not to acknowledge it, but to change
    ohhh.. who am I fooling, i am also deep in this too, and this sort of advices i know they are not helping.

    Comment by winniethepooh | June 14, 2008 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: