This project is a decentralized Hangman game built on the Aptos blockchain. It combines the classic word-guessing gameplay with blockchain technology, offering a unique and secure gaming experience. Players can start a new game, make guesses, and reset the game, all through blockchain transactions. The game features a user-friendly interface built with React and integrates seamlessly with Aptos wallets.
The primary purpose of this project is to demonstrate the integration of blockchain technology with traditional gaming concepts, showcasing how smart contracts can be used to create decentralized applications (dApps) with familiar gameplay mechanics.
- Implement a fully functional Hangman game using Aptos smart contracts
- Create an intuitive and engaging user interface for the game
- Demonstrate secure interaction between a frontend application and blockchain smart contracts
- Showcase the potential of blockchain technology in gaming applications
- Decentralized game logic implemented in Move smart contracts
- Real-time game state updates through blockchain transactions
- Integration with Aptos wallet for secure user authentication and transaction signing
- Responsive and visually appealing user interface
- Word selection from a predefined list using a deterministic algorithm
- Game state persistence on the blockchain
-
Blockchain:
- Aptos Blockchain
- Move Programming Language
-
Smart Contract:
- Aptos Framework
- Move Standard Library
-
Frontend:
- React.js
- TypeScript
- Ant Design (UI components)
-
Blockchain Integration:
- Aptos Web3 SDK
- @aptos-labs/wallet-adapter-react
-
Development Tools:
- Node.js
- npm/yarn
-
Install the Aptos CLI following the official documentation.
-
Generate your module address and initialize your account:
aptos init
Choose
testnet
when prompted. -
Compile the Move module:
aptos move compile
-
Publish the module:
aptos move publish
Confirm the transaction when prompted.
- Clone the repository:
git clone <repository-url>
cd <repository-name>
- Install dependencies:
npm install
oryarn install
- Configure the Aptos network settings in
utils/aptos.ts
- Start the development server:
npm run start
oryarn start
- Connect your Aptos-compatible wallet i.e Petra to play the game
0xb611addd177ad6191bd7de5a5bb1f15893dfbff8782e6a1f05a6bca5297984e7
Ensure that your wallet is connected to the Aptos testnet to interact with the game.