Home to the official code for the Flutter Casual Games Toolkit and other Flutter gaming templates.
Visit flutter.dev/games for more information.
If you're new to Flutter, you first need to install the Flutter SDK.
The projects in this repository are divided into two broad categories:
-
Templates. A small number of starting points for your game project. Templates are intended to give you a simple project structure on top of which you can build your game. They differ to accommodate different game types, from the simplest casual games through drag&drop board games to 2D platformers.
-
Samples. Intended to show functionality beyond the basics, such as multiplayer or ads integration.
.
├── templates
│ ├── basic
│ ├── card
│ └── endless_runner
└── samples
├── ads
├── multiplayer
└── ...
-
Clone this repository.
To minimize download size, you can use a partial clone:
git clone --filter=blob:none https://github.com/flutter/games.git
(Alternatively, you can download the ZIP file and uncompress it on your workstation.)
-
cd
into the project you are interested in. For example:cd templates/card
(Alternatively, you can copy the contents of a project to somewhere else, and change to that directory.)
-
(Optional) Rename the project with the
rename
tool. -
Open the project in your favorite editor and enjoy.
See the contributor's guide!
If you have a general question about one of these samples or how to adapt its techniques for one of your own apps, try one of these resources:
If you run into a bug in one of the samples, please file an issue in the
flutter/flutter
issue tracker.