Oasis Office Hours Recap
Confidential Gaming SDKs, Confidential Smart Contracts, Demo Games, and more
This week we hosted our second developer office hours — this time focused on our new Gaming SDK. CTO Raymond Cheng and CPO Noah Johnson talked about how to use the new Gaming SDK, why we built it, and shared some demos games to help you get started. They also took more general questions from developers.
If you missed this month’s office hours, don’t worry — you can watch the full office hours here, or check out some highlights below.
Gaming SDK questions and demos
Q. Where can I learn more about the Oasis Gaming SDK?
We have a number of documents and tutorials to make building a game on the Oasis platform easy to do. Here are a few resources to get started:
- Overview of the Oasis Gaming SDK
- Documentation and source code
- Demo games on the Oasis Arcade
- Info on our Digital Hackathon
Building a game with the Oasis Gaming SDK
Q. Why is confidentiality important for online games?
The challenge with traditional blockchain platforms is that all of the state and data for smart contracts is public. As a result, anyone in the world can read the state of any given smart contract or ledger. For competitive online games however, you probably need to keep some state of the game secret. For example if you’re playing a card game like poker you want to be sure that no other player can see your cards. You also want to be sure miners on the network can’t see your cards — otherwise you may worry about miners actually cheating or colluding with another player.
The Oasis Gaming SDK seeks to solve this problem, making it easier to use confidential smart contracts in game development. This ensures state secrecy and can prevent the type of cheating described above.
Demo games built with the Gaming SDK in the Oasis Arcade
Q. This game was optimized for turn-based games. Could it be used for real-time strategy games too?
Yes. The example games that we launched had the entire game run as a smart contract for simplicity. The benefits of the smart contract are (1) no one can cheat; (2) you add secrecy and no one can view the secret state. In reality however, that doesn’t mean that all aspects of the game need these elements of secrecy.
Games are very complex. For example real-time games, interactive games, games that over chat elements — those things don’t necessarily all need to be run directly on a blockchain. What you want to run on a blockchain is just the piece that is critical is the correctness and fairness of the game. You could implement a lot of the game on another server and just use smart contracts for a portion of the game that guarantees secrecy and fairness.
Q. How can I build NFT games using the Oasis Gaming SDK?
The SDK is used to define game logic — verifying moves, choosing the winner, and adding confidentiality. That leaves a lot of room for a developer to add other elements on top of that — including adding assets to the game. In the implementation of the game for example you could allow a user to win certain assets on top of that and add that to your smart contract. Because the interface for NFTs is pretty straightforward (look at our tutorial for examples), this is an easy thing that can be added to any game you’re building using the Oasis Gaming SDK.
Q. How can I build a chat app on the Oasis Devnet?
We have some great resources to get started with a chat app on the Oasis Devnet. Take a look at the secret ballot tutorial as a way to get started. We’ll also have more to share on this topic soon.
Q. Why did Oasis choose to support Rust as a language?
By adding Rust support to the Oasis Devnet, our goal is to make it easy for developers to write complex applications. For example, Rust allows developers to write general-purpose code with custom data structures. Developers can also make use of third-party Rust libraries developed and maintained by the Rust community such as machine learning, data serialization, and other utilities. Existing Rust code can be converted into a smart contract for the Oasis Devnet, often with few modifications.
You can also read more about Rust and why we’re using it here.
For questions about Oasis Labs email us at email@example.com and we’ll get back to you ASAP.