Flutter for game development

CodingWithTashi
5 min readApr 14, 2022

--

We all have at least one favorite game whether it is mobile, web, or desktop. But have you ever wondered how these games are built from a development perspective?

Building these games is not as easy as we think it is. It requires considering things like gravity, collides, sprite, motion, enemy, physics, etc.

Then there is a map, life, score, sound, animation, effects, etc which require a hell lot of work.

Hello guys, This is CodingWithTashi and in this shitty post, we will discuss game development/future in flutter.

Update: Flutter has released a casual game tool kit where you can use the game template out of the box which contains ads support,in-app purchase, and game services (Achieve and leader board support). For more read here.

1. Why am I writing this post?

Well, I am working on an application that let you play games in a single application. Kinda like 3 in one game, we used to play back then.

flutter game

This is a work-in-progress game that I have been working on for a few days now, Thought I might share some thoughts about

  • How you can get started with the game in flutter?
  • Game development ecosystem in a flutter

2. So, What are the approaches for building games?

There are two approaches that you can take while building any game.

a) Building game without a game engine

b) Building a game with the game engine

A game engine is kinda like a car engine where the engine will take care of all the heavy work and all you need to do is change gear and wheel the steering.

The same goes for the game engine where all the heavy work is being taken care by the game engine itself and we just use expose API to satisfy our requirement.

Let's discuss them one by one.

a) Building game without a game engine.

If you are building a game that doesn't require much work, especially If the game doesn't require components such as Gravity, Physics, etc.

Then you can avoid using a game engine.

Some examples of games that don't require a game engine.

  1. Spelling bee game

2. Hangman game

3. Tic-Tac-Toe

These are the games that don't require you to use physics or collide as such which is why it is easy and straightforward to build these game. With that said let's talk about building a game with the game engine.

b) Building a game with the engine

If you are serious about building a game, Then I would definitely encourage you to learn more about popular game engines such as

  • Unity
  • Unreal Engine etc

But if you are like me who want to stick on flutter and still want to build decent 2D games and get filthy rich then here is the recipe.

We are going to talk about flame.

What is flutter flame?

  • It is Flutter game engine, which provides a nice set of somewhat independent modules you can choose from.
  • It Supports all platform
  • All the heavy work is being taken care by this package.

How to get started?

Follow this step-by-step tutorial by Christian Muehle to create your first flutter game using a flame.

Check out the game demo from here.

  • You can also read building Games in Flutter with Flame by Vincenzo Guzzi

What are some open source projects?

There are many applications that are built using flame engine some of the popular games are:

Still not inspired? Let's check out some game that is already available in the play store?

List of flutter game that is available in the google play store.

Note: All the link and resources I have used in this post can be found from below link.

  • Some of the packages and tools you can use while building flutter games.
  • List of flutter games from awesome flame engine

Thanks, guys, I hope you like this shitty post. please make sure to give a clap 👏 and leave some engagement. let me know if you have anything on your mind. I would love to connect with you.

Check out more similar posts from CodingWithTashi. Connect me on Twitter, Instagram

--

--