Search code examples
schema.orggame-developmentstructured-data

How can I represent pages that are game levels in Schema.org?


I'd like to add Schema.org (with Microdata) to a browser-based game. The entire website would be considered a VideoGame, so it seems appropriate to mark up each page as a VideoGame in the <html> tag and label the "Home" link with sameAs property.

However, there are individual pages for each puzzle level (each "system"), as well as pages for collections of levels ("clusters"). How do I mark these up? gameLocation and gameItem are both vaguely equivalent properties, but are not good matches. I would love to be able to make each System and Cluster its own item instead of just a property of the parent VideoGame.

How do I represent individual levels of a game on each level's page?


Solution

  • Instead of using the sameAs property to link from each occurence of the VideoGame entity to the game’s homepage, you could give your game a URI and use this URI as identifier for each entity.¹ The url property could be used to link to the game’s homepage. The sameAs property could be used to link to a Wikipedia page etc. about the game.

    The VideoGame entity represents the whole game, gives metadata about the game, etc., but this type itself is not meant to represent specific parts of your game.

    If using its gameLocation property, you do have an own item (e.g., Place). The same with the gameItem property (e.g., Thing). These are properties of VideoGame because otherwise there would be no relation between the game and the locations/items it contains. Of course you could have a Place/Thing as top-level item and use the reverse² properties to reference the VideoGame, but that’s just an implementation detail, it doesn’t change the data.

    However, Schema.org’s focus is of course not on video games, so most game content can’t be represented adequately. For example, gameLocation might not really be appropriate for puzzle game levels, unless e.g. a game character actually visits a puzzle in the game.

    If you want to provide more detailed structured data about your game content, you’d have to use a different, ideally game-focused, vocabulary (and/or wait for or suggest a Schema.org extension).


    ¹ Microdata: itemid / RDFa Lite: resource / JSON-LD: @id
    ² No standard way in Microdata (itemprop-reverse proposed) / rev in RDFa (not RDFa Lite) / @reverse in JSON-LD