Working Document — Ontology v0.1

ROOM

An ontology of enclosed spaces in the Mushroom Kingdom — where room means floor, door means passage within, pipe means passage between, and level means the building that contains them all. Expressed in the tradition of BFOBasic Formal Ontology — Barry Smith's upper-level ontology framework. A small set of categories (continuant, occurrent, quality, role) that everything else inherits from. Used in biomedicine, defense, and now plumbing., the language of Inform 7A programming language for interactive fiction by Graham Nelson, with contributions from Emily Short. The language reads like English prose but compiles to a world model. One of the most beautiful languages in the history of computing., and the triples of RDFResource Description Framework — the W3C's graph-based data model. Everything is a triple: subject, predicate, object. The plumber would approve of the pipes..
WORK IN PROGRESS — This document will grow. Version 0.1 establishes the bounded context and the first objects.
Version 0.1 Traditions: 4 Objects defined: 9 March 2026

I — The Bounded Context

Four traditions meet in a pipe junction. Each brings its own vocabulary. The words overlap and the overlaps are not accidents — they are the ontology.

Tradition Brings The word "room" means
BFO Basic Formal Ontology Categories. What exists, how it persists, what depends on what. An independent continuant — a spatial region that bears qualities and contains other entities.
I7 Inform 7 Natural language as world-model. Rooms, doors, containers, supporters. The fundamental unit of space. "The Kitchen is a room." A place the player can be in.
RDF Semantic Web Triples. Subject–predicate–object. Everything is a graph. A node. A URI. Something that participates in triples.
DDD Domain-Driven Design Bounded contexts. Ubiquitous language. The map is not the territory but the team agrees on the map. Whatever we say it means, within this context, documented and enforced.

A fifth tradition — HATEOAS HypermediaHypermedia As The Engine Of Application State. The principle that a server response should contain the controls for the next action. The client doesn't need to know the API in advance — it discovers what it can do by looking at what's in front of it. A pipe, in other words. — hovers in the background. The principle that the current state contains the links to the next states. A room contains its own exits. The affordances are in the space, not in a manual.

II — The Confusion of Terms

In the Mushroom KingdomThe setting of the Super Mario franchise. A constitutional monarchy with a persistent plumbing crisis and an economy based on gold coins that appear when you hit bricks with your head., the following words have specific meanings that differ from both everyday English and from the traditions above. This is the DDD bounded context. These definitions are stipulated, not discovered.

Term In this ontology Not to be confused with
Level The building. The entire playable structure. World 1-1 is a level. It is a whole, not a part. A "floor" in a building. In this ontology, a level contains floors. A level is not a floor.
Room A floor within the building. A continuous horizontal or vertical scrolling section. The main area, the underground, the sky bonus — each is a room. An Inform 7 room (which is smaller — a single discrete location). Our room scrolls. It has extent.
Door A passage within a room. A door connects two locations on the same floor. In Mario Maker: a literal door sprite. A passage between rooms. In a physical building, a door goes between rooms. Here, a door goes between locations in a room.
Pipe A passage between rooms. A pipe connects two different floors of the building. The green pipe to the underground is a pipe. A Unix pipe (though the metaphor is suspiciously apt). A pipe transports you to a different spatial context.
Location A position within a room. The closest analog to an Inform 7 room. A location is where you are standing. A room. A location is inside a room. A room contains many locations.
The Building Metaphor

A level is a building. A room is a floor. A door goes between rooms on the same floor. A pipe is the stairwell — it goes between floors. A location is a spot on the floor where you can stand.

World 1-1 is a building with two floors: the overworld (ground floor) and the underground (basement). The green pipe near the start is the stairwell to the basement. The pipe at the end of the underground brings you back up. The doors in a Mario Maker level connect two spots on the same floor.

III — In the Language of Inform 7

Inform 7 is a language that reads like English and compiles to a world model. Its ontology is built from kinds — room, thing, door, container, supporter, person. We extend it. The extensions read like paragraphs because that is how Inform 7 works — the source code is the design document.

Inform 7 — Kinds

A level is a kind of thing. A level has a text called the world-name. A level has a number called the stage-number.

A room is a kind of container. A room is part of a level. A room has a text called the orientation. The orientation is usually "horizontal". A room can be scrolling or fixed. A room is usually scrolling.

A location is a kind of thing. A location is in a room. A location has a number called the x-position. A location has a number called the y-position.

A door is a kind of thing. A door has a location called the origin. A door has a location called the destination. The origin of a door is in the same room as the destination of the door.

A pipe is a kind of thing. A pipe has a location called the entrance. A pipe has a location called the exit. The entrance of a pipe is not in the same room as the exit of the pipe.

Inform 7 — World 1-1

World 1-1 is a level. The world-name is "World 1-1". The stage-number is 1.

The Overworld is a room. The Overworld is part of World 1-1. The orientation is "horizontal".

The Underground is a room. The Underground is part of World 1-1. The orientation is "horizontal".

The Pipe Entrance is a location in the Overworld. The x-position is 57. The y-position is 8.

The Pipe Exit is a location in the Underground. The x-position is 0. The y-position is 10.

The Green Pipe is a pipe. The entrance of the Green Pipe is the Pipe Entrance. The exit of the Green Pipe is the Pipe Exit.

Notice how the constraint on doors and pipes does the work. A door's origin and destination must be in the same room. A pipe's entrance and exit must be in different rooms. The ontology is the constraint. The constraint is the definition.

IV — In the Language of BFO

BFO — Barry Smith's Basic Formal Ontology — gives us the upper categories. Everything is either a continuant (persists through time, has no temporal parts) or an occurrent (happens, has temporal parts). A room is a continuant. A jump is an occurrent. The plumber is a continuant who participates in occurrents.

