paint-brush
Building blockchain games with confidentialityby@oasislabs
664 reads
664 reads

Building blockchain games with confidentiality

by The Oasis TeamMarch 14th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Oasis Labs just released an <strong>all-new </strong><a href="https://docs.oasiscloud.io/en/latest/gaming-sdk/" target="_blank"><strong>Oasis Gaming SDK</strong></a><strong> </strong>— a new tool that helps developers easily build and deploy turn-based and collectible blockchain games with built-in confidentiality.

Company Mentioned

Mention Thumbnail
featured image - Building blockchain games with confidentiality
The Oasis Team HackerNoon profile picture

Using the Gaming SDK from Oasis Labs

Overview

Oasis Labs just released an all-new Oasis Gaming SDK — a new tool that helps developers easily build and deploy turn-based and collectible blockchain games with built-in confidentiality.

Using confidential smart contracts, the SDK gives developers the tools to add confidentiality to any game and prevent game users from gaining info they shouldn’t have — peeking at others’ cards, predicting a card before it’s dealt, or seeing others’ moves before they’re ready. More generally, blockchain games also allow users to retain ownership of the things they win in any game — whether it’s kittens, collectible cards, or chips — and take them to other games in the future.

To see how the Gaming SDK works in action, get started by playing our retro versions of Poker, Battleship and Connect Four now. We’ve designed these all in a 16-bit design in a nod to the early days of gaming. We’re also making the source code for these games public so you can easily get started building your own.

More on the Gaming SDK

Gaming development that’s faster and easier

Blockchain games can be difficult to build. There are a number of dependencies with multi-player games in particular. To help avoid this complexity the SDK includes a number of pre-built functionalities that include:

  • Game flow management to track turns and update game state on the blockchain. We’ve designed an optimistic execution model, meaning that when a user makes a move it is executed in the browser while the transaction processes on the blockchain.
  • Network transport to send updates to each player as the game progresses. This includes state synchronization to ensure when the game state changes, the SDK updates the browser view for each player.
  • Integration with web frameworks to make it easy to build a web UI for your game.
  • Developer mode allowing you to debug the game engine and smart contracts in the browser. This is useful for testing and means you don’t have to worry about smart contract deployment until you’re ready to publish your game.

Using confidential smart contracts to prevent cheating

One risk of deploying online games is the the possibility that someone may try to hack your game and cheat — looking at players’ cards to inform their own bets or altering the moves of another player altogether. This is particularly risky for developers when the stakes of a game are high (think: online competitions and bets).

Confidential smart contracts are a great fit for blockchain games because they enable provably fair gameplay. Using smart contracts ensures players can’t circumvent the game rules, while confidentiality ensures the game’s sensitive data remains private. For example, a poker game built with confidential smart contracts can guarantee that players are able view only their own cards, and no one (including Oasis nodes) can cheat by viewing other players’ cards or looking at the deck beforehand.

By using confidential smart contracts the Oasis Gaming SDK seeks to enable gaming environments that prevent cheating and ensure players can’t see each other’s moves before they’re ready.

Get inspiration at the Oasis Arcade

To give you some examples of how the SDK can be used in practice, we developed three turn-by-turn games — Poker, Battleship, and Connect Four. They’re all retro-themed in a nod to the early days of gaming.

Deploy your game today

Games developed using the Oasis Gaming SDK are fully functional: they can be deployed to the Oasis Devnet and played live between users immediately. To help you get started we provide several example games built with the SDK including Poker, Tic-Tac-Toe, Connect Four, and Battleship. You can follow our tutorial to see how easy it is to build or you can develop an entirely new game yourself.

Build a game, win prizes

To kick off the launch of the Oasis Gaming SDK, we’re hosting our first digital hackathon. It’s pretty simple — build a game on the Oasis Devnet and we’ll reward the winner of the best turn-by-turn game and the best collectibles game with prizes including:

  • Your name on the Oasis Genesis Block
  • A new Nintendo Switch
  • A copy of Overcooked (one of our favorite games to play here at Oasis)

To compete, submit your best game no later than April 15. We’ll announce the winner by end of April.

Key Links:

For questions about Oasis Labs email us at [email protected] and we’ll get back to you ASAP.