Welcome to Avax-Gods, where blockchain technology meets the thrill of decentralized gaming! Avax-Gods is an innovative project that allows users to immerse themselves in a world of strategy and competition. By connecting your Core or MetaMask wallet, you can create battles or join existing ones with ease. Engage in intense battles where every move counts.
Avax-Gods is a strategic NFT card game built on blockchain technology. Players can connect their Core or MetaMask wallets to engage in exciting battles, utilizing their NFT cards to attack, defend, and outsmart their opponents.
- Blockchain Integration: Secure and transparent transactions through Core and MetaMask wallets.
- NFT Cards: Unique NFT cards that you can use in battles.
- Custom Battleground: Select your battleground from four unique types available.
- Interactive Battle animations and sounds: Engaging battle animations and sounds with interactive toasts add excitement and vibrancy to the game.
- Strategy & Competition: Plan your moves carefully to defeat your opponents.
- Community Engagement: Join a vibrant community of gamers and NFT enthusiasts.
- Exiting Battle: You can also exit the battle.
Before you begin, ensure you have met the following requirements:
- You have a Core or MetaMask wallet set up.
- You have some AVAX tokens in your wallet for transaction fees.
-
Clone the repository:
git clone https://github.com/yourusername/avax-gods.git
-
Navigate to the project directory:
cd Avax-Gods
-
Install the dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and go to
http://localhost:5173
to see the application in action.
- Connect your Core or MetaMask wallet.
- Register your account if already not registered.
- Navigate to the "Create Battle" section.
- Click "Create Battle" to initiate the game.
- You can also join an existing battle
- Connect your Core or MetaMask wallet.
- Browse the list of available battles.
- Select a battle to join.
- Confirm your participation.
- Random Card Allocation: Each player is given a card with random attack and defense values.
- Decision Making: Based on the card values, players can choose to either attack or defend.
- Player Health: Each player has a health of 25 points.
- Hidden Opponent Values: You cannot see your opponent's attack and defense values. Strategize your moves based on your card's values and anticipate your opponent's actions.
- Balanced Strategy: Focus on both attack and defense to optimize gameplay. Defending successfully refills your Mana by 3 points, enabling more attacks or defenses in subsequent turns.
- Card with the same defense and attack points will cancel each other out: When two cards with identical attack and defense points clash, they both are nullified.
- Attack points from the attacking card will deduct the opposing player’s health points: The attack value directly reduces the opponent's health.
- If P1 does not defend, their health will be deducted by P2’s attack: An undefended attack directly reduces the defender's health.
- If P1 defends, P2’s attack is equal to P2’s attack - P1’s defense: Defending reduces the impact of the attack by the defender's defense value.
- If a player defends, they refill 3 Mana: Successful defense replenishes the defender's Mana by 3 points.
- If a player attacks, they spend 3 Mana: Each attack costs the attacker 3 Mana points.
- Docker: Containerization for seamless deployment.
- JavaScript/TypeScript: Main programming languages used in the project.
- Hardhat: Development environment for Ethereum-compatible smart contracts.
- Solidity: Programming language for writing smart contracts.
- OpenZeppelin: Library for secure smart contract development.
- React: JavaScript library for building user interfaces.
- Tailwind CSS: Tailwind CSS for styling of the application.
We welcome contributions to Avax-Gods! To contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Make your changes and commit them (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a Pull Request.
- The Solidity code for Avax-Gods is written using Solidity version ^0.8.19. Ensure your development environment is compatible with this version for optimal performance and compatibility.
- The frontend of Avax-Gods is built using React and Vite, providing a fast and modern development experience.
- A modal will open if you are not connected to the Fuji C-Chain network, prompting you to switch networks for proper functionality
- Docker is integrated into the frontend for streamlined development and deployment.