Mystic Forest Flow

Mystic Forest Flow is an adventure that generates a story based on your choices.

Mystic Forest Flow

Created At

ETHGlobal New Delhi

Project Description

🌲 Mystic Forest Flow - Interactive Blockchain Adventure

An 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 Demo

P | V

šŸŽÆ ETHGlobal Submission

This project is built for ETHGlobal New Delhi 2025 and targets the Flow Foundation's $10,000 prize for gaming applications.

šŸ› ļø Tech Stack

  • Frontend: HTML, CSS, JavaScript, Ethers.js
  • Backend: Python Flask
  • Blockchain: Flow EVM (Ethereum-compatible)
  • Smart Contract: Solidity
  • Image Generation: Pollinations.ai API
  • Deployment: Vercel

Blockchain Setup

  1. Install MetaMask browser extension
  2. Add Flow Testnet to MetaMask:
    • Network Name: Flow
    • RPC URL: https://testnet.evm.nodes.onflow.org
    • Chain ID: 545
    • Currency: FLOW
  3. Get test tokens from F

šŸŽ® How to Play

  1. Start your adventure in the mysterious forest
  2. Make choices that affect your story path and score
  3. Watch AI-generated images for each scene
  4. Reach an ending based on your decisions
  5. Save to blockchain to permanently store your story
  6. Share your adventure with friends

šŸ—ļø Project Structure

mystic-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 Contract

The game uses a Solidity smart contract deployed on Flow testnet:

  • Contract Address: 0xafa6C385c1B6D26Fda55f1a576828B75E9F9FD6c
  • Functions: createStoryOutcome, getStoryOutcome, getTotalStories
  • Events: StoryCreated, StoryUpdated

What Gets Stored

Each story outcome includes:

  • Story ID and ending category
  • Player's final score
  • Generated image URLs
  • Player's wallet address
  • Timestamp

How it's Made

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

background image mobile

Join the mailing list

Get the latest news and updates

Mystic Forest Flow | ETHGlobal