Skip to content

It's a small personal project-game where the main goal is to raise a pet (aka Tamagotchi), with the reward being the opportunity to mint an NFT. In the future, the token can be used as a character in the game.

License

Notifications You must be signed in to change notification settings

profffff/nftpetapp

Repository files navigation

https://github.com/profffff/nftpetapp

NFTPET App

Demo: https://nftpet.netlify.app/

It's a small personal project-game where the main goal is to raise a pet (aka Tamagotchi), with the reward being the opportunity to mint an NFT. The token can be used as a character in the game.

project preview

A self-made collection of NFTs, strikingly reminiscent of Pokémons.

nft collection

How to play

To get a reward (NFT), you need to poke 15 times on the correct buttons and the pet's mood should be good (8) or better. Incorrect actions lead to a decrease in mood.
Stages:
0 dead
1-2 angry
3-4 sad
5-6 neutral
7-8 good
9-10 happy
P.S. The supply of NFTs available is limited to 1500, and may run out. Have fun!

Running Locally

Clone project locally

Create .env.local file in the root directory (check .env.example to see what needs to be included)

Install dependencies:

npm install

Run the development server:

npm run dev

Open https://localhost:3000 with your browser to see the result.

Stack

  • Programming language: TypeScript
  • Frontend framework: React.js
  • Framework for server-rendered React applications: Next.js
  • Game development framework: Phaser
  • Smart-contract: Thirdweb
  • Blockchain interaction framework: Wagmi
  • TS interface for Eutherium: Viem
  • HTTP client: Axios

Project Structure

  • components - Contains the React components.
  • src - Contains the game source code and app entry points.
  • src/app/page.tsx - The main Next.js component.
  • src/app/App.tsx - Midleware component used to run Phaser in client mode.
  • src/game/PhaserGame.tsx - The React component that initializes the Phaser Game and serve like a bridge between React and Phaser.
  • src/game/main.tsx - The main game entry point. This contains the game configuration and start the game.
  • src/values/constants/gameConstants.ts - Game settings
  • public/assets - Contains the static assets used by the game.

Blockchain

Amoy Testnet for Polygon PoS

DevTools

Google Lighthouse Score: 77

Bugs (to do)

src.IndexOf error after minting the NFT
happy animation glitch along the Y-axis
disfunction of the scene manager due to init() in the main scene
css libraries are not used properly (just unnecessary dependencies)

Useful links

Contact

Feel free to get in touch
Nik

About

It's a small personal project-game where the main goal is to raise a pet (aka Tamagotchi), with the reward being the opportunity to mint an NFT. In the future, the token can be used as a character in the game.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published