newsletter

What I learned making a game in 2 days

I share my experience making a game in Flutter in 2 days for the Flame Game Jam 3.0: how to create a game from zero by yourself for a game jam with limited time and resources.


Sandro Maglione

Sandro Maglione

Games

Last weekend I took part in the Flame Game Jam 3.0.

I made a game. In Flutter. In 2 days. All by myself.

This is my experience and what I learned 👇


Tech stack

  • Flutter
  • flame: flame is package that helps you creating games in Flutter. It was required for the Jam (Flame Game Jam 💁🏼‍♂️)

Setup

I took some time before the Game Jam to get familiar with flame and Flutter.

A flame game is like a normal flutter app:

flutter create my_first_game

I was able to render an image in the center of the screen and learn how to implement keyboard events.

Preparation done! 🔥

Get started

The theme of the game was announced on Friday evening: Cold & Hot.

This gave me some time to think about ideas before starting the implementation on Saturday.

Planning is crucial in any Game Jam. I have only 2 days after all, I need to make sure I can deliver something 💁🏼‍♂️

Before starting the implementation I wrote down a quick README with all the requirements. It's time to code!

There is more 🤩

Timeless coding principles, practices, and tools that make a difference, regardless of your language or framework, delivered in your inbox every week.

Implementation

Rule number 1 for any Game Jam:

Nothing goes as planned (especially if you don't have any prior experience with the package used to implement the game)

Games are the complete opposite of functional programming:

  • Mutable state everywhere
  • Imperative code for everything
  • Low level details manually

This makes the project explode in complexity rather quickly 😅

The time pressure does not help as well. Result: be ready to spend long hours (long hours!) coding during a Game Jam.

On Sunday I had a 5 hours long session with no breaks to complete, export, and submit the final game

Furthermore, a game has many moving parts. I needed to take care of them all by myself:

  • Graphic design
  • Game assets
  • Gameplay
  • QA and testing

A Game Jam will challenge your skills like nothing else.

It will also help you to prioritize: with limited time and resources you have no time to focus on writing "clean code" or fuss over the details.

My game is now live. You can play it on itch.io:

My submission to the Flame Game Jam 3.0: Flame & Ice!My submission to the Flame Game Jam 3.0: Flame & Ice!

👉 For all the details and code snippets you can read the full article containing all the details of the implementation.

Takeaways

  • Games and Functional Programming are the completed opposite
  • Having an hard deadline on (any) project makes you push more and work harder
  • A Game Jam is a unique way to challenge your coding skills
  • flame has everything that you need to make games with Flutter: if you are interested I suggest you to go an try it!

Games are definitely unique in the programming ecosystem: they are a completely different beast compared to frontend, backend, cloud, and all other technologies.

Go give it a try sometime 💁🏼‍♂️

That's it for this week project. Looking forward to another interesting project coming next!

See you next 👋

Start here.

Timeless coding principles, practices, and tools that make a difference, regardless of your language or framework, delivered in your inbox every week.