Published using Google Docs
Flutter Game Sample Devlog
Updated automatically every 5 minutes

Flutter Game Sample Devlog

by Filip Hracek, February—May 2022

This is a "devlog" following Filip's work on the Tic Tac Toe sample game (iOS, Android) and the associated game_template project in flutter/samples, all of which were created solo in the span of 40.5 days (part-time) between February and May 2022.

Here, I recorded problems, pain points and confusions that I encountered along the way.

NOTE: When the earlier log entries talk about a "private repo", they mean the repository that is currently public. Since the game is to "launch" at around I/O 2022, I have to make it a bit of the secret until then.


2022-02-03 Start

2022-02-07 Initial implementation

Days worked: 1

Trying to get to a working game skeleton as soon as possible, since the meat of the problem will be with the integrations and the polish.

Here's a "playable" demo of what I have right now:

Code is here (private repo, please ask for access):

Next AIs:

2022-02-08 Getting to something feedback-worthy

Days worked: 2

Going through the AI list from yesterday. Things achieved today:

Summary:

2022-02-09 First prototype worthy of some feedback

Days worked: 3

Okay, I feel that the current state of the sample is far enough that I can ask for feedback.

Playable demo:

https://filiph.github.io/flutter_game_sample/mobile.html (access this on desktop for best results)

Of course, most of the functionality isn't there yet.

Here's the kind of feedback I'm looking for:

Assuming there's no feedback to the questions above, we can talk about details of the implementation. Of course, the current implementation is terrible, but I wonder:

2022-02-09 Consolidating feedback, going forward with prototype

Days worked: 4

Now that people had a chance to give initial feedback on the early prototype,  asked me to codify the design in a written format (as opposed to just having it be an ephemeral prototype on the web).

Initial design

This is a single-player mobile game with mobile ads, in-app payments, a leaderboard, achievements, sound and music. The player progresses through a number of levels, in which she is pitted against increasingly tougher AI, playing increasingly complex versions of tic tac toe.

The player's performance in each level is scored, and she can attempt to retry each level for a better score. The game also awards achievements. Both the scores and the achievements are managed through each platform's SDK (Game Center on iOS and Play Games on Android).

There are both banner and interstitial ads in the game, served via Google Mobile Ads SDK. The player can pay to remove these ads via an in-app payment.

The game looks great on phones (with notches or without) and tablets.

Goals

The fact that we have the design down means we can finalize the P0-P2 features.

DevLog for today

Today was all about trying to disprove my hypothesis that I can implement the P0-P1 features in time, while also documenting what I found.

The final verdict is that, despite trying, I wasn't able to find any show stoppers to any of the P0s. I have a good idea of what packages I will use, and how they will interact with each other (e.g. sound vs music, in-app vs AdMob). I also played a bit with graphics to see if they can be sketch-like without seeming "cheap", and I already have a few ideas.

Task: Check that there is no show stopper for adding Mobile Ads, get the lay of the land

Task: Check that there is no show stopper for adding Game Center / Play Games support, get the lay of the land

Task: Check that there is no show stopper for adding In-App purchases, get the lay of the land

Task: Get the lay of the land of audio plugins

Task: See if we can make the game look nice while keeping the minimalist / sketch-like style

Task: Explore music options

2022-02-12 Making the AI better (by making it worse)

Days worked so far: 4½

2022-02-16 Animated marks

Days worked so far: 5

2022-02-17 High quality images versus performance

Days worked so far: 5½

2022-02-18 Flavors, plus making it prettier

Days worked: 6½

2022-02-22 Responsive design

Days worked: 7

2022-02-23 Full screen, confetti and AI

Days worked: 8

Today, I am focusing on getting the game ready for feedback. That means that all parts of the game should fit together. Things will still behave and look unfinished, of course, but at least there shouldn't be times when a user has no idea what just happened or why.

2022-02-24 Bugs bugs bugs

Days worked: 8½

2022-02-25 Publish publish publish (to internal testing)

