Design and Development of a First-Person Shooter Video Game with AI-Based Enemy Generation Using Unity

Student
Zympidi Angeliki
Date of defense
Supervisor
Dimitroulakos Grigorios, Vassilakis Costas
Abstract

This thesis presents Sharp Shooter, a first-person shooter built in Unity. Its main contribution is a system that lets a player create a new enemy during play by typing a short description of it. The description is turned into an image with a text-to-image model, Stable Diffusion XL, and the image is turned into a three dimensional model with an image-to-3D model, TripoSR. Both models run on free Google Colab notebooks, split across two separate services and chained together, so that the game only ever has to talk to one of them. The resulting model is brought into Unity while the game is running, scaled and oriented correctly, given a collider, and connected to the same navigation, health, and combat components used by every other enemy in the game, so that a generated enemy behaves exactly like a hand designed one.

Beyond this generation system, the thesis also documents the rest of the game's engineering, including the player's movement and camera, the level, which began as a simple prototype and was later rebuilt as a forest, the enemy AI, the weapons, and the interface. Most of the thesis is devoted to this engineering work and to the design of the generation system, while a smaller part describes the game from the player's point of view, covering the story, the core combat, and how the enemy creation tool is actually used during a session.

Combining publicly available generative models with an ordinary game engine turns out to be achievable in practice. Creating an enemy is not instant, a request takes a few minutes on free hardware, with almost all of the time spent on reconstructing the mesh. Once created, though, generated enemies can be fought and defeated at the same pace as any other enemy in the game, and the pipeline keeps working, falling back to the game's hand made enemies, if the generation service itself is slow or unreachable.

Λέξεις-κλειδιά
Unity, first-person shooter, procedural content generation, generative artificial intelligence, text-to-image synthesis, Stable Diffusion XL, image-to-3D reconstruction, TripoSR, glTF and GLB runtime loading, NavMesh, runtime asset generation, game AI.