OCT 3rd 2007

RDF in video gamesBefore I started researching the Semantic Web I spent a few years as a hobbyist game developer. In fact, if you'd asked me 4 years ago what I'd be doing today I would have said "working on a game engine." I still enjoy game development and (naturally) playing video games as well. I often wonder how the Semantic Web will affect game development, and how games may take advantage of Semantic Web technologies. I've searched high and low (on Google) and haven't found a single written piece on people's ideas of the Semantic Web and video games so I will describe my own, as well as provide some visuals to give you a clear picture.

Opening up the virtual social graph

Many of you are probably already familiar with the concept of social graphs. Essentially a social graph is a representation of the relationships between people and what types of relationships those are. The idea is to create a global social graph that connects everyone and allows us to explore everyone's public relationships.

World of Warcraft social graphIn a game world such as World of Warcraft, your social graph might contain the members of the guild you are in, or other players that you have befriended. Everyone playing World of Warcraft is a real person and has connections to other real people (i.e. they also have social graphs). It's possible to connect your in-game social graph with your real-world social graph if the in-game friend information is exposed in RDF (possibly using the FOAF vocabulary). There's no reason why we can't (or shouldn't) connect one graph of friends to the other (in this case, our game graph to our real graph).

According to Wikipedia, on July 24th, 2007, Blizzard announced that the user base for World of Warcraft had reached 9 million players worldwide. That's a lot of player information, and would be a huge addition to the global social graph.

I've decided to use an imaginary namespace for World of Warcraft in the following examples. I will probably use few others as well to help illustrate how to store the information in RDF. An RDF export of your World of Warcraft character might look like this:

  1. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:wow="http://www.worldofwarcraft.com/ns/wow#">
  2. <foaf:Person>
  3. <foaf:name>James Simmons</foaf:name>
  4. <foaf:gender>Male</foaf:gender>
  5. <wow:Guild>Somekinda Guildname</wow:Guild>
  6. <wow:Character>
  7. <foaf:name>Krondor the Great</foaf:name>
  8. <wow:Level>62</wow:Level>
  9. <wow:Race>Orc</wow:Race>
  10. <wow:Class>Rogue</wow:Class>
  11. <wow:Strength>146</wow:Strength>
  12. <wow:Agility>359</wow:Agility>
  13. <wow:Stamina>239</wow:Stamina>
  14. <wow:meleeAttack>300</wow:meleeAttack>
  15. <wow:Power>685</wow:Power>
  16. <wow:Damage>212-291</wow:Damage>
  17. </wow:Character>
  18. </foaf:Person>
  19. </rdf:RDF>

That's just World of Warcraft! There are so many online worlds that would be perfect candidates to open their data. EVE Online, Everquest, and PlanetSide just to name a few.

Storing world data in RDF

Continuing to use World of Warcraft as an example, the game can store character, item, and world information in RDF. In the following screenshot you see an item called the Nightslayer Gloves:

World of Warcraft stats

We can store that item's information in RDF. Here is a simplified example of what that might look like:

  1. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:wow="http://www.worldofwarcraft.com/ns/wow#">
  2. <rdf:Description rdf:ID="NightslayerGloves">
  3. <wow:Name>Nightslayer Gloves</wow:Name>
  4. <wow:Armor>125</wow:Armor>
  5. <wow:Strength>+12</wow:Strength>
  6. <wow:Agility>+18</wow:Agility>
  7. <wow:Stamina>+17</wow:Stamina>
  8. <wow:fireResistance>+7</wow:fireResistance>
  9. <wow:minLevel>60</wow:minLevel>
  10. <wow:Classes>Rogue</wow:Classes>
  11. <wow:Durability>40</wow:Durability>
  12. <wow:maxDurability>40</wow:maxDurability>
  13. </rdf:Description>
  14. </rdf:RDF>

As you can see it's pretty trivial to store item game world information in RDF. Information about your character can also be exposed with RDF and made available on the Web, as we saw with the social graph example above.

Using information from the Semantic Web

It's possible for games to query the Semantic Web just as any other application can. The Semantic Web is young, and we've yet to see what amazing things people will develop on top of it. That said, it may be too early to speculate on what games might do with data queried from the Semantic Web.

One possible use for data queried from the Semantic Web could be using an RDF source to adjust in-game weather conditions in real-time to match your local area's weather conditions. Maybe one day you'll be playing The Sims 4 and your characters will get soaked as the rain begins to pour outside your window.

Weather changes in The Sims

Here is a sample of the kind of information a game could pull in about the weather of a location:

  1. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:weather="http://www.weather.com/ns/weather#">
  2. <weather:localWeather>
  3. <weather:City>Corona</weather:City>
  4. <weather:State>CA</weather:State>
  5. <weather:Temperature>66°F</weather:Temperature>
  6. <weather:Forecast>Clear</weather:Forecast>
  7. <weather:Humidity>68%</weather:Humidity>
  8. <weather:windSpeed>20 MPH</weather:windSpeed>
  9. <weather:Barometer>30 IN</weather:Barometer>
  10. <weather:Dewpoint>55°F</weather:Dewpoint>
  11. <weather:heatIndex>66°F</weather:heatIndex>
  12. <weather:windChill>66°F</weather:windChill>
  13. <weather:Sunrise>6:45 AM PDT</weather:Sunrise>
  14. <weather:Sunset>6:33 PM PDT</weather:Sunset>
  15. </weather:localWeather>
  16. </rdf:RDF>

While simulation games may benefit the most from pulling information from the Semantic Web, sports games could possibly benefit from updated sports statistics. Madden NFL 2010 might query Yahoo Fantasy Football to get updated statistics on who is injured, then update your game's roster accordingly.