Days worked: 9½

2022-02-28 Finishing first test release

Days worked: 10

2022-03-01 Ads

Days worked: 11

> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:google_mobile_ads] /Users/filiph/dev/flutter_game_sample/build/google_mobile_ads/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 16

          Suggestion: use a compatible library with a minSdk of at most 16,

                  or increase this project's minSdk version to at least 19,

                  or use tools:overrideLibrary="io.flutter.plugins.googlemobileads" to force usage (may lead to runtime failures)

import androidx.multidex.MultiDex;

                        ^

/Users/filiph/dev/flutter_game_sample/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java:18: error: cannot find symbol

    MultiDex.install(this);

    ^

  symbol:   variable MultiDex

  location: class FlutterMultiDexApplication

2 errors

FAILURE: Build failed with an exception.

Objective-C

GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ @"949193f10482181c062b166586b3e111" ];

Swift
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ @"949193f10482181c062b166586b3e111" ]

2022-03-02 Giving access, adding sounds

Days worked: 12

2022-03-03 Debugging an audio / performance issue on iOS

Days worked: 12½

2022-03-04 Adding Google Play Games Services (GPGS)

Days worked: 13½

2022-03-07 Trying to get Google Play Game Services to work

Days worked: 14½

2022-03-08 In-app purchase

Days worked: 15½

2022-03-09 iOS In-app purchase

Days worked: 16

2022-03-10 Persistence

Days worked: 17

2022-03-11 Layout and new assets

Days worked: 18

2022-03-12 Icon

Days worked: 18½

2022-03-14 Transitions

Days worked: 19

2022-03-15 Deadline

Days worked: 20

2022-03-16 Script writing

Days worked: 21

2022-03-17 User testing

Days worked: 22

2022-03-21 Asset stores

Days worked: 22½

2022-03-23 Text input & bugs

Days worked: 23½

2022-03-24 Planning

Days worked: 23½ (i.e. no actual work today, just some admin — not incrementing)

2022-03-29 Fixes

Days worked: 24

2022-03-30 Making the game finishable

Days worked: 24½

2022-03-31 Video script

Days worked: 25

2022-04-01 Last changes before "launchable" version

Days worked: 26

2022-04-05 "Publish"

Days worked: 27

2022-04-06 Code quality

Days worked: 28

2022-04-08 Code quality part II

Days worked: 28½

2022-04-10 Extracting the template

Days worked: 29½

2022-04-11 Recoding and editing

Days worked: 30½

2022-04-12 Recording and editing, part II

Days worked: 31½

2022-04-13 Editing

Days worked: 32½

YouTube chapters

Must be offset after adding official intro.

00:00 - Intro

00:57 - Why games?

01:31 - App-like games versus videogames

03:57 - Flame Engine

04:23 - Tic Tac Toe Sample

05:23 - The Template

06:23 - General Approach

07:25 - Shallow Structure

09:45 - Code walkthrough

43:32 - Assets

52:20 - Conclusion

2022-04-19 Editing, part 2

Days worked: 33

2022-04-21 Editing, part 3

Days worked: 34

2022-04-22 Crashlytics

Days worked: 35

2022-04-25 Preparing for final launch of Tic Tac Toe

Days worked: 35½

2022-04-26 Last game user test before submitting

Days worked: 36

2022-04-27 Submit launch version

Days worked: 37

2022-04-28 Document things

Days worked: 37½

2022-04-29 Document things, part 2

Days worked: 38

2022-05-02 Landing the PR

Days worked: 38½

2022-05-03 Tutorial title card

Days worked: 39

2022-05-04 YouTube metadata

Days worked: 39½

2022-05-06 Making sure everything is ready for next week

Days worked: 40½

2022-05-10 Launch day

Days worked: 40½

2022-05-12 Upgrade to Flutter 3

Days worked: 41

2022-09-09 Upgrade audioplayers

Days worked: 41½

2022-12-03 Fixing go_router breakage

Days worked: 42