SpaceWars is an innovative gaming platform that merges the excitement of a space shooter game with the possibilities of blockchain technology. Players can enhance their gaming experience by purchasing and owning unique rocket skins and stunning cosmic backgrounds as NFTs. These digital assets are securely stored on the blockchain, providing players with true ownership and the ability to trade or showcase their collectibles.
-
Space Shooter Gameplay: A fun and engaging space shooter game where players control rockets, destroy asteroids, and collect items.
-
NFT Collectibles: Unique rocket skins and cosmic backgrounds are represented as NFTs stored on the blockchain.
-
Decentralized Storage: NFTs' metadata and assets are stored securely using IPFS.
-
Marketplace: Players can buy, sell, and trade their NFTs with others.
-
True Ownership: Blockchain ensures players own their digital assets.
- Solidity: Smart contracts for minting and managing NFTs.
- Truffle: Framework for Ethereum smart contract development and deployment.
- IPFS: Decentralized storage for storing NFT metadata and images.
- React: Frontend framework for building a responsive and interactive user interface.
- Ethers.js: Library for interacting with the blockchain and MetaMask.
Make sure you have the following installed:
- Node.js: Download Node.js
- Truffle: Install globally with
npm install -g truffle
- MetaMask: Browser extension wallet for connecting to the blockchain.
- IPFS CLI: Install IPFS
-
Clone the repository:
git clone https://github.com/ArkaD-23/TDOC-SpaceWars.git cd TDOC-SpaceWars
-
Navigate to the
contracts
directory:cd contracts
-
Install dependencies:
npm install
-
Compile the smart contracts:
truffle compile
-
Deploy the contracts to a local or test blockchain (e.g., Ganache):
truffle migrate --network development
-
Test the smart contracts:
truffle test
-
Navigate to the
frontend
directory:cd ../client
-
Install dependencies:
npm install npm i
-
Start the React development server:
npm run dev
-
Open the app in your browser:
http://localhost:5173
- Connect Wallet: Use MetaMask to connect your wallet to the game.
- Play the Game: Destroy asteroids, collect in-game items, and enjoy space adventures.
- Purchase NFTs: Buy rocket skins and backgrounds in the marketplace using cryptocurrency.
- Trade Collectibles: Use the marketplace to trade NFTs with other players.
spacewars/
├── build/contracts/
├── client/
├── contracts/
├── migrations/
├── test/
├── package.json
├── truffle-config.js
└── README.md
This project is licensed under the MIT License.