Howitzer - Gasless Blockchain Game using Thirdweb

The game was made for Ready Player 3 Hackathon

Try game

Howitzer is a tower defense game, where the player control a Howitzer in middle of a town and try to defend the Gates to prevent the enemies from entering the town by breaking the gates.

The Gates will auto attack the enemies, but the player can also help them to attack at faster rate by clicking the attack button for every gate.

Every enemy wave will last for 2 minutes, player must hold until the time is over. Every wave will be stronger than before.

Players will earn Gold token as reward for every wave they win. But player can buy Diamond token using MATIC if they want.

With Gold and Diamond token the player can buy special ammo, upgrade the gates and buy NFT skins for the Howitzer.

The population of the city will increase and decrease depending on the player's winning and losing status.

Game supports 3 wallets:

  1. Coinbase Wallet

  2. Metamask

  3. WalletConnect

Game is completely gasless using relayer by openzeppelin and attaching the webhook to Thirdweb sdk

The Tokens and NFTs are deployed Polygon Testnet using Thirdweb Dashboard.

Gold Token Drop

Diamond Token Drop

Marketplace

We have made a script named Web3.cs where we use Thirdweb sdk to interact with Smart Contract ( Tokens and NFTs ).

To use relayer in Thirdweb sdk, we have passed the GaslessOptions in ThirdwebManager.cs :

SDK = new ThirdwebSDK(chainIdentifiers[chain], new ThirdwebSDK.Options() {
            gasless = new ThirdwebSDK.GaslessOptions() {
                    openzeppelin = new ThirdwebSDK.OZDefenderOptions() {
                        relayerUrl = "https://api.defender.openzeppelin.com/autotasks/20973345-f104-4682-9bb9-2edf8849c5c3/runs/webhook/8db4ba89-3c75-4a75-9f0e-98d36b4337a3/Gr71P9nk6hnh1SapzHoYGw"
                    }
            }
        });