“World Schema Specification”

“World Schema Specification”

what is the minimum structured representation needed to describe an interactive world that a runtime can execute without custom glue code?

v1 is the complete foundation. It covers entities, types, properties, containment, visibility, locations, exits, sequences, conditions, effects, rules, and dialogue

How do you know this is a minimum?

For example, why aren’t “locations” just “containment”? Why is “dialogue” a separate thing to all and any actions or choices, same as “exits” should not exist separately?

I have a working world model. It covers everything I’ve needed. It just has “in” and “on” and properties. Locations do not exist per se, they are just other objects (for example, where are you if you are inside a wardrobe?).

3 Likes

This is fascinating to me. Perhaps the topic belongs in its own post, but how are you handling cardinal directions? For example, how do you model the foyer being north of the bar and west of the cloakroom?

Just like I6! :smiley:

All objects have actions. These are described as parser commands, followed by a consequential “flow”. I use the parser predominantly as an authoring tool, although players can use it too :slight_smile:

Actions are collected up and some are elevated to choice. These choices are merged with any existing authored choices.

Game script is usually generated from a diagram. That’s how i author now.

This map will generate the code below.

//////////////////////// the cloakroom ///////////

CLOAKROOMIMG

CLOAKROOMAUDIO
AUDIOSTOP

XCLOAKROOM
You are in the cloakroom.

CLOAKROOM@ INSIDE
* name
the cloakroom
* img it
CLOAKROOMIMG
* x it
> img it
CLOAKROOMAUDIO
XCLOAKROOM
* e
GOFOYER
*+!= go to FOYER
GOFOYER

GOCLOAKROOM
> put PLAYER in CLOAKROOM
XHERE

//////////////////////// the bar ///////////

BARIMG

BARAUDIO
AUDIOSTOP

XBAR
You are in the bar.

BAR@ INSIDE
* name
the bar
* img it
BARIMG
* x it
> img it
BARAUDIO
XBAR
* n
GOFOYER
*+!= go to FOYER
GOFOYER

GOBAR
> put PLAYER in BAR
XHERE

//////////////////////// the foyer ///////////

FOYERIMG

FOYERAUDIO
AUDIOSTOP

XFOYER
You are in the foyer.

FOYER@ INSIDE
* name
the foyer
* img it
FOYERIMG
* x it
> img it
FOYERAUDIO
XFOYER
* s
GOBAR
*+!= go to BAR
GOBAR
* w
GOCLOAKROOM
*+!= go to CLOAKROOM
GOCLOAKROOM

GOFOYER
> put PLAYER in FOYER
XHERE

Doc for choice elevation:


Choice Elevation

This is the process of elevating a parser command to a choice.

Example 1:

Let’s say you have a cake with “eat me” written on it;

CAKE@ GETTABLE
* name
the cake
* x it
It has the words "eat me" written on it.

You obviously want to allow the player to eat it. So;

CAKE@ GETTABLE
* name
the cake
* x it
It has the words "eat me" written on it.
* eat it
You scoff the cake.
> put it in HELL

But, since this is the obvious thing to do, you wish to offer “eat the cake” as a choice as well. So;

CAKE@ GETTABLE
* name
the cake
* x it
It has the words "eat me" written on it.
*= eat it
You scoff the cake.
> put it in HELL

Just add “=” to the command, and it is marked as “elevate to choice”. So here, we can either make the choice or type the command.

Example 2:

You want to offer the choice to get something, but only if not already carried.

CHALICE@ GETTABLE
* name
the golden chalice
* x it
It's what you've always wanted.

This will already be gettable as indicated. So get chalice will already work. But it won’t be prompted as a command. So;

CHALICE@ GETTABLE
* name
the golden chalice
* x it
It's what you've always wanted.
*=+ get yon it
> get it

How does this work?

  • add a “get” override
  • mark with “=” to indicate elevate to choice
  • mark with “=+” to work more than once
  • use the word “yon” to filter only on non-carried items.
  • redirect action to the parent “get” with > get it

2 Likes

So the idea of building the code for the map from a diagram in the above has developed significantly since that example. I can now make the whole game from a diagram.

When you’re making the entire game from a diagram, it brings into question what kind of world schema do you really need. It’s true that the diagram-to-code generator doesn’t (currently) make use of all the world model features. So, does that mean you don’t need those feature? Does it mean i might be better with a different feature basis.

Not sure currently. Time will tell if the diagram code generator eventually makes use of all the world scheme fundamentals or not. Will the diagram eventually mirror the world or will the world mutate to be more like the diagram. good question.

So what kind of diagram are we talking about?

Since you make all your game logic, the diagram gets to be quite complicated. After a while it begins to resemble an electronic circuit diagram with various components wired up. Thinking about it, i guess that’s what you would get.

Let’s see some.

OK. these are from my new “mini-games” endeavours. under 1 hour games, 4-5 people, 10k words max, approx 15-20 locations.

The diagrams work on layers, so to be manageable. but this is just a UI thing, in reality they are logically one large picture.

Here’s a map layer. Blue is outside, red inside. Compass directions are deduced from layout, where possible.

Here’s a female character (red/pink color)

Here’s male character, blue

Here are some misc objects;

So basically, this is the “source code” of the game. I’ve omitted several other characters, but you get the idea.

edit: Oh, if anyone wants to play this game. It’s currently in beta. I’m actually working on the next one now. Drop me a note and I’ll send you a web playable link. cheers.

3 Likes