Code Monkey home page Code Monkey logo

rpg-solidity-game's Introduction

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.

Contact

  1. SAGAR BEHARA - Sagar Behara - [email protected]
  2. ELIO JORDAN LOPES - @Lopes_el17 - [email protected]
  3. YASH AGARWAL - @yashragrawal98
  4. Elvin-Skaria
  5. Ramesh Sachan - @holps-7
  6. Rishab Keshan @rishabhkeshan
  7. Gokul J Kurup @madrigal1

rpg-solidity-game's People

Contributors

elvin-skaria avatar holps-7 avatar lopeselio avatar madrigal1 avatar rishabhkeshan avatar sagar133 avatar

Stargazers

 avatar

Watchers

 avatar

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.