I've been making games with
#Flutter on and off for about 2 years now, but more seriously since January.
A mishmash of what I have learned so far:
๐ฅ Flame is well maintained (by
@BlueFireOSS ).
๐๏ธ You can use arch concepts from apps, such as flutter bloc, for the logic of your games.
๐ฆ To make level backgrounds, Tiled is excellent (by
@TiledApp ), and there is a flame package for it.
๐ฅCollisions and hitboxes are hard to reason with sometimes. Hand drawing stuff helps a lot!
๐ฑ๐ป Scaling your game world to the screen can be tricky (eg phones vs tablet). It needs even more thought than adapting an app to different screen sizes IMHO.
๐ฅช Stack is your friend. You can trigger all your menus and overlays using bloc, and display them with a stack (with your game view at the bottom of the stack).
โฐDo not do complicated calculations in your render loop. The good thing is when you do, you will quickly find out you messed up, because even on a good device, you will notice glitches.
๐งชYou can write widget tests for games but it's harder. So make sure you really separate your calculations/core logic and unit test the hell out of them.
๐คซThings will go wrong and you want to avoid error messages in a game. So always check data and have fallbacks so you don't fail. The good news is unlike an app, the player usually doesn't know what the "correct" behaviour is supposed to be, so players will not spot all the bugs (as long as you don't have too many obviously).
๐งโ๐ฆฐ๐งโ๐ฆณ๐ฉโ๐ฆฑ๐ฉโ๐ฆณ People have a wide range of experience with games, and their expectations are different, often based on their favourite games. Apps are often designed for consistency between apps, but games are not (even though there are some commonalities). So test your prototype with a wide range of users, because you want to make sure your controls work.
๐ You do need onboarding in games, but it's different from apps, it needs to be part of the game itself. Players try a lot of games, they won't stick around after 15 seconds if they don't "get it". Unlike with apps, they don't "need" your game to do something, so they are very impatient.
Do you make games with
#Flutter? Share your takeaways, or simply write a one word comment, so I can follow you๐