Exploring blockchain and IoT in mobile gaming: location-based games

Max Samarin & Ahsan Monzoor, Rovio Entertainment Corporation

In SOFIE's mobile gaming pilot, the main areas of exploration are distributed ledger technologies and IoT in the context of mobile gaming. When thinking about all the millions of IoT devices today broadcasting signals, how could mobile games utilize that? Think about devices that are fixed to physical locations, such as Wifi routers, temperature and moisture meters.

One application that comes to mind is utilizing these devices in location-based gaming for positioning players. When used instead of or in addition to GPS, indoor positioning accuracy is improved (especially altitude). In addition, thanks to ephemeral identities (a protocol type that broadcasting devices may use) it is harder to lie about your real-world location. This adds verifiability to positioning, which is important in competitive games.

Scenario: IoT games build on a distributed business platform

 In this use case of our mobile gaming pilot, we imagine a hypothetical scenario where existing IoT devices are used for positioning players. An economy emerges with different actors, provoking a thought that such an economy could receive benefits if built on a distributed business platform. The main actors involved in such a platform would be:

 ●      Players who play location-based games, visit real world locations, and earn rewards. If rewards have real monetary value, players can trade these rewards on a marketplace.

●      Points of Interest (POI) are businesses with real world locations who choose to act as places to visit in games. These companies can also design the challenges for players and create rewards. For instance, if a cafe designs a challenge that ends at their shop, they may also give the player a discount voucher to their shop as a reward, which the player can also sell (a non-fungible token on the blockchain).

●      IoT device holders are people and businesses who own stationary broadcasting devices used primarily for other purposes. These actors may be the same as POIs, but not always. As a reward, IoT device holders would receive automatic micropayments through smart contracts on the blockchain as their devices are used also in games.

●      Game developers create different games that use the same domain of already deployed IoT devices. Some games may also choose to cooperate and design some virtual items and rewards in such a way that players can use them in both games. In such a case these items could be stored on a blockchain, outside both of the games.

●      Advertisers show ads to players, who potentially receive rewards for watching them.

 When no single company maintains such a business platform, it becomes worthwhile to research if distributed ledger technologies could provide the trust required between the different actors.

Scavenger Hunt game prototype

To test this idea and learn along the way about how to make a game that uses blockchain for specific features, we created a simple Scavenger Hunt game prototype. It is an example of a game that could exist on a business platform like the one mentioned above.

In the game, the player visits real-world locations solving clues and tasks. As they start the game, they can browse for nearby hunts, seeing their difficulties and rewards. Inside a hunt the player sees a clue on where to go next, and once the player is in the correct physical location, they will attempt to answer the question correctly by observing their surroundings. After the player solves all the tasks in a hunt, they receive rewards.

Architecture of the game

The mobile game client was made with Unity3D, and it detects the IDs of sensed nearby beacons that define the correct locations. When in the correct location, the task is provided by the game server.

The game server communicates with a managed blockchain - an implementation of Hyperledger Fabric on AWS. When a player starts a hunt, the rewards are moved from the hunt’s address to an escrow, and when the player completes the hunt, the rewards are moved from the escrow to the player’s address. The Scavenger Hunt is not a game prototype that runs a blockchain. Rather, it uses blockchain for specific features where DLT might bring benefits. That’s why we’re using a game server almost all of the game logic.

As for trading assets, that’s where public Ethereum comes in. The idea is to use the SOFIE interledger component to link these two blockchains together. Trading (e.g. transferring ownership of game items earned as rewards from hunts and advertisers) would happen on a public blockchain, and other transactions that do not need to be public would happen on Hyperledger Fabric. The Hyperledger Fabric blockchain is permissioned and serves all other actors than the players. It is for example where the micropayments for IoT devices would happen. It also allows for the possibility for new games to join and use the same business platform.

We identify and test use cases in an iterative manner - an inherent way of working in the games industry. This is our first test architecture that uses blockchain in gaming, and we’re keen on learning further how it can be improved.

DisclaimerThis prototype is not a commercial product we’re working on, but an experiment to test new technologies.