jquentin42's Recent Forum Activity

  • No, I've only messed around with Ethereum for now.

  • I posted an Addon post herewith more details.

  • Here are two plugins to integrate the Ethereum Blockchain in your game.

    Some details

    They both use the Web3 Javascript API version 0.2, so it works with all compatible browsers, like Metamask or Mist.

    Like in Web3, there are 2 ways to call most functions: synchronous or asynchronous (although some nodes like Metamask don't support synchronous calls).

    To call a function synchronously:

    • Just use the corresponding Expression or Action

    To call a function asynchronously:

    • Add the corresponding action, with a chosen callbackID parameter
    • Add an OnCallback condition with the same callbackID
    • Use Ethereum(or the EthereumContract).CurrentCallbackResponse to get the function's response

    The plugins

    :

    Ethereum

    Contains most functions in the Web3 API (let me know if some useful ones are missing). Go to the page linked higher for a complete list and descriptions.

    Ethereum Contract

    Facilitates communication with a smart contract. The contract's ABI and address are properties of the plugin, so an instance is created on the plugin's creation.

    The main actions are:

    • Call : Calls a constant function of the contract
    • Send : Sends a transaction to the contract

    Examples

    There is a simple example project in the github project.

    You can also look at this real life project that uses the plugin.

    Possible Improvements

    • Multiple contract addresses for the different networks
    • Implement CallSuchFunctionAndWait actions to use asynchronous functions like if they were synchronous (in the meantime, you can use WaitForSignal to do that)
    • Other improvements you will suggest
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here are the 2 plugins I use. One for all global ethereum functions, and one for ethereum contracts.

    https://github.com/jquentin/EthereumC2Plugin

  • Thanks for your feedback. I'll work on it.

  • Is there anyone out there playing around with the possibilities of blockchains for games?

    I created this simple card game "hosted" on the Ethereum blockchain.

    Simple gameplay: Each player plays one card and the payoff depends on the 2 cards (full description and examples in the game -> "Rules" section). It is kind of an advanced rock paper scissors with cards.

    To play, you need Chrome + Metamask + Ether on the Rinkeby network.

    Create a game using your someone's public address. Your opponent will see the started game and will be able to play his turn.

    Please let me know your thoughts!

    The prototype

    PS: I made an Ethereum plugin for C2 for this. If other people are interested in such a plugin, I am willing to make it more generic and publish it.

jquentin42's avatar

jquentin42

Member since 12 Dec, 2017

Twitter
jquentin42 has 3 followers

Trophy Case

  • 6-Year Club
  • Email Verified

Progress

7/44
How to earn trophies