The Flutter Casual Games Toolkit, announced at Google I/O 2022, pulls together new and existing resources that enable you to speed up development of casual games on mobile.
This page outlines what resources are available and where you can find them.
How Flutter can help
In the beginning, four engineers had a vision of developing a framework for creating performant mobile apps written as a single application. What later became Flutter has grown in many ways, but has always focused on writing apps.
Games fall into roughly two categories: video games and app-like games. You are likely familiar with both types of games, though you might not have thought about them in quite this way.
Video games include arcade-style games: shooters, racing games, and so on. Video games are generally action-based and use a continual input device, like a joystick.
App-like games include casual games such as board games, card games, puzzles, and strategy games. App-like games tend to respond to user input, like tapping on a card or entering a number or letter.
Because these games are app-like, they are especially well suited for Flutter.
When we say casual games, we are primarily referring to app-like games in this context.
The Casual Games Toolkit provides the following free resources:
- A game template app, available in Flutter’s
samples repo, includes the following prebuilt features:
- Main menu
- Sound & music
- In-app purchases
- Achievements and leader boards
- Crashlytics support
- A video, Build your own game in Flutter, explaining how to use the template
- Source code for a finished tic tac toe game, built using the game template, and released on Android and iOS
- A link to a Flutter Games Discord channel (use the direct link if you already have a Discord account)
The game template is opinionated (it pretty
much has to be), so it uses specific packages,
Feel free to change the code
to use other packages, if you prefer.
And, yes, the game template assumes that you’ll want to earn money for your mobile game, so the ads and in-app purchase packages are already integrated with the template and ready to be configured.
As explained on the Games page, you can also take advantage of up to $900 in offers when you integrate Google services, such as Cloud, Firebase, and Ads, into your game. (Terms and conditions apply: You must connect your Firebase and GCP accounts to use credits for Firebase services and verify your business email during sign up to earn an additional $100 on top of the normal $300 credit. For the Ads offer, check your region’s eligibility.
Are you ready? To get started:
- Watch the Quick Start video
- Clone the games template repo
- Join the Flutter Games community on Discord (use the direct link if you already have a Discord account).
- Set up accounts on AdMob, Firebase, and Cloud, as needed
- Write your game!
- Deploy to both the Google and Apple stores
Perhaps you want to write a video-style game? The game template is still valuable for the high-level structure of such games.
In fact, the people at Very Good Ventures wrote a Pinball game for Google I/O 2022 using the Flame engine. For more information, check out I/O Pinball Powered by Flutter and Firebase, a free article on Medium and play the game.
Once you feel ready to go beyond the games template, you might want to investigate other resources recommended by the community. Bolded items in the following table are used in the games template:
|Animations & sprites||
Special effects recipes (including animations)
Spriter Pro tool
|App review||app_review package|
Flutter Firebase getting started guide NEWLY UPDATED
firebase_crashlytics package (tracks crashes of your app)
|Games services||games_services package|
|Images and icons||
CraftPix (free and purchasable assets)
Game Developer Studio (purchasable asset packs)
GIMP (a free image editor to create your own assets)
Couchbase Lite, cbl_flutter package
Paint API docs
Special effects recipes
|Win 32||win32_gamepad package (supports win32 gamepad)|