AI Adventure Header

AI Adventure

An interactive story app inspired by AI Dungeon that lets users explore dynamic adventures powered by Google Gemini.

2025
1 week
Next.js

Overview

AI Adventure is a serverless interactive storytelling app inspired by AI Dungeon, built using Google's Gemini 2.0 Flash API. I made it as an experiment to try using AI in a web app, and to explore more interactive uses beyond just chatbots. Since it's a prototype, there's no backend, user accounts, or save/load system.


The app lets users jump into one of four premade adventures or create their own from scratch by writing a title, introduction, and story essentials, which are custom details that guide the AI's tone and behavior throughout the adventure.

Features

  • Create Your Own Adventure

    Input a custom title, intro, and "story essentials" (tone, key themes, instructions for the AI) to generate a unique story.

  • Interactive Story Flow

    While playing, users can take a turn with "Do", "Say", or "Story", or let the AI continue the adventure. They can also retry or erase the last segment. This keeps the experience dynamic and interactive.

  • Adjustable Settings

    Modify text display speed, response temperature, and even edit the story essentials during the session.

What I learned

This project allowed me to integrate a generative AI API into a real-time, interactive web app. I worked with prompt engineering, created structured output schemas, and built a dynamic UI that responds to the AI's results. It also helped me learn about the challenges of long-context interactions and how to improve them going forward.

Future Plans

If I continued working on this, I would:

  • Add a summary system to reduce token usage and improve performance.
  • Create a save/resume system so players can return to ongoing adventures.
  • Implement user accounts and a database to support saving and sharing adventures.

Technologies

Next.jsGoogle Gemini

Screenshots

Image 1
Image 2
Image 3
Image 4

View Source Code

This project is available on GitHub. Check out the code by clicking the button below:

View on GitHub