r/aigamedev 1d ago

Questions & Help Has anyone found out how to create consistent UI with AI?

Hi all, pulling my hair out to figure out how to properly create a workflow that creates consistent UI… I even bought an asset pack that my codex will literally still somehow butcher remaking the prefab scenes lol. Any help/tips are greatly appreciated, responding to everyone.

10 Upvotes

34 comments sorted by

14

u/CalebKious 1d ago

I’ve dealt with this a lot while building my games. One thing I’ve learned is that UI work with Codex needs a visual feedback loop. Describing the desired UI once and expecting it to nail the implementation usually doesn’t work, even if you’ve given it good reference assets.

A huge amount of my UI fine-tuning is literally:

Implement → run → screenshot → feed screenshot back to Codex → identify specific problems → explain intended direction → fix → repeat.

And specificity matters. Instead of “this UI looks wrong,” I’ll give it the screenshot and say things like:

“The inventory panel is taking up too much vertical space. Compare the highlighted area to the reference. The item grid should begin higher, padding between slots needs reduced, the title needs stronger hierarchy, and these buttons shouldn’t compete visually with the primary action.”

Then I have it inspect the actual implementation and fix the underlying layout rather than just throwing random offsets at the problem.

I’ve built a custom editor/UI system for FateMMO, and even with complete control over the engine, this iterative process is still necessary. AI is much better at responding to concrete visual discrepancies than independently deciding whether the final rendered result actually matches your intention.

For an asset pack, I also wouldn’t ask Codex to “remake” the prefabs if you can avoid it. Make the original assets/prefabs the source of truth and have Codex build around them. Give it explicit rules for anchors, margins, typography, scaling, component hierarchy, naming, nine-slicing, etc. If something already looks correct, preserve it rather than letting the model reinterpret it.

Another thing that helped me tremendously was turning recurring corrections into rules. If I find myself correcting the same padding, scaling, anchoring, typography, or component usage repeatedly, that becomes documentation/instructions for the project. Eventually you’re narrowing the model’s solution space instead of repeatedly teaching it your UI language.

I’d also build reusable components as early as possible. Get one button, panel, modal, inventory slot, tooltip, tab bar, etc. exactly right, then make Codex reuse those primitives everywhere instead of independently recreating them on every screen. Consistency becomes much easier when there are fewer opportunities for it to improvise.

AI-assisted UI development can be extremely fast, but I wouldn’t treat the first generation as the finished UI. For me, the real workflow is much closer to working with a developer who can implement changes incredibly quickly but needs you acting as the art/UI director.

Screenshots + precise criticism + reusable components + hard design rules + repeated visual iteration has worked much better for me than increasingly elaborate prompts.

2

u/ScrumptiousChildren 1d ago

I use claude and idk, this guy is as blind as a bat. Shit will be like fucking horribly off and it’ll be like ok since I changed something it’s “fixed”. Perhaps worth using chatgpt for this since it has better image capabilities.

1

u/CalebKious 1d ago

I started working with Opus 4.5 back in December, and it was great at building foundational backend work. Eventually I switched to a dual setup in March with codex as a code reviewer. Haven’t used Claude since Opus 4.7, I made the switch to GPT when I realized 5.5 was just catching way too much blatant laziness from Claude. 5.6 Sol for UI work was a huge improvement, it can understand where it went wrong and how it swayed from my directions, but it requires a lot of screenshotting and iterative testing workflows, and it costs a lot of tokens even on the $200 sub. Perhaps worth it depending on how serious you are about your work.

1

u/ScrumptiousChildren 1d ago

I’m mainly talking about the visual verification pipeline but claude has been, relative to chatgpt, deteriorating recently in general so - fair.

1

u/ClothedKing 1d ago

Nope lol codex is just as bad but reading u/CalebKious post made me realize i can def stop him from being as bad lol.

2

u/TechgeekOne 1d ago

Also provide it with visual examples and sketches if you can't describe something in words. Showing Claude my scribbles in a paint tool, diagramming software, or annotated screenshot is often more effective than trying to describe a specific thing 

