Skip to content

An awesome RPG dungeon adventure game running on Blockchain and powered by Chainlink VRF!

License

Notifications You must be signed in to change notification settings

Sagar133/RPG-Solidity-Game

Repository files navigation

De-DungeonCrawler


Logo

Built for the Chainlink Spring hackathon 2021

Logo

De-Dungeon Crawler

An awesome RPG dungeon adveture game running on Blockchain and powered by Chainlink VRF!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

diagram

We created an RPG game that is powered by the Ethereum blockchain and ChainLink's decentralised Oracle Network and minting NFTs

game

We have chainlink price feed setup, We have our own ERC20 token named 'Dungeon' which we are assuming to be 1$. So if a players wants to play the game we get LINK/USD price from the price feed and equivalent amount of Dungeon token that person has to pay in return to play the game. In the game there are 4 - 5 chests which mints 20 dungeon token and there is one Link Token which when claimed finishes the game.

A player has 3 lives if he loses 3 lives he dies, he has to play again to get the dungeon token. On winning the game successfully, we reward user with a unique NFT (Non Fungible Token) which has randomness generated by Chainlink VRF,IPFS provider. There is a DAO where users (artists/story writers) share Monsters/Game Character images, stories/maps for the next level, in the form of an Open Artboard/Creation zone for creators, upon reviewing which will be approved by the game Admins.

nft

On a certain epoch the character and story with maximum votes raised will be awarded the 'Dungeon' token. And those characters and story would be implemented in the game.

Built With

We have used the following technologies for this project:

  • Ethereum (Ethereum blockchain ERC20 and ERC21 ethereum smart contracts)
  • Solidity (Language for writing smart contracts)
  • Chainlink (Chainlink VRFs for generating randomness and minting NFTs as rewards)
  • Phaser (For creating the RPG game)
  • Bootstrap (CSS framework)
  • ReactJS (web UI)
  • IPFS (P2P network for storing and sharing files in a distibuted file system)
  • Infuria (Access to Ethereum network)
  • Metamask (Wallet Provider)

There are many more

Getting Started

Instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

Make sure you have an Ethereum Wallet provider and NPM/Yarn package managers set up along with NodeJS. NPM can be installed with:

  • npm
    npm install npm@latest -g

Installation

Following are the instructions for running the web application locally. First navigate to RPG-Solidity-Game/blockchain/

  1. Get a free API Key at https://infura.io/ , and Etherscan

  2. Clone the repo

    git clone https://github.com/Sagar133/RPG-Solidity-Game

    First navigate to RPG-Solidity-Game/blockchain/

  3. First navigate to RPG-Solidity-Game/blockchain/ and Install NPM packages

    npm install
    yarn
  4. Enter your API in .env inside RPG-Solidity-Game/blockchain/ folder

    ETHERSCAN_API_KEY="Your ETHERSCAN API KEY"
    RPC_URL="https://rinkeby.infura.io/v3/{YOUR RINKEBY API KEY}"
    MNEMONIC="Seed phrase of your metamask wallet"
    SKIP_PREFLIGHT_CHECK=true
    PRIVATE_KEY="Enter exported private key of your ethereum wallet metamask"

    NOTE: NEVER SHARE YOUR API KEYS AND PRIVATE KEYS

  5. Run the web application locally:

 npm start
 OR
 yarn start

Following are the instructions for running the game locally:

  1. First navigate to RPG-Solidity-Game/ folder and Install NPM packages

    npm install
    yarn
  2. Run the game locally:

 npm start
 OR
 yarn start

Usage

This project can be scaled in future and we can create our own marketplace for creating own assets and minting NFTs and using the rewards. Blockchain empowers the gamers to own the cryptocurrencies and even convert them into fiat currency. A crucial issue blockchain hopes to tackle is the common problem of delay in payments to the e-sports players. Blockchain technology makes use of smart contracts on which people can build decentralized applications.

selection Hero Story
1 2 3

Contributing

Contributions are what make the open source blockchain community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

About

An awesome RPG dungeon adventure game running on Blockchain and powered by Chainlink VRF!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published