TL;DR A decentralized Flappy Bird clone making use of NFTs.
Flutter Bird imitates the minigame "Flappy Bird" which domitated the AppStores in 2014. On top of that Flutter Bird adds one basic feature to the original game: The ability to play with alternative skins. These skins are realised as NFTs on the Ethereum Blockchain. The Purpose of Flutter Bird is to demonstrate the processes of an Ethereum Authentication and Authorization with NFTs within a Flutter Application. Flutter Bird has been developed as part of my bachelor thesis.
The Frontend Application is built with Flutter. The Game Logic as well as Authentication and Authorization processes are implemented in this application. The Flutter Application is referred to as Flutter Bird App. It runs on iOS, Android and the Web.
The NFT-Collection consists of 1000 Image Files that each represent a different skin for flutter bird. These images are stored in the IPFS and ownership is managed with an ERC-721 Smart Contract. The Smart Contract is referred to as Flutter Bird Skins. It has been deployed on the Ethereum Testnet "Goerli". Flutter Bird Skins can be found on Etherscan and on OpenSea.
- Flappy Bird Clone
- Play Flappy Bird
- Track your Highscore
- Authenticate using a Crypto Wallet and your Ethereum Account
- Use your Flutter Bird Skin NFTs to play the game
Client: Flutter application for iOS, Android and Web
Blockchain: Ethereum (Goerli Testnet)
Smart Contract Standard: ERC-721
Node Provider: Alchemy Supernode
Storage: IPFS
- Install Flutter
- Setup your own Alchemy Supernode (free plan)
- Clone project
git clone https://github.com/Tonnanto/flutter-bird
- Create
secrets.dart
file atflutter_bird_app/lib/secrets.dart
. - Add the following contents to the file and insert your alchemy api key:
const alchemyApiKey = "YOUR_ALCHEMY_API_KEY";
- Go to apps directory
cd flutter-bird/flutter_bird_app
- Install dependencies
flutter pub get
- Run app on an available device.
Hint: Use an IDE to comfortably connect real mobile devices or mobile simulators. Browsers should be available by default.
flutter install
flutter doctor
flutter analyze
More info here
In order to use a Flutter Bird Skin in the game you need to mint one first.
- Set up an Account on the Goerli-Blockchain (Use MetaMask for example).
- Deposit some free GTH in your Account with a Faucet (0.01 GTH + Gas per Skin).
-
Visit the contracts page on etherscan.
-
Find a skin that has not been minted by entering values between 0 and 999 in the
ownerOf
function. If it returns an error, the skin has not been minted, and you can proceed to the next step. If no skin is available, you have to buy one on a secondary market like OpenSea. -
Go to Write Contract
-
Click "Connect to Web3" and connect your wallet.
-
Use the
mintSkin
function and enter 0.01 as thepayableAmount
, and the token ID from step 2 as thenewTokenId
-
Click "Write" and confirm and sign the transaction with your wallet.
-
Once the transaction is successful, you have successfully minted a skin that you can use in the Flutter Bird App.