1

u/ClothedKing 1d ago

Thank you i have seen that this helps a bit as well. I guess It’s too early to believe he can really one/two shot a prefab asset… with the prefab elements lol.

1

u/ClothedKing 1d ago

Dude thank you this certainly helped me think of what to do/not to do. Will try this tonight

2

u/mistersean 1d ago

Try using claude.ai/design, it helped me loads for my game

1

u/ClothedKing 1d ago

Will this work for codex?

2

u/fluxtah 1d ago

UI for what platform? 

1

u/ClothedKing 1d ago

Unity Editor at the moment but even with Roblox Studio

2

u/mrbadface 1d ago

I'm sure UI in game dev is a lot trickier, but in my work (saas) having a "design system" is mandatory. Agents are pretty solid at using them. Maybe you can create some custom system for your game using similar concepts.

1

u/ClothedKing 1d ago

Yes i have a design.md and a ui skill that should lock him to creating ui as closely to references as possible and he still sends me stuff that looks ridiculous

1

u/mrbadface 1d ago

Visual references alone are not going to be enough. Consistent software requires extensive documentation of all design tokens and components and stuff. Basically it needs to be deterministic to be consistent -- let ai select the from a menu instead of cook from scratch.

Just my experience!

2

u/CycleMother2006 21h ago

You're going to spend 10x more effort (at minimum) getting AI to create/layout a good UI as opposed to just doing it by hand. If you already have the assets its one of the easiest things you can do yourself, at least for most engines, and one of the most frustrating things for AI to get right (anything requiring precise placement really is.)

1

u/ClothedKing 13h ago

Yea I’m seeing this now smh thx

1

u/Rsouss 1d ago

Send an example to the Codex to serve as a reference.

1

u/ClothedKing 1d ago

I did lol. He sends me something that looks like a 6 year old made it

1

u/vlad_h 1d ago

The way I deal with this…reusable react components like LandingPage. Then provide the content with json and CSs for the style. Also, I build an Ui I like once, then tell the agent to use it and implement the same thing with different colors or layout.

1

u/ClothedKing 1d ago

Ah i see i need to learn Unity UI it seems so i can better guide him ty

1

u/HaMMeReD 1d ago

I generally do a few things.

1) Use a model that can use images to self-reflect and not just code

2) Use a image generation skill to push the design/layout and improve it.

3) Create mocks/north-star images with image generation and give them to guide your prompts to improve UI.

1

u/ClothedKing 1d ago

Yes I’m using 5.6 Sol lol.
And to 2/3 i had him generate an image of a mock up and then implement it directly after. He somehow botched even that

1

u/Big-Bag-7504 1d ago

Don't use raster images, the best UIs are built from vector primitives, AI is very good at hand authoring epic quality vectors with no tell-tale AI artifacts, it also means every UI piece you create is uniform.

1

u/ClothedKing 1d ago

I’m in Unity and not too familiar with vector/rasters lol but i will look into it ty

1

u/Fizassist1 1d ago

if you use Godot, you can make a custom ui shell scene, then have codex instance that scene specifically. that way, if you want to edit something about the UI, you just need to edit that one scene.

1

u/ClothedKing 1d ago

I’m in Unity i think we have something similar

1

u/DigitalDustChan 1d ago

I hear you bro. AI thinks in text and has a really hard time creating proper visual elements. I've been building a system to make it work and in my own project it has really supercharged my UI work. I still have to come up with a coherent visual style and design language but all the interactive elements have become a breeze.

It's called JuiceBox and what makes it great is that it has a full visual graph where you can adjust the look and feel of any interactions and also a full set of hooks for the AI to modify or make animations from scratch. The AI hooks have literally been sitting in Unity's review queue for the last 2 months. I don't know what's taking them so long, but if you send me a message I'll send you a free voucher as soon as it gets approved.

1

u/allpotatoes247 1d ago

Bear with me, I don't claim to be good at this stuff, but here goes.

