Begin creating an I7 work from within an I7 "game"

This tool allows the player to create and describe rooms and objects from within the “game”. The resulting very basic IF work can then be exported as valid source code. This would allow new programmers, including children, to smoothly transition from IF readers/players to authors. I wouldn’t mind using this to begin sketching locations for a new work.

I have just started coding this, and it is by no means complete or polished. I’d like to know if further development is warranted. Specifically:

  • Has this been done before?
  • Is this useful? To whom?
  • Would more functions (eg item properties) be better, or should new programmers be encouraged to switch to the Inform7 IDE as soon as possible?

Edit: New version 2012/1/14, with new features and errors:
docs.google.com/open?id=0B8T1br … dkMjgyZjZm

Please reply to this post or email my firstnamelastname at gmail.com

Thanks!
Branden Rishel

There are some precedents. Emily Short et al’s Alabaster used an in-game questionnaire to allow collaborators to add conversation nodes in-game; I believe that source code was auto-generated from the responses and written to a file that could then be sent to Emily for compilation into the main game. My Glimmr Canvas Editor extension allows you to arrange complex graphical layouts in-game and then export the source code to recreate your composition (tutorial here).

I’m not aware of any basic world-building tools, however, so essentially this would be something new.

–Erik

This looks sweet! I don’t know if it actually would be useful for teaching kids, but I’d encourage you to add more functions and things. For instance, you could give them the option to create a new room whenever they use an exit that doesn’t exist yet (or to map the exit to an existing room.)

A couple comments:
You’ll need to change the default messages, I think. I created a desk and a lamp and tried to put the lamp on the desk – which of course I couldn’t do, because the desk isn’t supporter. But I don’t think the target audience will appreciate “Putting things on the desk would achieve nothing.”
Letting people create supporters and containers might be nice. Though I think it might be tons of work, since it might involve changing the kind of an item in run-time, which I think means taking an item away and creating a new one.
“Describe location” doesn’t work, and “Describe me” yields a run-time error.
I think more in-game prompting would be nice – I described the location, and then I typed “help” to find out how to do more stuff. It could be cool to prompt the player to describe the room, then describe themselves, then create an item and describe it, then go somewhere and create a new room, and then maybe by then they’ll really be playing around.
You might want to do something to make sure the code actually compiles – I called the location “My Room, Yeah!” and the resulting code didn’t compile. Maybe forbid punctuation in names, or if you find punctuation make it so the code says “A room called “My Room, Yeah!”” instead of what actually results.

So that’s a lot of work I’ve assigned you! Such are the wages of showing people cool stuff you’re working on.

Erik: Wow, your Glimmr Canvas Editor thing is neat! I look forward to playing with it.

Matt: Thanks for finding more bugs! Yes, there’s quite a lot to do. I think I’ll work on item properties (containers, supporters) next. Note that:

  1. You can already add new locations by moving in a new direction (eg EAST when there’s no room to the east).
  2. I’m a beginner at Inform7 programming, so the string stuff needs a lot of work. The code should compile for a room called “My Room”, but the punctuation in your sample room borks it. I’ll shift that over to a printed name instead.

Again, thanks for the help!

Branden

Great! The system for creating a new room already works exactly the way I want it to; just put in some instructions about it and I’ll be happy.

I would actually recommend just nicely telling the player that they can’t put commas in things’ names; messing around with printed names seems like advanced sort of stuff that they can do once they’re actually in the IDE.

Branden, I’ve just downloaded your Creator program and tried it out , creating a few rooms and things. This is good, and in fact might encourage disorganized people (like me) to actually plan things out in advance (which is usually anathema to me), and then quickly create the game skeleton using ‘Creator’.

Cool!
Apart from everything that’s on Matt’s wishlist—could your code eventually be turned into an I7 extension, so that any game could allow players to create new objects and rooms?

(Forcing Inform to react differently to commas means hacking the I6 templates—presumably in unexpected places.)

Chipping away at matt w’s requested features, but I’m suddenly too busy to work on this in the near future. For the very few who might be interested in the incremental progress of this project, I’ve updated the release link with a new version.

  • Better tutorial-type integrated help.
  • Commands simplified (eg editing a location asks for new name and description).
  • Some error-handling (eg edit self).
  • General code cleanup, location stuff entirely rewritten. Hopefully you won’t notice.
  • Basic ability to create supporters and containers.
  • (…which is still quite broken and barely works)
  • Exporting has not been updated, so container/supporter status is not included

On the idea of an I7 extension:
I’m not sure this would be a useful extension as a whole. The structure is fudging a bit, storing names/descriptions/properties in tables. This probably isn’t what you’d want to do in a proper game, although it could be useful for small games or small areas. The item stuff is even more kludgey, and wouldn’t hold up to a stiff breeze. Felix, would you be interested in an extension with only the room creation elements? Perhaps when I feel better about the state of the code, I’ll just release the sourcecode and you can use it as you like.

Thanks!