The same can be done with game event information. During the NBA playoffs your favorite basketball game might query the Semantic Web to find out who is play in each game, then setup your matches accordingly. Every year you could play the current year's playoffs, talk about extended game life!

Using game world information in the Semantic Web

Most information on the Semantic Web might not be useful in video games because most video games take place in fictional worlds and times. Information about the game world can be much more useful for us on the Semantic Web, however. Imagine being able to query the Semantic Web to discover which of your friends on World of Warcraft are online (thanks to the social graph!), or which faction currently has the most control in PlanetSide.

You could also make countless widgets whose only purpose is to display whatever game information you can possibly desire. It would be nice to click the Home icon in your browser and be brought to your start page (iGoogle, Pageflakes, etc) and in a glance be able to see which of your friends are online in which games, or if the power-hungry admin is logged into that awesome 24-hour de_dust server.

It's possible that one day game worlds will be built upon open standards and we will be able to freely query these worlds and interact with them. If that becomes possible, we will blur the line between the Web and the game worlds themselves. In the future it may not be uncommon to interact with a game world from your start page, your cell phone, or your refrigerator (assuming we take more steps towards convergence).

Server lists and game world statistics

In games like Counter-Strike and Unreal Tournament where you have to select a server from a server list, the list can be made available in RDF form. In fact, the entire system could run off an RDF store and the server list could also be made available on the Web. This could result in high-interoperability between server list hosts and querying one of these servers for the right type of game would be trivial.

Steam server list

It's also possible for each individual game server to export RDF data about what's going on in the game (as we talked about earlier with the widgets). This could lead to some very interesting interaction between the Semantic Web and game worlds.

Just as easily as we can store item information from World of Warcraft, we can do the same for server information. Below is an example of the output of a Counter-Strike server's game world stats in RDF:

  1. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:cs="http://www.counter-strike.net/ns/cs#">
  2. <cs:Server>
  3. <cs:serverName>CS at GameServer.com</cs:serverName>
  4. <cs:serverAddress>cs32.gameserver.com</cs:serverAddress>
  5. <cs:serverPort>27015</cs:serverPort>
  6. <cs:numPlayers>24</cs:numPlayers>
  7. <cs:maxPlayers>32</cs:maxPlayers>
  8. <cs:currentMap>de_aztec</cs:currentMap>
  9. <cs:nextMap>de_dust</cs:nextMap>
  10. <cs:previousMap>cs_italy</cs:previousMap>
  11. <cs:timeLeft>00:03:45</cs:timeLeft>
  12. <cs:Player>
  13. <cs:playerName>Airborne Ranger</cs:playerName>
  14. <cs:playerDeaths>7</cs:playerDeaths>
  15. <cs:playerKills>36</cs:playerKills>
  16. <cs:sessionLength>01:07:29</cs:sessionLength>
  17. </cs:Player>
  18. ...
  19. </cs:Server>
  20. </rdf:RDF>

Your Semantic Web agent in the game world

If you're not familiar with the concept of agents in the Semantic Web, they are your own personal sidekick that will perform tasks for you against Semantic Web data. Ideally our personal Semantic Web agents will one day be able to travel with us anywhere we go, and be accessible from any device. While we don't yet have Semantic Web agents, we can still envision what we'll be able to do with them.

The fairy agentSome games may allow you to enter the URI of your Semantic Web agent and give it an in-game representation (possibly as your sidekick, or the voice over on an English woman). Your agent may be able to help you fight enemies, or just keep you up to date on what's going on with your friends in the social graph. A Semantic Web agent could also be used to alert you of new information about tasks you've told it to complete (while you're playing your game). It may also be possible for your Semantic Web agent to persist information about each game session so that you can access that information later.

Of course, I'm sure not all games will try to take advantage of every feature your Semantic Web agent can offer. Would having an agent constantly updating you with your latest messages ruin your gaming experience?

Checking my email in Doom 3

How game companies can benefit

If they decide to express all their internal game data in RDF they have a well-defined framework for storing and processing game data. You can store just about anything but binary game data in RDF, which helps to unify the tool chain and ensures that game data can be ported to future applications with minimal effort, maximizing reuse of data.

Opening game data allows users to essentially get more into the game by incorporating the game world into other facets of their lives (either through widgets as we talked about earlier, or through their Semantic Web agent reporting to them the game stats they request. In turn users are more likely to continue playing the game or play the game more often.

Game technology vendors like id Software and Epic can benefit from using RDF because it allows data to easily be passed between tools. Since RDF is an open standard, other middleware vendors use it as well (increasing interoperability in the game industry). Perhaps open source game engines like Ogre can take the lead and begin supporting RDF data.

If a game development house is using RDF for its game data and they decide to license a piece of middleware, they would benefit if the middleware could automatically understand and work with the existing game data.

Looking towards the future

The possibilities are truly endless. We've barely scraped the tip of the iceberg! As the Semantic Web evolves into a reality we will see more applications for the Semantic Web in video games, guaranteed. I didn't even go into the emerging genre of social virtual worlds (e.g. Second Life), where there are possibly even more applications for RDF data. Do you have any ideas that I didn't think of?

About the author

James Simmons

It's my goal to help bring about the Semantic Web. I also like to explore related topics like natural language processing, information retrieval, and web evolution. I'm the primary author of Semantic Focus and I'm currently working on several Semantic Web projects.

Trackback URL for this entry:

http://www.semanticfocus.com/blog/tr/id/324234/

Spam protection by Akismet

Comments for this entry:

No one has left a comment for this entry. Be the first!

Post a comment

  1. Spam protection by Akismet