Schomay describes a forest exploration game where players move through scenes and manage vigor and courage while trying to find home. The original game had 16 scenes in a 4-by-4 grid, so he wanted new scenes generated for each playthrough.
Using AI to Build an Infinite Game
Speaker
Jeff Schomay presents an AI-generated exploration game at AI Engineer, explaining how he built its scenes, images, and content pipeline.
Scenes are defined as JSON, including their initial description, what changes on return, and their effects on player stats. After prompt engineering with OpenAI’s completion endpoint, Schomay fine-tuned a model on 50 examples; he says the process cost about one or two dollars and produced valid JSON with a shorter prompt.
Schomay used Leonardo to generate images and train custom image models. He had to balance consistent forest setting, perspective, scale, tone, and texture with variety across scenes featuring people, animals, buildings, or no characters. After trying different training sets and parameters, he found a model that produced cohesive but distinct images.
An asset server requests a scene from the custom OpenAI model, validates its JSON, sends the description to Leonardo, and returns the scene and image. Since generation could take 10 to 30 seconds, Schomay cached prefabricated scenes and replenished the supply when it fell below a threshold.
In the demo, vigor affects movement speed and courage affects the viewport size. Generated encounters can restore vigor or reduce courage, and scenes are intended to change with each playthrough. Schomay suggests adding image upscaling or letting players choose themes, with time of day or local weather as possible inputs.
Takeaways
- Use examples in fine-tuning data to teach output structure when you want shorter prompts.
- For a custom image style, keep setting and composition consistent while varying the scene content.
- Validate generated structured data before passing it to the next step in a pipeline.
- Hide slow generation behind a cache and replenish it before players run out of ready content.
- Treat higher image resolution as a latency trade-off in an interactive experience.
Mentioned in this talk
Search inside this talk
What was claimed 6
- featureAI-generated exploration game: Each playthrough can feature newly generated scenes and images.
“every game was unique and different”
YouTube Unverified1 source· Talk
- usesJeff Schomay uses
OpenAI“using OpenAI's completion endpoint”
YouTube Unverified1 source· Talk
- featureLeonardo: Supports image generation and creation of custom image models.
“lets you generate images, but also lets you create your own image models”
YouTube Unverified1 source· Talk
- usesJeff Schomay uses Leonardo
“I used a tool called Leonardo.”
YouTube Unverified1 source· Talk
- metricAI-generated exploration game: Image generation takes 10–30 seconds.
“it takes 10, 20, sometimes 30 seconds”
YouTube Unverified1 source· Talk
- featureAI-generated exploration game: Uses a cache of prefetched scenes to keep a scene ready for the player.
“there's always a scene that's ready to go”
YouTube Unverified1 source· Talk










