project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

ChampDuel1999

ChampDuel1999 is a strategic, turn-based blockchain game where players battle using their NFTs. Players deposit and lock their NFTs to enter the game, with the ultimate victor claiming all NFTs.

ChampDuel1999

Created At

ETHGlobal Paris

Project Description

ChampDuel1999 is a strategic, turn-based blockchain game where players battle using their NFTs. Players deposit and lock their NFTs to enter the game, with the ultimate victor claiming all NFTs. This game operates fully on-chain, providing a trustless and permissionless gaming experience. Our design supports gameplay across any NFT collection on Starknet, fostering broad accessibility. Key game strategies include hunting to increase HP, protecting to avoid damage at the expense of HP, and attacking to harm your opponent. We're excited about the game's potential, particularly its integration with Starknet's features such as account abstraction and affordable computation.

How To Play: Each player must deposit and lock their NFTs to initiate the game. The winner claims all the NFTs at the end. Our design mostly supports NFTs from the same collection for optimal compatibility.

There are 3 strategic actions you can perform:

Hunt: Hunting might increase your HP. Protect: Choosing to protect will make you untouchable for the subsequent turn. However, it results in a decrease of 300 HP. Attack: By attacking, you could inflict damage on your opponent. Be cautious, though, as it might also result in self-damage.

Our game accommodates any NFT collection for enhanced versatility.

Why We Chose Starknet: We chose Starknet as we believe it is the future of blockchain games, offering exciting features like:

Account Abstraction: Enables a better user experience through session keys. Cheap Computation: Starknet allows for affordable computation, which is crucial for efficient gameplay. Notes on Game Design:

Sustainable: Our game requires no in-game tokens. The prize is established before the game commences, and players enter to compete for it.

Fully On-Chain: ChampDuel1999 offers a trustless, permissionless gaming experience, akin to its blockchain basis. Turn-Based: The structure of the game aligns with the nature of blockchain, favoring turn-based games. Open-Play: ChampDuel1999 is not restricted to a specific NFT collection. It can be played using any Starknet NFT collection.

https://duel-your-champ.onrender.com/

How it's Made

I mainly used react, react-starknet, and starknet in frontend part and the contract written is in cairo1 at the testnet. The states at the front taken from the views at the contract.

DuelChampis blockchain-based game made using StarkNet, a permissionless zk-rollup platform on Ethereum that enables highly scalable and secure smart contracts. The smart contracts for this game are written in Cairo, an architecture for provable computation developed by StarkWare.

The game revolves around two primary data structures: Game and Player, represented as Cairo structs.

The Game struct holds information about each unique game, including its name, the NFT collection associated with it, the winner's address, the turn duration, the number of players, the start time, the activity status, and the current tour.

The Player struct stores details about each player, such as their health status, name, wallet address, the NFT collection address and token ID, the turn of their move, their alive status, and their move.

These structs implement the StorageAccess trait for interacting with StarkNet's storage system, which involves reading from and writing to the blockchain's storage.

background image mobile

Join the mailing list

Get the latest news and updates