Mario entity BFO category Why
Room site (independent continuant → material entity → object aggregate → site) A spatial region within which processes occur. The room is where the jumping happens.
Pipe fiat object part A demarcated portion of the level boundary that affords transition. It exists because we say it does.
Door fiat object part Same as pipe, but its two sides are within one site.
Block object (independent continuant → material entity → object) An independent thing. It bears qualities (breakable, coin-containing, invisible).
Coin object An independent thing that participates in a collection event.
Power-up role (dependent continuant → realizable entity → role) The mushroom is an object. "Power-up" is the role it plays. The role is realized when the plumber touches it.
Jumping process (occurrent → process) Something that happens over time. The plumber participates in it.
Being-Super quality (dependent continuant → quality) A quality that inheres in the plumber after the power-up role is realized.

V — In the Language of Triples

Everything so far expressed as RDF triples in Turtle notation. The plumber's world as a graph.

Turtle — Prefixes and Schema
@prefix smm: <https://1.foo/room#> . @prefix bfo: <http://purl.obolibrary.org/obo/BFO_> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . smm:Level a owl:Class ; rdfs:subClassOf bfo:0000004 ; # independent continuant rdfs:label "Level" ; rdfs:comment "The building. The entire playable structure." . smm:Room a owl:Class ; rdfs:subClassOf bfo:0000029 ; # site rdfs:label "Room" ; rdfs:comment "A floor within the building. A scrolling section." . smm:Location a owl:Class ; rdfs:subClassOf bfo:0000029 ; rdfs:label "Location" ; rdfs:comment "A position within a room." . smm:Pipe a owl:Class ; rdfs:subClassOf bfo:0000024 ; # fiat object part rdfs:label "Pipe" ; rdfs:comment "Passage between rooms." . smm:Door a owl:Class ; rdfs:subClassOf bfo:0000024 ; rdfs:label "Door" ; rdfs:comment "Passage within a room." . smm:partOf a owl:ObjectProperty ; rdfs:label "part of" . smm:contains a owl:ObjectProperty ; owl:inverseOf smm:partOf . smm:entrance a owl:ObjectProperty ; rdfs:domain smm:Pipe ; rdfs:range smm:Location . smm:exit a owl:ObjectProperty ; rdfs:domain smm:Pipe ; rdfs:range smm:Location . smm:origin a owl:ObjectProperty ; rdfs:domain smm:Door ; rdfs:range smm:Location . smm:destination a owl:ObjectProperty ; rdfs:domain smm:Door ; rdfs:range smm:Location .
Turtle — World 1-1 Instance Data
smm:world-1-1 a smm:Level ; rdfs:label "World 1-1" ; smm:contains smm:overworld , smm:underground . smm:overworld a smm:Room ; smm:partOf smm:world-1-1 ; rdfs:label "Overworld" ; smm:contains smm:pipe-entrance-loc . smm:underground a smm:Room ; smm:partOf smm:world-1-1 ; rdfs:label "Underground" ; smm:contains smm:pipe-exit-loc . smm:pipe-entrance-loc a smm:Location ; smm:partOf smm:overworld . smm:pipe-exit-loc a smm:Location ; smm:partOf smm:underground . smm:green-pipe a smm:Pipe ; smm:entrance smm:pipe-entrance-loc ; smm:exit smm:pipe-exit-loc ; rdfs:comment "The pipe to the underground." .

VI — The HATEOAS Principle

A room in Mario is HATEOAS-compliant. The current state — where you are standing — contains the affordances for the next states. You do not consult a map. You do not read an API specification. You look at the room and the room tells you what you can do. The pipe is green and it points down and you know you can enter it because it looks like you can enter it. The door has a door-shape and you press up and the transition happens.

This is the principle: the representation contains the controls. The exits are in the room, not in a manual. The links are in the document, not in a schema. The next state is discoverable from the current state. The plumber does not need to know the level layout in advance. He discovers it by being in it.

Inform 7 — Affordances

A passage is a kind of thing. A door is a kind of passage. A pipe is a kind of passage. Every passage has a location called the here-end. Every passage has a location called the there-end.

Definition: a passage is available if the here-end of it is the location of the player.

Definition: a passage is visible if the here-end of it is in the room of the player.

Instead of examining a room, say "You can see [list of visible passages]. [if the number of available passages is 0]There is nowhere to go from here.[end if]"

The room is its own documentation. The room is self-describing. The room is — in the vocabulary of the family — self-embodying. It does not describe a format. It is the format. The pipes are the hyperlinks. The doors are the internal anchors. The coins are the content. The room is the page.

VII — What Comes Next

This is v0.1. The bounded context is established. The five traditions have met. The confusion of terms has been documented and resolved by stipulation. The first objects — level, room, location, door, pipe — exist in all four languages simultaneously.

Future versions will address:

Roadmap

v0.2Entities. Blocks, enemies, items. The things that inhabit rooms. Their BFO categories (object, role, quality). The Goomba problem: is a Goomba an object or a process?

v0.3Events. Jumping, breaking, collecting, dying. Occurrents. The temporal dimension. How a room changes over the course of being traversed.

v0.4Mario Maker constraints. The editor as an ontology editor. What can be placed where. The rules are the ontology's integrity constraints.

v0.5The clear condition. What does it mean to "finish" a room? A level? Teleology in the Mushroom Kingdom. The flag is a goal specification.

v1.0A working DSL. An Inform 7-like language that compiles to Mario Maker levels. The source code reads like prose. The prose compiles to rooms.

ROOM v0.1 — Daniel Brockman & Walter — March 2026

Traditions: BFO (Barry Smith) · Inform 7 (Graham Nelson, Emily Short) · RDF/OWL (W3C) · DDD (Eric Evans) · HATEOAS (Roy Fielding)

1.foo