/adventure-chess

Chess Master Supreme

Primary LanguageJavaScript

ChessMasterSupreme

A spinoff of chess built with ERC721

URL for Front-end

Token Deployment

Commands

  • ganache-cli --gasLimit 0xffffffffff -p 8545
  • truffle compile && truffle migrate

Simple-IPFS

Commands IPFS

  • ipfs daemon
  • ipfs add -r <folder to host>
  • https://gateway.ipfs.io/ipfs/<address hash>

Task List by Parts

WebGL(THREEJS/AFRAME)

  • Allows users to interact with ERC721 token through 3D objects
    • [Click Pieces] Add RayCaster Functionality to pieces
    • Add 3D object import functionality
    • Download 3D object from IPFS & feed through loader
    • Be able to move objects
  • Implement Interfacing
    • MouseDown, MouseMove
    • Keydown
  • Set & Update UI 2D Mesh (green rectangle)
  • Add text functionality
    • 2D
    • 3D
  • Complete the Scene
    • Lighting
    • Sky Box
    • Object Materials
  • Optimize Deployment to AWS
    • Don't transfer all ThreeJS Files

IPFS(Dynamic Hash Table)

  • Allows free file storage over a decentralized network.
  • Store 3D objects on IPFS
  • Store entire front end on IPFS?

React-Native (not yet added)

  • This will allow cross-platform development between (iOS, Android, Web)

Token (ERC721)

  • Create a basic ERC721 Contract using OpenZeppelin-Solidity
    • Research Random() with solidity.
      • Error SHA3
  • Use truffle to Compile and Migrate Contracts
  • Setup truffle.js config using infura.io(or middleman.cx?)
    • More research on middleman.cx
  • Deploy ERC721 token with randomized strings
  • Add basic functionality to token such as
    • Game Mechanics

Task List

  • Host a simple website using IPFS
  • Deploy Token Contract to Ganache Testnet
  • Deploy Token to Live Test-Net (Ropsten)
  • Integrate IPFS with application to store 3D object data
  • Associate unique contract variables with 3D objects from IPFS
  • Integrate (Web3 || Middleman) to interact with Token using:
    • Contract ABI
    • Contract Address
  • Use React/React-Native to integrate ThreeJS/Aframe with React

Issues

THREEJS

  • Raycaster only changing based on camera lookAt position
  • Raycaster mouse click position slightly wrong

Token

  • Random function in Token Contract
    • Giving error with SHA3 implementation
    • Looking into Keccak

IPFS

  • Host a simple website
  • IPFS domain name

Fixes

  • Error when deploying contract: Gas amount was not enough
    • Possible Reason: This happens when the contract has abstract functions.
      • Make sure the contract has a constructor.

Backlog

Game Mechanics & ERC721

  • Each piece has a unique set of abilities.
  • Piece Unique Parameters:
    • (MD) Move Distance
    • (AP) Attack Power
    • (KD) Kill Direction
    • (CD) Cool Down
    • (T) Type
  • Parameter Logic:
    • (RR) Require Ratio: MD * AP * KD * CD = 1
      • Need to look into Translation to Token
    • Regardles off RR, AP = AP + X if Type advantage over opponent
  • Piece Game Parameters:
    • Health
    • Moves Left Per Round
    • Board Position
    • Location of Piece in Game(Deck, Board, Hand)

Sources