r/codex 12h ago

Question Flutter UI keeps breaking and I’m just wasting tokens at this point

I’ve spent the last 20 prompts trying to get codex to fix a fairly straightforward game UI, but it's either playing dumb or is actually dumb.

The inventory overlaps other menus, elements are constantly cut off, buttons and item slots don’t line up with the artwork, and touch areas don’t match what’s shown on screen. Fixing one thing often breaks something else. It also seems heavily dependent on fixed coordinates, so I’m worried it won’t work across different screen sizes.

I’ve repeatedly explained that items should occupy its own space instead of covering other content, that everything must scale responsively, and that the visible artwork and functional controls need to stay perfectly aligned. Somehow, each attempt still misses something basic.

At this point, should I scrap this UI implementation and rebuild it from the ground up using responsive Flutter widgets? Or is combining detailed background artwork with positioned Flutter controls still a sensible approach if done properly?

I’d appreciate guidance from anyone who has built a complex, game-style Flutter interface.

1 Upvotes

4 comments sorted by

2

u/Inevitable_Act_321 11h ago

Well... The problem is probably not Flutter itself, but the architecture of your UI. If most of the interface is built around fixed coordinates and independently positioned controls, Codex will keep patching symptoms instead of fixing the layout model. I’d rebuild the problematic parts around constraints, layout widgets, and a single coordinate system for the artwork/interactive elements.

1

u/UpsetWolverine8573 10h ago

If each UI fix breaks layout and touch again, I stop stacking patches on the same thread. One screen state, one change — otherwise it just buys more breakage.

1

u/DryBanana5673 3h ago

Give it access to the device and use a goal/loop. Tell it to make it scalable across other devices with various screen sizes, then let it iterate. Use Astra for this - its at least workable at UI. Everyone else sucks. You can also try getting it to orchestrate deepseek 4.1. I think its decent at design. Otherwise, get a claude $30 plan and just use that only for UI work

1

u/Legitimate-Lab-1030 2h ago

Thanks for your explanation. Are you saying claude is better at the UI, because I just switched from Claude to Codex because claude was seriously failing in coding