r/FlutterDev • u/ParticularDig1630 • Aug 29 '26
Discussion Claude + Flutter Flame!
I think to make 2d games inside ide using ai tools like claude ai flutter flame will best approach.
And from better prompting it's easy to manage the game.
0
Upvotes
2
u/ccheever Aug 29 '26
Yes, that should work very well. Flutter has a lot of the properties of a game engine along with a lot of the properties of the rendering engine of a web browser. That makes it a great fit for a lot of kinds of games. And the fast rebuilds and reloads should be delightful.
2
u/Appropriate_Spot_621 Sep 01 '26
Did exactly this last week — full playable prototype in Flame in a day, a little capybara platformer. It works.
Where it fell down for me was game feel. The AI gets you a working jump quickly, not a good-feeling one — coyote time, jump buffering, squash on landing were all things I had to know to ask for.
1
u/eibaan Aug 29 '26
This crappy Age of Empire clone was created by Claude Fable 5 using:
I think, I provided the API for the
Bitmapclass.And I asked for a 4x5 pixel all-uppercase font. Fable created a
GameRendererand aGameStateobject, as well as aGameMapwithGameTiles. These form an ad-hoc engine.A
GameWidgetcreates all of those objects and then uses aTickerto rungame.updateandrenderFrame, then converting the bitmap's pixels into aui.ImageusingdecodeImageFromPixelsSyncand displaying that using aRawImagewidget. That widget is wrapped into aSizedBox,MouseRegion,GestureDetectorandFocuswidget to get mouse and keyboard input. Here, the ad-hoc engine immediately processes the input and creates a new frame instead of queuing events and lettingupdatedeal with it.Depending on your game, you probably don't need flame for rendering. Simple widgets or a
CustomPainter– or in my case, just aRawImage– is enough for an AI to start.Or have a look at this prototype of a hexmap for playing war games. Creating hexes was (and perhaps still is) a very difficult task for AIs.
But keep in mind, the game itself is crappy. The sprites are surprisingly good (curtesy of Fable) and ruleswise it resembles AeO because I fed in a long design document, but it is very unpolished and ultimately unplayable because timing is off and the computer player cannot attack and cannot really build. Also, Fable didn't notice that you cannot reach it because you cannot move over non-plain fields.
I was only interested in the on-shot-capability of Fable and not in the result so I never fixed any of those problems.