The State of Flutter for Game Development in 2023
Flutter is an app development framework (primarily focused on gesture detection and rendering) that supports targeting mobile, desktop and the web.
Flutter has a markedly different scope to the likes of Unity and Unreal - game engines that support targeting mobile, desktop, and the web, and game consoles, and VR headsets, and more. Unity and Unreal both provide a comprehensive abstraction layer over the platform your game is running on.
When working on a game within a popular game engine it's likely, that you can finish your project while staying within the confines of the Editor (and the companion IDE of your choice) and pay little mind to the Xcode project, Gradle project, or other platform-specific build systems your project may depend on.
In an app development context when working with Flutter, it is a common occurrence for projects to use third-party libraries that require steps to be taken at the native platform layer. For instance, when your project involves scheduling notifications. In a game development context, domain problems are frequently solved with the help of Flame, which uses a Component system and Game Loop that will look very familiar to users of Unity.
You can build games in Flutter today - game development even has its own section on the Flutter website highlighting use cases and resources to get started.
Why move toward Flutter and away from the most popular game engines, if you want to make a game?
- Flutter itself is open source. So is its documentation.
- No fees. Flutter is an open source project with the BSD-3 license.
- Solutions for "app-like" problems are there out of the box, e.g. navigation, theming, screen-readers, deep linking.
- Flutter is first and foremost a UI framework - it's easier to build UI. If you are looking to add some flare you can use tools provided by the base Flutter framework, or you can use packages from the third-party ecosystem like flutter_animate.
- One language for your UI code and your functional code. If you want to write command-line interfaces or visual tools as seperate processes, you can do that too. Dart is quite lovely to work with.
- Modern package management. It's a breeze to create an ecosystem of supporting tools around your project and reuse code. The Unity Engine has made strides here in recent years, although the creation of custom packages is more manual than it could be.
- Code push - push patches to your live game. At the time of writing, only iOS and Android are supported.
- If you're working with Flame or just plain Flutter, it's very testable.
- Hot reload. Recompile Dart code just-in-time.
- Avoid editor jank. To some extent this is less about Unity or Unreal specifically and more of a problem with editors and the "sensible default" behaviours that characterise them. Conventional wisdom is to workaround this problem by buying a very expensive computer. If your workflow doesn't have a visual editor that needs to recompile your scripts, your development machine is less likely to lock-up. That can feel really liberating.
What do you have to lose?
- No elegant system for input handling. There is the gamepads package that you can use on desktop platforms. On mobile, the situation is a little trickier. Out of the box you can typically use a gamepad to navigate a Flutter app in a similar manner to how you would use a keyboard. Orchestrating a game to respond to input as a user expects may require a lot of care. If you want to support input mapping on your project, you're on your own.
- No support for building for desktop platforms other than the one that your development machine runs on. That means a seperate machine for building for Windows, a seperate machine for building for Linux, a seperate machine for building for macOS.
- No straightforward path to targeting game consoles.
- No 3D support. (Although help is on the way...)
- No "Scene view" out of the box. You're always working with a "game view". Flutter doesn't support producing applications with multiple windows, but it's in the works, and once released I think it will go a long way to solving this problem.
- No visual editor to support art workflows out of the box. i.e. depending on how comfortable your artists are with working with code, programmers may have to be involved in the integration of assets into your game.
- No platform-agnostic integrations of popular libraries for sound and input handling. i.e. Wwise, FMOD, SDL. C++ SDKs could be integrated on a per-platform basis for your project, but it's a significant amount of work.
- There are various restrictions on support for shaders, as per this link. I've heard that what can be achieved with Flutter's shader support today is comparable to what you see in games from the (original) PlayStation era.
There are dealbreakers in that list for some kinds of games. To get an idea of what is possible with Flutter you can see some simple demos created by the Flame Engine team via the web here. There's also a self-reported list of projects from game developers appropriately titled Awesome Flame. The largest project that I'm aware of is WalkScape, an MMORPG for mobile where progress is made by walking in real-life. Some other projects that are indicative of what could (from a technical perspective) be made with Flutter today:
It must be acknowledged that in the absence of console support, the economic case for making commercial games with Flutter may be weaker than alternatives out there in some circumstances.
In the future (if producing hundreds of millions of plastic boxes for high-end consumer electronics is still something humanity is interested in) the Flutter community might look to solve this problem in the same way that the Godot community has, with a market of companies offering porting services.
So there's some room for improvement for supporting commercial production, what about hobbyists, or prototyping scenarios?
It depends.
It depends on what the primary consideration (or bottleneck) at hand is. If you feel that engineering or game design is where most of the work lies (as opposed to art or animation) you should consider working with Flutter. If it's narrative, you may be best served working with something like Bitsy.
At the end of 2023, I think Flutter has a lot to offer if your project can live within its limitations. I am cautiously optimistic about its future as a game development tool.