The World Model

The WorldModel encompasses the spatial object model, as Inform's literate source puts it. This provides us with everything to specify the layout of the game world, the objects within it, and properties they have. For instance, Things and their name and description and Rooms having mapConnections.

Sections

  • WorldModel and WMx Type Families - A neat trick to allow us to extensively parameterise our universes of types (Objects, Directions, Values, etc) without having to write out a dozen type parameters.
  • The World State - The record type that holds the game state.
  • Objects - Entity, Object, Store and how these three types form the backbone of the lookup model.
    • Entities and Stores - Spoilers: newtype wrappers around Ints and newtype wrappers around newtype wrappers around IntMap and making it slightly less painful to deal with object lookups.
    • Objects, Things and Rooms - Probably the most important part, actual game objects.
    • Reification - Dealing with dynamic objects, because doing things as text substitutions is kind of awkward.
    • ObjectLike - Some helpers for things which act a bit like Objects, but aren't actually Objects (necessarily).
    • Object Specifics and Object Data - The section that I could never remember the order of, the components that make Things things (ObjectData) and Supporters supporters (ObjectSpecifics).
  • Properties - Smaller parts of ObjectSpecifics that can be shared by many types of Object.