Coder Social home page Coder Social logo

sbnair / substrapunks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uniquenetwork/substrapunks

0.0 1.0 0.0 33.19 MB

Substrate based remake of CryptoPunks game

License: Other

JavaScript 98.81% HTML 0.40% CSS 0.44% Shell 0.01% Rust 0.33%

substrapunks's Introduction

SubstraPunks

Project Description

This is a Substrate based remake of CryptoPunks game, a classic game that inspired ERC-721 Ethereum standard.

10,000 unique character images were generated from a brand new set of face parts and put on IPFS network (can be accessed by this link at UseTech IPFS Gateway: SubstraPunks - IPFS) to prove that games and other applications that use our NFT Chain can be fully decentralized.

Each character has its set of features that is programmed into the NFT TestNet Blockchain. NFT Pallet stores details about each Punk whether it has Brown Beard, Orange Hair or smokes a Pipe, and the IPFS hosted web page retrieves these details from NFT Chain, so the game becomes completely 100% serverless.

Originally, like with CryptoPunks game, these characters can be claimed, but unlike CryptoPunks, claiming is done through an Ink! smart contract that initially owns all characters. When a user presses Claim button, a Polkadot{.js} extention is asked to sign the claim transaction and in 6 seconds the punk is yours!

Finally, we exercised our new economic model. Even though claiming punks requires gas, the transfers are free. You can transfer the punk to some address with 0 balance, and then transfer it back without spenging any gas.

Please see the complete Hackusama Walk-Through Guide for demonstration of all features of Unique Network.

Kusama Hackaphon Update

Before the Kusama Hackaphon the SubstraPunks game was using VueJS and backend for claiming punks, and was meant to be hosted. Hackaphon changes made this game completely decentralized, we replaced LarvaLabs images with our own, added smart contract claiming, and updated all pages.

Claiming Punks

You need to have Polkadot{.js} extension installed.

Navigate to a Punk that has no owner set and click "Claim" button on its page. Choose your Polkadot{.js} address, claim, and enjoy ownership!

Hacking

Pre-requisites

In order to run substrapunks for local development, you will need NodeJS 12 and a running NFT Chain node.

Starting punks locally

Here is the game initialization process.

punk_collection.js creates NFT collection and sets the admin address. punk_importer.js imports punks on-chain. app.js starts NodeJS Express application on port 3002.

npm install

cd scripts
node punk_collection.js
node punk_importer.js

cd ..
node app.js

Legal Notice

Art and images included in this repository are the property of UseTech Professional.

substrapunks's People

Contributors

gregzaitsev avatar usetech-llc avatar

Watchers

James Cloos 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.