Dodging Turtis is an open-source NFT game template on the Polygon network that combines a Phaser arcade game, a React frontend, and Solidity smart contracts to reward players with dynamic Turtle NFTs.
What is Dodging Turtis?
Dodging Turtis is a decentralized arcade game where the player controls a Turtle NFT that dodges incoming platform rows. It runs on the MATIC Mumbai Testnet of the Polygon network and uses Chainlink oracles to bring NFT metadata hashes from IPFS and Filecoin into the smart contract. The project was built by Dinesh B S, Hardik Agarwal, Hritika M Kucheriya, and Suryashankar Das. The game awards 10 points for every row dodged, and the round ends when the Turtle collides with a platform. Each Turtle NFT has a unique name, randomized image, and speed attribute; higher speeds make the character move faster, helping players reach higher scores.
Key Features
- Dynamic NFT mechanics — Each Turtis token uses the ERC721 standard with symbol TRTL and holds a unique name, randomized image, and speed value that is assigned according to the player's checkpoint score.
- Chainlink oracle integration — The smart contract calls a custom Turtis-API through Chainlink's decentralized oracle network to fetch the IPFS hash of the NFT metadata.
- Decentralized storage — NFT metadata is stored on IPFS and Filecoin using nft.storage, keeping assets off-chain while hashes are recorded on-chain.
- In-game scoring system — Every row of platforms dodged adds 10 points; reaching a checkpoint at least 110 points above the player's previous high score mints a new random Turtle NFT.
- NFT marketplace — The DApp includes a marketplace where users can buy and sell Turtis NFTs and can view NFTs owned by other users even if they are not for sale.
- Speed-based rarity — Higher checkpoint scores yield NFTs with higher movement speed, making those tokens more desirable for trading.
- Verified smart contracts — Both the Turtis contract and the TurtisGameUserAuth contract are verified on mumbai.polygonscan.com with their code visible.
- Full development stack — Built with Solidity 0.6.6, Truffle 5.3.14, Phaser, React, OpenZeppelin, web3.js, and Alchemy as the Polygon node provider.
Who is it for?
- Blockchain game developers — can use the repository as a reference for combining a browser game engine (Phaser) with a React DApp and Solidity contracts.
- NFT enthusiasts and collectors — can play the game on the MATIC Mumbai Testnet, earn Turtis NFTs by reaching checkpoint scores, and trade them in the built-in marketplace.
- Smart contract learners — can study the verified contracts on Polygonscan, the Chainlink oracle request pattern, and the ERC721 metadata workflow from IPFS to on-chain.
- Hackathon teams — can fork the project to quickly prototype a play-to-earn game with a marketplace, since the contracts are verified and deployment instructions are provided.
What can you do with Dodging Turtis?
- Play the arcade game — Control your Turtle with left and right arrow keys to dodge platforms; each dodged row adds 10 points, and the game ends on collision.
- Earn and trade NFTs — Reach new checkpoint scores to receive random Turtle NFTs, then buy and sell them in the DApp marketplace.
- Run the project locally — Clone the repository at github.com/Hardikag17/NFT-Game, install dependencies with yarn, populate a .env file with Alchemy and Polygonscan API keys, and launch the DApp with yarn start.
- Inspect on-chain contracts — View the verified Turtis contract at address 0x22Ebc23a695F4fEcE850cEb8a38Df95BBf1011d5 and the TurtisGameUserAuth contract at 0x87D83BBE86A224d5B27e330a9d5D1D62EC710512 on mumbai.polygonscan.com.
How does Dodging Turtis work?
Connect MetaMask to the MATIC Mumbai Testnet via a custom RPC and fund it with test MATIC from a faucet. Select one of your Turtis NFTs, then play the game; the NFT's speed attribute controls how fast the Turtle moves left and right. When your score passes a checkpoint (at least 110 points above your previous high score), a new Turtle NFT is minted with a random image and a speed that scales with the score. The metadata for the new NFT is generated by the Turtis-API, stored on IPFS and Filecoin through nft.storage, and the IPFS hash is returned to the smart contract by Chainlink oracles.
FAQ
What network does Dodging Turtis run on?
Dodging Turtis is deployed on the MATIC Mumbai Testnet, a Polygon test network. To play, you need MetaMask connected to the Mumbai network via a custom RPC and some test MATIC tokens from a faucet.
What NFT standard does Turtis use?
Turtis implements the ERC721 standard with the token symbol TRTL. Each NFT has unique metadata, including a randomized image and a speed value that affects in-game movement.
How is NFT speed determined?
The speed is randomly generated but its range depends on the player's checkpoint score. Higher scores yield NFTs with faster speed, making them more valuable and easier to reach high scores with.
Are the smart contracts verified?
Yes. Both the Turtis contract and the TurtisGameUserAuth contract are verified on mumbai.polygonscan.com, and their source code and addresses are included in the repository.
Can I play without owning an NFT?
The game requires selecting a Turtis NFT to play. Since the project is deployed on a testnet, new NFTs can be earned by playing and reaching checkpoint scores, so no initial purchase is needed.





