In-game world creation/editing

Along the lines of the Conversation Builder by Chris Conley extension, which can do stuff in-game then generate it as source (which you could then paste into your source from the story pane), I’ve have the start of an extension that could do a similar process to create rooms as you play a game, as well as possibly some editing (of descriptions, perhaps some properties).

Using relations will allow the extension to figure out what’s been created (or edited) then output a suitable source when requested.

It’s a secondary file in the same github location as my emotion extension:

(It’s the one called In World Creation)

I’ve only just started with it (it will create rooms in play, but does not yet generate code) as something of a proof-of-concept.

I’m wondering if there are other similar projects (in which case I am reinventing the wheel and should probably investigate the other existing projects first).

PS: The stated goal of inform 7 being to have creating a world feel like playing it, I think such an extension is a great aim towards it.

There’s the Dynamic Rooms extension, which is basically a framework for placing rooms on a grid during play. (See the example Frobozz Magic Excavator for something a bit like what you want to do.) This could simplify the process of laying everything out, though it doesn’t have any facilities for generating code.

You might also look into Trizbort, which is a mapping program that can generate a map automatically as you play or convert a map to I7/TADS/ZIL source code.

I recall the game “Lock and Key,” which involved putting a series of traps in sequence and then letting an adventurer run the gauntlet. I’m not at all sure if the code on the back end involves creating rooms though.

There are many games that have dynamic rooms however my extension is intended mainly as a world prototyping tool used by a developer to create the main world via an in-game interface and then capturing the code to put back into the project’s source. It’s a way to build a world from an in-game interface allowing a developer to create the world from the player’s (in-game) perspective rather than the wall of source text perspective.

Maybe I wasn’t clear about that part. I am specifically wondering if there was already extensions to accomplish the room making and code building together (I’m only reinventing the wheel if an existing extension accomplished both). Most of the “dynamic” extensions just create a fixed number reserve of rooms that get used for the “dynamic” generation, being recycled to the reserve if a dynamic room is “deleted”.

Oh, no, I didn’t at all mean to imply that your extension was useless or had already been done. I was just suggesting that you could have Dynamic Rooms deal with the positioning of the rooms in space and such for your new tool, since that part has already been written. I don’t know of any existing extension that accomplishes both.

My current plan is to tag created stuff with adjectives that will later be looked at for the code generation, and use relations of modification kinds to remember any modifications. The code generation then just runs through the anything with the tag and anything in the relation, preferably grouping everything related (ie: all edits to same room) together.