Flutter Intermediate Lesson 118 of 135 3 min read
Publish Your Flutter Game: Performance, Testing and App Stores
Get a Flutter Flame game ready to publish: performance tips, device testing, orientation and releasing to Google Play, the App Store, web and itch.io.
On this page
Your game works. This lesson is the checklist for turning it into something other people can download and enjoy.
1. Performance
Games redraw every frame, so small waste adds up.
- Build in release mode to judge speed:
flutter run --release. Debug mode is much slower. - Remove what is off screen. Bullets, enemies and particles that leave the play area should call
removeFromParent(). - Reuse instead of creating. For things created constantly (bullets), keep a pool and reset them instead of making new objects. Flame has
ComponentPoolfor this. - Load images once in
onLoadand reuse them; never load insideupdate. - Use passive hitboxes for things that never need to test each other (walls, coins).
- Avoid work in
render. CreatePaintobjects once as fields, not in every frame. - Check the frame rate with
FpsTextComponent()during development.
2. Screens and devices
- Use a fixed resolution camera so the game looks the same on every screen.
- Lock the orientation if your game is portrait or landscape only:
// Not standalone: add your own MyGame class.
import 'package:flame/flame.dart';
import 'package:flame/game.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
await Flame.device.fullScreen(); // hide the system bars
runApp(GameWidget(game: MyGame()));
}
- Test on a slow, old phone, not only on your computer.
- Add on-screen controls for touch devices; do not rely on a keyboard.
3. Polish before release
- A main menu, pause and game over screen (overlays).
- Sound with a mute option (sound and music).
- A saved high score (saving).
- An app icon, name and splash screen (app icon and splash).
- Pause the game when the app goes to the background (Flame does this for the engine; also pause your music).
4. Where to publish
| Platform | How | Lesson |
|---|---|---|
| Google Play | flutter build appbundle | Release for Android |
| Apple App Store | flutter build ipa (needs a Mac) | Release for iOS |
| Web | flutter build web, upload the build/web folder | Web and desktop |
| itch.io | Zip build/web and upload as an HTML5 game | itch.io |
| Windows / macOS / Linux | flutter build windows (or macos, linux) | Web and desktop |
itch.io is the easiest place to share your first web game with friends and get feedback: it is free, and players can play in the browser.
5. After release
- Ask players for feedback and watch where they get stuck.
- Add analytics events (level reached, game over reason) to see what to improve.
- Update regularly: a new level or a daily challenge brings players back.
Try it yourself
Take one of the game projects, add a menu, sound and a high score, build it for the web, and upload it to itch.io. Share the link with a friend.