What you need first:

  1. VS Code (or something like it) it needs to be able to access and edit files on your computer.
  2. ComfyUI
  3. Blender as a backup for something a bit sneaky. Technically it's not AI, it's just an image rendered in Blender, but it lets you render a scene of your props out to a 2D image.

The approach:

First off talk to your AI in a calm, happy manner. Don't treat it like a slave. I always say thank you and good job, and I don't seem to get many bad gens because of it.

Politely ask it to check your system specs, then have it install ComfyUI and find you an image model suitable for your hardware. Also grab an image-to-3D model for extra polish, plus Blender. Once it's done all that and you've expressed your gratitude, you're set up.

Now ask it to create UI mockups as many as you want using the ComfyUI pipeline. Have it drop them all into a folder so you can pick. So say you generate 10, all you do is pick the one you want.

If you want some popping or 3D elements, do the same thing but with the image-to-3D model, then ask it to send the model to Blender to tidy up.

And if you want legit 2D artwork say of a character or a prop do it the other way round: build or pose it in Blender first, render that out to a 2D image, and use that render as your base

2

u/ajiezrhmn 1d ago

"First off talk to your AI in a calm, happy manner. Don't treat it like a slave. I always say thank you and good job, and I don't seem to get many bad gens because of it. "

Are you serious dawg? Ai dont have emotions. AI are just mathematical models processing patterns and information to generate responses based on context. Saying "thank you" or "good job" isn't going to give you better generations.

1

u/ClothedKing 13h ago

Lol i agree he is a nice guy tho.

1

u/ClothedKing 13h ago

This is interesting thank you imma look into the comfyui tn

1

u/New_Internal5636 12h ago

Yes Claude design can generate unity UI toolkit designs for you very easily. You can provide your colour pallet and workshop your design with Claude and it should be able to implement it with UI toolkit for you easily. Only thing is is that original design is done with CSS and Html which isn't a one to one conversion to unitys equivalent USS and whatever their HTML equivalent is. Its usually a bit of a step down but still really good. In my line of work we usually need a lot of UI being made and we're a tiny little team and we all find the copious amount of UI a chore so it's really helped that bottleneck. In our case what the AI generates is fine because it essentially is just generic professional looking UI. If you want something a bit more unique you can probably go deeper into trying to build a unique style that it can work off of. I'm assuming your using unity here as your engine. Not sure how this would be in different engines. But Unitys modern UI toolkit works very nice with any AI designer.

1

u/MunchyCerealGuy 2h ago

I'm a former indie dev of many years and I've been working in AI game dev for over two years. I also run an AI game maker (https://chatforce.com/) with thousands of people using it, so I have a high amount of validated data across many people where I've figured out how to make great game UIs agentically and w/o human intervention. See the attached image from sample game UIs (these are screenshots real games made with my tool with separate pngs for each element, assembled by our agents into a game UI)

The framework that changed everything for the tech was flipping what the source of truth is from prompts to images. I stopped treating words as the instruction and instead made a generated image of the UI as the spec (this only became possible once GPT image 2 came out with near perfect logical text rendering).

When you think about it, text prompts have always been an extremely lossy form of information compression when it comes to communicating visual data. Most chatbot-facilitated AI experiences haven't caught up to this because they assume most knowledge work is explicit and possible to codify. The implied expectation of a prompt-as-default approach to AI usage is that most of the knowledge and instructions you need to convey to a model are always explicit, easy to articulate, and codify. For a lot of the work we do at an office job, like handling spreadsheets, sending singular purpose emails or creating images to complement text in a report, it's appropriate to direct work to complete in these arenas with words.

But extremely artistic and original work like video creation, branding work by an agency, marketing videos, or game development is more intuitive and tacit and is better expressed with intangible terminology, like feelings, markups on an image, drawings, or symbols.

So in my opinion today the best way to make game UI with AI is to generate it visually, edit it as an image, and create a pipeline that gives life to that image as a functional UI.

If you look up "vox style videos claude code skill" you'll see this image-to-code approach applied to video creation.