project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

OG Tafl

On-chain Hnefatafl game with collectible King NFTs that could be won in battles

OG Tafl

Created At

Superhack 2024

Project Description

User is allowed to mint one King NFT for free in case if they don't have any, then use it to createa game. Their opponent accepts the game by staking their king in the game.

The target of the defender is to reach the corner of the board. The target of the attacker is to capture a king.

The winner takes the King NFT from the loser. There are different kinds of Kings, the target is to collect all of them.

How it's Made

React frontend, connected to smart contracts that enforce game rules and handle NFT transmission logic. OgtaflLobby.sol - Game Lobby functionality. Allows to create and join games, also handles NFT transfers to stake in a game. OgtaflGame.sol - Game Rules Enforcement smart contract. Also distributes NFTs to a winner as soon as the game is concluded. OgtaflKingNFT.sol - King NFTs. Every user can get one for free, but to collect all 4 kinds of kings they have to win opponents in battles.

Owned NFTs representation and smart contract interactions is done via Thirdweb React SDK. NFT smart contract is using the Thirdweb SDK.

background image mobile

Join the mailing list

Get the latest news and updates