
Trying to generate Kingdom Rush–style background art with AI — can't nail the look
I’m making a generative Tower Defense game where I generate the enemy art, tower art, and the background image that enemies walk across. The issue I want to discuss is specifically about the background generation.
The idea is fairly simple: in my custom editor, I place tiles to create the road path that enemies will follow. The editor generates a mask, which is then used to tell the image-generation model where the road must be drawn. Everywhere outside the road, the model should generate the rest of the world in a Kingdom Rush–style aesthetic. The final background image is inserted into the game, and the enemies follow the trajectory defined by the mask, creating the illusion that they are actually walking along the painted road.
For me, OpenAI’s GPT-Image-1.5 is currently the most promising model for achieving that “wow, this looks amazing” effect. But I noticed one major problem: it follows the road mask very poorly. It may reproduce the shape, but place it in the wrong position, or sometimes generate a completely random road while still producing a beautiful image overall. That behavior breaks the gameplay logic because the enemy path no longer matches the generated terrain.
To work around this, I started generating the background in multiple stages. First, I generate the biome without decorations using GPT-Image-1.5. Then I generate the road separately using Grok Imagine, since it follows mask constraints much more strictly. Finally, to avoid the environment looking too flat, I send the combined image back into GPT-Image-1.5 as a reference image so it can add environmental decorations without modifying the road itself.
Does anyone have ideas on what I could change, or how to better achieve the Kingdom Rush visual style?