GAMING IN BLOCKCHAIN: DECENTRALIZED APPS
At RavalMatic, we’ve been following the development of cryptocurrency-based games for a while. Although we are in the early stages, we can envisage a new trend in the video game industry. Games with cryptocurrencies offer new features to players.
The player is the true owner of the items he purchases in-game and can sell them to other players inside the game or in other secondary markets. Furthermore, those items could be transferred and used across different games.
Another interesting feature is total transparency and fairness. In general, Dapps (Decentralized Applications) code is open and anyone can review it. Users are free to even fork and create their own version of the game with independency of the developer. This transparency is clearly perceived in the way the game logic is executed. It takes place in smart contracts, which are scripts that are executed directly in the Blockchain. This makes any manipulation of the results impossible.
Our particular game is somewhat experimental. It’s a version of a classic board game originated in India. It uses a smart contract in the Ethereum Blockchain and gets the random numbers for the dice using an oracle.
Oracles are special Ethereum contracts that allow to get informations external to the Blockchain. This is necessary to prevent a malicious miner from manipulating the execution of the smart contract.
No server or payment platform is necessary. Communication with the blockchain is very easy, the web3.js library is used to allow the browser connection with the smart contract. Players use the browser extension Metamask to make the Ether transfer between the player’s wallet and the smart contract. Absolutely everything is made with web technology and no installation is required.