OpenFL vs Flutter

Hello everyone,

I’'m new here, so first of all, hi :wave:

I’m currently comparing different frameworks for cross-platform app development. In particular, I would be interested in what you say are the pros and cons of using OpenFL compared to Flutter if the target platforms are Mobile, Web, and Desktop. Are there special types of apps that are better developed in OpenFL and others better in Flutter?

Thanks in advice for the help

I personally think that games and slightly more dynamic applications are better done in OpenFL. If you want to make an app that acts as a frontend to banking or social media software, then Flutter is probably your better option.

From my understanding, Flutter is more for making UI intensive applications, particularly using XML to place various widgets. It maintains the visual state of various pages and offers some degree of navigation between the pages in an app. I believe Flutter also offers interoperability with a variety of features for the platforms you can develop for. And at the end of the day, the Dart code you write is either running in a VM or using AOT compilation for the target platform.

OpenFL is purposely modeled after the Flash/AS3 API, acting as a good alternative for targeting other platforms that Adobe did not originally offer AIR support for and now it acts as a means of porting over old AS3/Adobe AIR apps since Adobe has decided to discontinue their tech…There is a display list hierarchy of visual items that you add and manually position on a stage. If you’re writing some kind of app with page navigation, you’ll have to program your own navigation. In that respect, it’s probably more barebones than Flutter, but provides more flexibility if you want to make something other than a simple UI-based app, such as a game or some sort of media playback. Because OpenFL is written in Haxe, you code is usually transpiled to another programming language for the appropriate target - this would be JavaScript for web, and C++ for most major operating systems. For native builds, after you transpile your code, you would need another compiler to finish the job and generate an executable. And if you want some interoperability to use certain features (like a smart phone camera) you’ll likely have to program it yourself or see if someone already wrote a library for it.

Instead of pros/cons, you should probably weigh what you value more when it comes to how the two frameworks are maintained. Flutter has Google behind it, so you’ll likely have much more consistent support. However, even though it’s open source, you’re likely still at the mercy of Google to some degree, and Google has a bad track record of dropping projects at their discretion. OpenFL (and most other Haxe libraries, at that) is open source and maintained directly by the community as opposed to a major company. So bug fixes and features are likely to come in at a slower rate, but it won’t be the end if one developer bows out.

2 Likes

Flutter is really good for general app development and offers blazing fast rendering with skia. Openfl is less performant and follows the display list paradigm. The downside of flutter, imo, is that you have to learn Dart, which is a wonderfully brilliant language but not wildly popular or as useful in todays tech landscape. In fact, if it weren’t for Flutter’s rise in 2019, Dart would surely be dead. Openfl is by far a better option for 2D game development and has a faithful community dedicated to maintenance and improvement and has been developed for about a decade. Flutter feels like another one of googles pet projects that could be tossed in the wastebin at any time it doesn’t suit Googles whims, as per Google’s reputation for such things. Flutter is less mature in many ways and the desktop targets are still in Beta afaik.

Overall, there are several pro’s and cons when looking at openfl or flutter.
Openfl:
Pros

  • Open Source
  • Community maintained
  • Many targets
  • Supported by multiple languages, eg js, ts, haxe, as3
  • Versatility
  • Flash API
  • Console support

Cons

  • Poor text performance
  • Slow rendering(especially on mobile devices)
  • No/Limited video support*
  • Limited audio (Ogg and midi only)*

*except browser/wrapper supported audio/video in html5 target

2 Likes

I think that “slow rendering” is very dependent on what the user is doing. You said “poor text performance” which can certainly affect rendering speed based upon how often you change text fields (as they are cached and do not incur overhead when unchanged)

Many mobile games have been successful using OpenFL with great performance

2 Likes

Since Flutter offers good UI, you may wish to also review these UI frameworks for OpenFL.



Both are under active development.