GithubHelp home page GithubHelp logo

woody4618 / solanasummercap_solanarpgquest Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 3.0 9.57 MB

License: MIT License

Shell 0.54% JavaScript 10.67% Rust 42.03% TypeScript 45.07% CSS 0.06% HTML 0.14% Batchfile 0.01% Dockerfile 0.05% Less 1.41%

solanasummercap_solanarpgquest's Introduction

Solana RPG Quest Game

A lightweight pixel multicharacter, Play To Earn dungeon game built on the Solana Blockchain, built with Phaser, powered by Metaplex. Our motivation is to enable users to own what you earn

DECK Click to view

Logo

Built at Encode Austin Hackathon Remote Participant && Solana Summer Camp Hackathon

image

View the project demo on YouTube

ARCHITECTURE

Logo

FEATURES

We built a lightweight pixel Play To Earn dungeon game built on the Solana Blockchain, built with Phaser. Our motivation is to enable users to own what you earn

GAME DATA IS STORED ON-CHAIN WHICH MEANS THAT THE USER CAN'T COLLECT TREASURE (SPL TOKENS) PREVIOUSLY COLLECTED

  • Secure authentication with phantom wallet
  • In Game Store
  • NFT rewards as Level Passes that get stored in the Phantom Wallet
  • $DUN(Dungeon) Token Rewards as Loot (SPL token)
  • Auto save game progress on chain
  • Metaplex Game storefront for buying game characters and using them as game assets as NFT. Every character is Rare and has unique abilities.
  • Decentralised storage powered by ARWEAVE
  • Using Metaplex NFT storefront powered by Arweave, one can claim a character by minting it on the marketplace and later equip it by selecting/unselcting it from the trophy cabinet in the user's dashboard.
  • Swap $SOL for $DUN(game token), on serum DEX swap (ALPHA) in game to deposit token in escrow to play

Tech Stack

Anchor Frame along with Solana Program Library and Rust Smart Contracts were used to build the dApp and the game is built on React and Phaser.

image

Quick Start

This app requires the following dependancies. Before continuing, download and install them:

Update Environment Variables

Add candy machine config to .env

cp .env.example .env

For this demo we have added our env variables, Feel free to update them.

Running the program locally

cd program
npm run build // This will build the program
npm run deploy // This will deploy the program to the local solana network and copy idls generated to the client app.

Running the app locally

Install dependencies

cd client
npm install

Create a mint authority

npm run initialize

Start the development server

npm start

view game at http://localhost:3000/

Gameplay

Player has to defeat all the monsters, collect loot, get the keys to unlock the Solana token gate to pass the level. After finishing the level, the user get's a SPL NFT Token minted via the Metaplex Candy Machine Standard Contract and the metadata is stored on ArWeave.

Everytime, the user collects a chest, he is minted 20 DGN tokens as a reward

These tokens are not to be minted once collected. Progress of the game is stored on-chain via the Solana Escrow Program image

image

Choose Multiple Characters using metaplex

image

Screenshot 2022-06-12 at 6 51 04 PM

Screenshot 2022-06-12 at 6 51 20 PM

image

image

image

image

image

image

image

image

image

image


solanasummercap_solanarpgquest's People

Contributors

lopeselio avatar

Stargazers

 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.