World Giving Things Location - Multi-User-Domain/vocab GitHub Wiki

For objects to co-exist in your game world they of course have to have a location. Typically, these are co-ordinates on a 2D or 3D map, but it could also commonly correspond to latitude/longitude on planet Earth, for example. For representing maps, see the guide on that

Coordinates on a Game Map

In mid-2022 I (Calum) searched the web for ontologies pertaining to 2D/3D coordinates which could be reused to represent character locations. I then added two new properties to mudworld:

  • mudworld:hasMapInhabitants: An array of objects which exist within the map space (e.g. characters and buildings). Represented by their coordinates and by their data
  • mudworld:inhabitantData: points to an object which describes the inhabitant data (e.g. a character or building)

Example:

{
  "@context": {
     "coordinates": {
      "@id": "https://w3id.org/mdo/structure/hasCartesianCoordinates"
    },
    "x": {
      "@id": "https://w3id.org/mdo/structure/X_axisCoordinate"
    },
    "y": {
      "@id": "https://w3id.org/mdo/structure/Y_axisCoordinate"
    },
    "z": {
      "@id": "https://w3id.org/mdo/structure/Z_axisCoordinate"
    },
    "hasMapInhabitants": {
      "@id": "https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudworld.ttl#hasMapInhabitants"
    },
    "object": {
      "@id": "https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudworld.ttl#inhabitantData"
    },
  },
  "hasMapInhabitants": {
    "_Player_Pericles2668139190": {
      "coordinates": {
        "x": 20,
        "y": 3,
        "z": 0
      },
      "object": {
        "@id": "_Player_Pericles2668139190",
        "@type": "https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudchar.ttl#Character",
        "http://www.w3.org/2006/vcard/ns#fn": "Pericles"
      }
    },
  }
}

Geolocation

In early 2023 I (Calum) did some research into geolocation ontologies. I found WikiData and decided to copy their property for world coordinates, which uses the geosparql ontology. E.g. from their entry on London Hackerspace

@prefix geo: <http://www.opengis.net/ont/geosparql#> .

# ...

wdt:P625 "Point(-0.2900229 51.5539268)"^^geo:wktLiteral ;

And so I recommend you do the same for your game objects, when they need to be given location using latitude/longitude co-ordinates