GAIA: Generative AI Adventure

Inspired by the thrill of survival stories and the limitless potential of AI, we envisioned a game where every choice truly matters. GAIA creates an immersive experience that challenges creativity, decision-making, and adptability. This project not only lets us push the boundaries of AI-driven storytelling but also allows us to explore interactive design and dynamic gameplay in a meaningful and engaging way. With GAIA, your adventure is limited only by your imagination!

How To Play!!

Frontend The frontend, built with HTML, CSS, and JavaScript, offers a visually stunning experience with pixelated, colorful interfaces, smooth transitions, and engaging animations. Designed to immerse players, it features dynamic backgrounds and an intuitive layout that enhances gameplay interactions.

AI Generation GAIA is a fully dynamic and personalized experience where the story evolves with every decision you make. Powered by generative AI, it dynamically adapts to everything you do. Provided a thematic setting, the AI is able to generate a narrative start point, after which, based on user input the AI carefully crafts a compelling and engaging storyline for the user to follow. Like its namesake, the goddess of the earth GAIA controls all decisions and environmental reactions to player input. This includes managing locations, NPCs, and interactions in real-time influenced by your decisions. Using OpenAI, it interprets your input and generates story prompts that perfectly fit the situation. Due to its flexible decision making, it is able to handle non-ordinary or extreme user responses with ease, integrating these decisions seamlessly into the overall narrative. Finally. with Hailuo's MiniMax API for text-to-video generation, this storyline is brought to life as a series of cinematic visuals, creating an immersive interactive experience for the user.

Game Logic and Design GAIA’s design carefully balances open-ended freedom with necessary structure. Much consideration was put into tuning the degree of freedom that the AI would be allowed. Balancing a open ended prompt with a bare minimum structure allows the AI to format stories to fit into our software framework. Themes like enchanted forests and space colonies set dynamic stages, while adaptive characters and diverse locations encourage exploration. Visuals were crafted with DALL·E and refined in Photoshop by hand to improve visual cohesiveness.

Backend & Multithreading Flask and Python power the backend, providing a robust foundation for processing player inputs, managing game states, and generating tailored story outcomes in real time. A constant context object is maintained throughout the applications runtime, being passed in as an input to the AI and returned as an output with necessary state changes. One huge optimization improvement was the use of multithreading to simultaneously and dynamically generate videos as the user is still playing. This allows for a minimum wait time after the story concludes before viewing the generated videos.

Challenges we ran into

Optimizing API Usage With the costs of using Hailuo's MiniMax API for video generation and OpenAI’s DALL-E for images, we had to carefully plan and optimize testing to avoid unnecessary API calls while maintaining high-quality results.

Maintaining Consistency Ensuring consistent character and setting designs across video scenes was challenging. We addressed this by adding distinct characteristics, like hair color and gender, to NPC dictionaries and passing context to the video generation process, ensuring cohesive storytelling throughout.

Balancing Open-Ended Design We aimed for dynamic locations that varied with the narrative while maintaining structure. This was achieved by mapping multiple keys to single location values, keeping the design open yet coherent.

Testing and Refining Extensive testing of prompts was crucial to ensure the AI outputs aligned with our vision. Iteration and fine-tuning played a key role in achieving the immersive experience we aimed for.

*Frontend * To create a smooth, dynamic frontend, we used multithreading to generate videos while the story was still being written, significantly reducing loading times.

Accomplishments that we're proud of

This was our first deep dive into generative AI, and we’re incredibly proud of how far we pushed its limits. From integrating text-to-video generation to creating dynamic, AI-driven narratives, we challenged ourselves to explore uncharted territory and successfuly crafted a cohesive, immersive experience that surpassed our initial expectations!

What we learned

We quickly realized that unexpected challenges are a constant with generative AI, teaching us to remain adaptable and tackle problems with creative solutions. We also learned that having a well-planned framework is crucial—it keeps everything organized and ensures the workflow stays smooth, even when surprises arise.

What's next for GAIA

The future of GAIA is all about creating deeper and more engaging storytelling. We plan to add more themes, NPCs, and locations to make the game world even richer. We also want to improve plots and interactions by tracking relationships between the player and NPCs, as well as their personality traits, to create more meaningful connections. Longer movies with more scenes will bring the stories to life in greater detail. We’re also considering using frameworks like React for better performance and scalability and exploring ways to bring GAIA online or to mobile platforms for easier access and a smoother experience.

Built With

Share this project:

Updates