Mystic Forest Flow
Mystic Forest Flow is an adventure that generates a story based on your choices.
Problem Statement
🌲 Mystic Forest Flow - Interactive Blockchain AdventureAn interactive text-based adventure game with AI-generated images and Flow blockchain integration. Make choices that shape your destiny and save your story outcomes on the blockchain!✨ Features🎮 Interactive Storytelling: Choice-based gameplay with branching narratives🎨 AI-Generated Images: Dynamic images for each scene using Pollinations.ai⛓️ Blockchain Integration: Save story outcomes on Flow blockchain🏆 Multiple Endings: Different endings based on your choices and score📱 Responsive Design: Works on desktop and mobile devices🔗 MetaMask Integration: Seamless wallet connection and network switching🚀 Live DemoP|V🎯 ETHGlobal SubmissionThis project is built forETHGlobal New Delhi 2025and targets theFlow Foundation's $10,000 prizefor gaming applications.🛠️ Tech StackFrontend: HTML, CSS, JavaScript, Ethers.jsBackend: Python FlaskBlockchain: Flow EVM (Ethereum-compatible)Smart Contract: SolidityImage Generation: Pollinations.ai APIDeployment: VercelBlockchain SetupInstall MetaMaskbrowser extensionAdd Flow Testnetto MetaMask:Network Name: FlowRPC URL:https://testnet.evm.nodes.onflow.orgChain ID:545Currency: FLOWGet test tokensfromF🎮 How to PlayStart your adventurein the mysterious forestMake choicesthat affect your story path and scoreWatch AI-generated imagesfor each sceneReach an endingbased on your decisionsSave to blockchainto permanently store your storyShare your adventurewith friends🏗️ Project Structuremystic-forest-flow/ ├── api/ │ └── index.py # Flask backend server ├── public/ │ ├── index.html # Main game page │ ├── script.js # Frontend JavaScript │ ├── style.css # Game styling │ └── ethers-offline.js # Offline ethers.js fallback ├── ForestAdventure.sol # Smart contract ├── forest-adventure.js # Contract interaction ├── requirements.txt # Python dependencies ├── vercel.json # Vercel configuration └── README.md # This file🔧 Smart ContractThe game uses a Solidity smart contract deployed on Flow testnet:Contract Address:0xafa6C385c1B6D26Fda55f1a576828B75E9F9FD6cFunctions:createStoryOutcome,getStoryOutcome,getTotalStoriesEvents:StoryCreated,StoryUpdatedWhat Gets StoredEach story outcome includes:Story ID and ending categoryPlayer's final scoreGenerated image URLsPlayer's wallet addressTimestamp
Solution
This uses Pollinations to get the images, we have integrated the smart contracts on Flow - Flow EVM (Ethereum-compatible), and also used filecoin for storage. the part where the integration of image and generation of a new story took a long time. Flow Integration and deployment of smart contract was a easy process with well documented structure and videos that helped a lot
Hackathon
ETHGlobal New Delhi
2025