Project Overview
This project was created to explore the potential of integrating generative AI into game development. My goal was to move beyond static, pre-authored content and create a dynamic game world that could surprise and delight players with its ever-changing nature. The prototype focuses on three key areas: procedurally generated environments, dynamic quest generation, and a reactive dialogue system for NPCs.
Tech Stack & Tools
- Unreal Engine 5: Used for the game engine and its powerful Blueprint scripting system.
- Python: Core programming language for the generative AI models.
- PyTorch / TensorFlow: Frameworks used to build and train the generative models.
- Hugging Face Transformers: Leveraged for the LLM-based dialogue system.
- GANs & VAEs: Explored for procedural environment and texture generation.
My Process
Phase 1: Research & Planning
I began by researching existing AI applications in gaming. I defined the scope of the prototype, focusing on creating a proof-of-concept for the three core generative elements. This phase involved creating design documents and sketching out the system architecture.
Phase 2: Model Development
Next, I focused on building and fine-tuning the generative models. For environment generation, I used a GAN to create a variety of terrain types. For the dialogue system, I fine-tuned a pre-trained LLM on a custom dataset of fantasy dialogue to ensure it matched the game's tone.
Phase 3: Integration & Prototyping
I then integrated the trained models into Unreal Engine 5 using its Python and Blueprint APIs. This was the most challenging part, requiring careful state management and asynchronous calls to prevent performance issues. I built a simple player controller and basic game logic to demonstrate the dynamic content.
Results & Future Work
The prototype successfully demonstrates the feasibility of real-time, AI-driven content generation in a game. The environments feel varied, the quests are unique with each playthrough, and the NPCs offer surprising and contextually relevant responses. The primary result is a strong proof-of-concept for my career goal.
Future Enhancements:
- Integrate a procedural character generator.
- Add a system for AI-generated soundscapes and music.
- Optimize model inference for better real-time performance.
- Expand the core mechanics to be a full, playable demo.