Danger is near (play to earn game, gamefi on near chain testnet) - user play as a fireknight in a PIXELVERSE world who go to forest and kill monster.

Overview

Danger is near

Buy Me A Coffee

📄 Overview

Danger is near (play to earn game, gamefi) - user play as a fireknight who go to forest and kill monster. User can earn $DANGER token and score to compete with others user.

  • The contract code lives in the /assembly folder.
  • The game made by phaser framework

Both contract and client-side code will auto-reload as you change source files. The contract get/save user score & using OpenBlimp library to implementation of the NEAR Fungible Token Standard, consisting of:

The demo from challenge Dacade courses "NEAR Development 101": [https://dacade.org/communities/near/courses/near-101/]

And from "learnear.club" in order to get "NEAR Certified Developer" [https://learnnear.club/?mref=anhnt4288.near%40learnnear.club]

Technology stack

  • Next.js
  • Near SDK
  • OpenBlimp
  • ChakraUI
  • Phaser

Screenshots

  • Home Page Home Page Home Page
  • Game play Game Play
  • User Vault User Vault
  • Wallet Token Wallet Token
  • Leaderboard Leaderboard
  • GameplayOverview Gameplay Overview

Installing

To run this project locally:

  1. Prerequisites: Make sure you have Node.js ≥ 12 installed (https://nodejs.org), then use it to install [yarn]: npm install --global yarn (or just npm i -g yarn)
  2. Run the local development server: yarn && yarn dev (see package.json for a full list of scripts you can run with yarn)

Now you'll have a local development environment backed by the NEAR TestNet! Running yarn start will tell you the URL you can visit in your browser to see the app.

Build and deploy your contract

  1. Build the smart contract: yarn build:contract
  2. Deploy the smart contract near deploy --acountId= --wasmFile=out/main.wasm
  3. (Optional) In the assembly/index.ts file, you can modify the function ft_initialize` to replace the stub parameters with your own parameters.
  4. Use near-cli to initialize your fungible token near call ft_initialize --account-id (In the scripts folder you can find some files with a lot of useful commands.)
  5. Mint some token in your address: near call $CONTRACT ft_mint '{"account":$ID_ACCOUNT,"amount":"100"}' --account-id $ID_ACCOUNT
  6. Launch your Near wallet and begin interacting with your new token.
  7. Set contract name in code Modify the line in src/config.js that sets the account name of the contract. Set it to the account id you used above. const CONTRACT_NAME = process.env.CONTRACT_NAME || 'your-contract-here!'
  8. Testing contract: yarn test

⚒️ Game Built With Phaser 3

🕹️ Phaser 3

📝 Game Instructions

For the fire knight to be able to survive you need to dodge obstacles and kills monsters.

To Jump over obstacles you can use these following keys

    ⌨️ 'W' or 'SPACEBAR'

To Attack monsters you can use these following keys

    ⌨️ 'A' or  🖱️ 'LEFT MOUSE BUTTON'

To Drop faster (like Subway Surfer) you can use these following keys

    ⌨️ 'S' or  🖱️ 'RIGHT MOUSE BUTTON'

📜 Game Assets

Background Art

Forest Lite Pixel Art Tileset

Background

Character Art

Elemental Fire Knight

Elemental Fire Knight

Attack

player_jump

Death

Enemy Art

Bringer Of Death

Idle

Walk

Attack

Death

Sound Effects

Super Dialogue Audio Pack (death) by Dillon Becker. This work is licensed under CC BY 4.0

5exuIn


Game Over SFX obtained from Zapsplat

Music

Intro: VGMA Challenge (July 12th Challenge) by Abstraction

Game: A Mystical Journey by FATAL EXIT. Licensed under CC BY 4.0.

Ending: III. Finale: Slowly by Dee Yan-Key. This work is licensed under CC BY-NC-SA 4.0

Font

Arcadia by Alex Wan. This work is licensed under CC BY 4.0

LKtY+p

You might also like...

Bloxflip crash automation using the martingale strategy. Earn robux passively while you sit back!

bloxflip-autocrash Bloxflip crash automation using the martingale strategy. Earn robux passively while you sit back! ⚠️ WARNING This automation softwa

Dec 30, 2022

Decentralised Oracle Network for Subjective Data Feeds (testnet).

deOracle.xyz deOracle.xyz is a decentralised P2P oracle platform with a cross-chain reputation system for digital identities. Our goal is to bring rel

Oct 28, 2022

🥰 Mini world simulator is a terminal application made in JavaScript to control the world that is being generated.

Mini-world "Simulator" Mini world simulator is a terminal application made in JavaScript to control the world that is being generated. It has no other

Mar 14, 2022

Write "hello world" in your native language, code "hello world" in your favorite programming language!

Hello World, All languages! 🌎 📌 Write "hello world" in your native language, code "hello world" in your favorite language! #hacktoberfest2022 How to

Dec 13, 2022

This Next.js app is designed to be used with the Figment Learn Pathways, to help developers learn about various blockchain protocols such as Solana, NEAR, Secret, Polygon and Polkadot!

This Next.js app is designed to be used with the Figment Learn Pathways, to help developers learn about various blockchain protocols such as Solana, NEAR, Secret, Polygon and Polkadot!

👋🏼 What is learn-web3-dapp? We made this decentralized application (dApp) to help developers learn about Web 3 protocols. It's a Next.js app that us

Oct 1, 2022

Map of reception points for refugees near Polish-Ukrainian border

ua-2022-map Map of reception points for refugees near Polish-Ukrainian border work in progress... Development We provide a docker-based dev environmen

Dec 7, 2022

A daily print-and-play roguelike adventure you can play offline.

A daily print-and-play roguelike adventure you can play offline.

Chronicles of Stampadia A print-and-play roguelike with a new adventure every day! Play today's adventure | Read the manual | Learn how to play | Disc

Oct 15, 2022

Play AoPS's Reaper game on Discord!

Play AoPS's Reaper game on Discord!

Discord Math Games Bot by BDimension7 This Discord bot brings the AoPS Reaper game to Discord with additional features: Point donations Dueling Lifeti

May 16, 2022
Owner
Jason Factor
Full stack developer / Web3 / Adopted Decentralize tech / Opensource - Community developer contribute to save the world .
Jason Factor
Use thirdweb's token, edition drop, and a custom contract using thirdweb deploy to build a Play-to-Earn game!

thirdweb Play-to-Earn Example This example project is a simple Play-to-Earn (P2E) game! The Idea The game is a "mining" game, where your character min

thirdweb templates 28 Jan 2, 2023
Landing Page for Villagers.finance Play To Earn WEB3 Game, NFT Based.

create-svelte Everything you need to build a Svelte project, powered by create-svelte. Creating a project If you're seeing this, you've probably alrea

Ahmed DEMIAI 9 Sep 15, 2022
a discord-based monster catching game engine, used for Lozpekamon on our Discord server

discord-monster-catching-game a discord-based monster catching game engine, used for Lozpekamon on our Discord server How to Use Requirements install

Lospec 3 Oct 30, 2022
PokemonNFT started as Buildspace Project - "Create your own mini turn-based NFT browser game" - ROSE Emerald Paratime Testnet

Welcome to PokemonNFTGame ?? Buildspace Project - Create your own mini turn-based NFT browser game ✨ Demo Install npm install Usage npm run dev Blockc

Alberto Cruz Luis 7 Oct 3, 2022
Dark Forest v0.6

darkforest Dark Forest Game on Blockchain. To run this project you will need to be on Node 14 OR Node 16. local development Install dependencies We us

null 16 Dec 21, 2022
The world's fastest game! User gets ten dice. Then rolls and rolls as fast as they can until he gets all their dice on the same number.

tenzies-game The world's fastest game! User gets ten dice. Then rolls and rolls as fast as they can until he gets all their dice on the same number. I

Babur Shah Sayer 6 Nov 26, 2022
A decentralized streaming platform to incentivize anyone to be a producer and earn from their supporters

Web3Swim Tools Utilized: Front-End: NEXTjs with TypeScript Back-End: Solidity (Smart Contracts) + Moralis (Database) + Thirdweb (Middleware) Blockchai

Brian H. Hough | brianhhough.eth 12 Oct 14, 2022
Contribute in this repository by raising genuine PR. Get verified, merged and earn the free swags from Hacktoberfest 2022.

Webd-and-Blockchain-development Welcome to Hacktober Fest 2022 • EVERYONE IS WELCOME ✨ • Contribute anything in In web-development and blockchain-deve

Abhishek Rawat 13 Dec 29, 2022
Contribute on this repository with VALID PRs to HACKTOBERFEST-2022 and earn amazing swags!

LINK- https://rbshop.netlify.app/ Hacktoberfest2022 You can make folders of programming languages and also you can contribute in the repo's below. Fee

Ranodeep Banerjee 17 Oct 25, 2022
Container Image Signing & Verifying on Ethereum [Testnet]

cosigneth An experimental decentralized application for storing and verifying container image signatures as an NFT on Ethereum cosigneth, is a decentr

Furkan Türkal 17 Jul 4, 2022