Coder Social home page Coder Social logo

magic-maze-2d's Introduction

Magic Maze

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.

1.Demo Videos

Home page demo:

(For high quality video please click here)

Single player demo:

(For high quality video please click here)

2.Game Workflow

3.Deploy Smart Contract

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

4.Run Backend Server

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

5.Run Frontend dApp

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!

6.Future Plan

  • Refine PVP mode logic
  • Use mysql as persistence layer
  • Improve UI experience

magic-maze-2d's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.