Mystic Forest Flow

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

Visit Repo
Mystic Forest Flow banner

About

# ๐ŸŒฒ 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

[Play the Game](https://your-vercel-url.vercel.app) | [View on GitHub](https://github.com/yourusername/mystic-forest-flow)

## ๐ŸŽฏ 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

  • **Install MetaMask** browser extension
  • **Add Flow Testnet** to MetaMask:
  • Network Name: Flow
  • RPC URL: `https://testnet.evm.nodes.onflow.org`
  • Chain ID: `545`
  • Currency: FLOW
  • **Get test tokens** from [Flow Testnet Faucet](https://testnet-faucet.onflow.org/)

## ๐ŸŽฎ How to Play

  • **Start your adventure** in the mysterious forest
  • **Make choices** that affect your story path and score
  • **Watch AI-generated images** for each scene
  • **Reach an ending** based on your decisions
  • **Save to blockchain** to permanently store your story
  • **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

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Your Destiny

Embark on a wild blockchain journey as a curious crypto creature! Navigate decentralized realms, trade NFTs, outsmart scammers, and ally with AI agents. Your choices shape the story. Can you level up from noob to crypto legend?

NarrativeAI

# NarrativeAI is a blockchain-based platform that enables collaborative story creation through AI assistance and user voting. The platform combines AI-generated storytelling options with human decision-making to create unique, branching narratives.

Coop Tales

AI-driven storytelling protocol using Farcaster Frame and onchain agents for lore-centric projects like NFT communities, onchain games, and DAOs. Users co-create world lore through interactive stories, receive automated summaries, and shape the evolving narrative canon.