Create a project in Flutter and add Flame

- Andrés Cruz

En español
Create a project in Flutter and add Flame

Developing 2D games with Flutter and Flame can be very exciting and rewarding, it really is quite an experience to be able to develop mobile games so easily, if you are new to game development or want to start in game development and of course, If you know how to develop in Flutter, these tutorials are for you!

Flutter is a cross-platform mobile app development framework using the Dart programming language, and Flame is a high-performance 2D game library built on top of Flutter; as we will see in this series of tutorials, the two of them are the best of friends and they complement each other really well.

Being able to use Flutter widgets to build all those graphic elements necessary in any game such as texts, action buttons and chaining them with a process in Flame, is really easy to do.


With Flutter, we can make all kinds of applications, especially focused on the mobile field, but we can also use the same project to develop not only on Android and iOS, but also on desktops for Linux, MacOS and Windows, and also for web development. making subtle changes to the project at the code level. Although, Flutter goes much further with Flame.

Flame is an engine to create 2D games with Flutter that we can use in a Flutter project by installing a simple package through a pub; thus, with this, we can create 2D games with Flame for mobile, desktop and web.


In this post, we are going to learn how to create a Flutter project and add the necessary base library to develop our 2D games using Flutter; therefore, it is a chapter that you should take as a reference every time we create a new project in subsequent entries.

Let's start by creating the project that we will use to create the application:

$ flutter create <NameProyect>

Once the project is created in Flutter, we change to the project folder:

$ cd <NameProyect>

And we add the flame library:

$ flutter pub add flame

Finally, we open VSC or the editor you use to develop in Flutter; for this, you can do the manual process (open the project we created earlier from VSC), or use the VSC command (in case you have it configured):

$ code .

Remember that this material is part of my complete course and book on Flame and Flutter which you can purchase for a small price in case you want to delve deeper into 2D game development.

Andrés Cruz

Desarrollo con Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz en Udemy

Acepto recibir anuncios de interes sobre este Blog.