A web3 farming game that allows users to donate real rice to charity
Eth-ical Rice is a web3 farming game that uses AI agents to control NPC's in the game. The agents have conversations which feature clues to puzzles in the game, and product placement paid for by advertisers. Advertising revenue is then used to donate to charity as you play. All this happens on the blockchain keeping everything fair and transparent!
This project is built with Typescript, NextJS, React, wagmi and Phaser for the game engine. This is deployed on Vercel.
A route is triggered daily with a cron job. A "script" is generated by agents using OpenAI and saved on IPFS using Pinata. The script is a record of the agents conversations, and instructions for missions in the game.
Players login using Privy. This is the perfect tool to abstract away web3 wallets behind the scenes, and allow players to login in using their email or socials. We can then enable players to generate signatures to confirm actions with the server, and can customise the UI around this.
A smart contract controls game state and logic on Xai. Xai is an Arbitrum Layer 3 Orbit Chain. This is vital to allowing us to afford the volume of state changes needed.
USDC tokens are transferred on Base to the charity address.
Quicknode acts as the external RPC.