Magic Maze is a dApp game running on Tron network, in order to play it you need to install TronLink plugin on Chrome.
Different with ordinary maze games, the walls or barriers are invisible to players. Both players need to lock some TRX in order to start the game, and take turns to roll dice and move forwad. If you unluckily hit the wall, you will be bonced back to the origin. The first player who collect 5 gems win the game and take all locked TRX as bonus, paying 1 TRX as service fee.
Home page demo:
(For high quality video please click here)
Single player demo:
(For high quality video please click here)
You can use TronBox to compile & deploy smart contract on Tron network.
Don't forget to change private key & network in contracts/tronbox.js to your own before below steps (by default the contract will be deployed to Shasta test net):
cd contracts
tronbox compile
tronbox migrate
The backend is written in Go, so you may need to install Golang if it's not available.
cd back-end
./build.sh
./magic-maze
The frontend is written in vue.js + vux + TronWeb, so node.js and npm are required.
cd front-end
npm install
npm run dev
Then you can try the game on http://127.0.0.1:8080, enjoy!
- Refine PVP mode logic
- Use mysql as persistence layer
- Improve UI experience