Bitcoin Catcher Box
A box has all you need to get started with our Cocos Creator (BitcoinCatcher) tutorial.
Last updated
Was this helpful?
A box has all you need to get started with our Cocos Creator (BitcoinCatcher) tutorial.
Last updated
Was this helpful?
There are a few technical requirements before we start. Please install the following:
This project is not always brought up to date with the most recent version of Cocos Creator. Please make sure you are using Cocos Creator v2.1.
Install Punica CLI.
Unbox the bitcoin-catcher-box.
Install dependency.
Run Cocos Creator by double-click the CocosCreator.exe
file in the installation target folder or click Cocos Creator
from Start menu to start Cocos Creator.
For some Windows operating systems, the following error may be encountered:
It means the GPU rendering is not supported by the graphics card driver.
You can browse and open the project in the local file system by clicking the Open Other Projects button.
After initial building finished, please pay attention to the Assets panel, on which all the resource allocation graphs of the project are shown.
To see a preview of the game scene, please click the Preview button at the top of the editor window.
We have a smart contract in project contracts
folder. Therefore, we needn't to write a new contract, only need to compile and deploy it.
We need to compile our Python contract to bytecode for the Neo Virtual Machine (NeoVM) to execute. Think of it as translating our human-readable Python into something the NeoVm understands.
In a terminal, make sure you are in the root of the directory that contains the dapp and type:
You should see output similar to the following:
Now that we've successfully compiled our contract, it's time to deploy it to the blockchain!
You'll see one JSON file already in the contracts
directory config.json
. In this file, the following information will be used in deploying process.
Back in our terminal, deploy the contract to the blockchain.
You should see output similar to the following:
Punica is very easy when it comes to smart contract invoking, in that function can be executed with only provide parameters in JSON file.
In contracts/config.json
, the following information will be used in deploying process.
To invoke register()
function, you only need to back in our terminal.
You should see output similar to the following:
To test the register()
function, we can invoke get_user_nane()
function to get the current value store in blockchain.
If test success, it should returns the given user_name
. Therefore, you should see output similar to the following:
ontology-dapi is A lightweight Javascript library for interacting with Chrome Plugin which is integrated provider engine.
We can use it as ES6 module in our game scene's script.
We can also use it as CommonJS/ES6 module in our game scene's script.
After we regist with Provider successful, we can use it in our project.
cyano-bridge is library allows your dApp to interface with mobile wallet which is integrated provider engine.
We can use it as ES6 module in our game scene's TypeScript script.
We can also use it as CommonJS/ES6 module in our game scene's script.
After we regist with Provider successful, we can use it in our project.
Cocos Creator is a script development, entity-component and data-driven game development tool focused on content creation. An easy-to-follow content production workflow and a powerful suite of developer tools for game logic and high-performance game creation. For the more information, you can click to read Cocos Creator User Manual.
If you encountering problems running this command, please open a issue in .
Read more about migrations in the .