Let's say I want to create a shooter game, and a smart contract increments each time a player manages to shoot a target. Is there a way to call this smart contract in a decentralized way, using an oracle for example, so that no one can call the smart contract except the game itself (without to have the whole game coded in the smart contract)? I understand it's possible with games such as rock/paper/scissors, chess or casino-like games, raffles etc., but I'm wondering what are the limitations of smart contracts regarding gaming.

Edit: Sorry if I wasn't clear. The FPS game example was bad. In the case of a game like Tetris or Pacman, in a 2vs2 mode, the winner is the player with the highest number of points. What would be the most decentralized way to tell the smart contracts the number of points for each player at the end of the game, and then let the smart contract unlock a prize for the winner? Is it something achievable without a server communicating the winner to the smart contract, which is not decentralized? I feel like I'm still unclear sorry.

  • I don't understand what you mean. What you are calling "dencetralize way" seems very centralized and it seems you don't get what is an oracle Consider to read about and rephrase your question opentezos.com/smart-contracts/oracles
    – Thomas
    Oct 11, 2022 at 23:16
  • Keep in mind that on Tezos block times are currently 30 seconds, and there are no guarantees your smart-contract update will make it into the next block. Having to wait 30-60 seconds per shot in a shooter game is not going to be realistic
    – Simon McLoughlin
    Oct 12, 2022 at 8:24


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.