Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add game_template #1180

Merged
merged 64 commits into from May 10, 2022
Merged

Add game_template #1180

merged 64 commits into from May 10, 2022

Conversation

filiph
Copy link
Contributor

@filiph filiph commented Apr 29, 2022

Adds a template / sample for games built in Flutter, with all the bells and whistles, like ads, in-app purchases, audio, main menu, settings, and so on.

// cc @domesticmouse @craiglabenz

Pre-launch Checklist

  • I read the [Flutter Style Guide] recently, and have followed its advice.
  • I signed the [CLA].
  • I read the [Contributors Guide].
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.

Copy link
Contributor

@domesticmouse domesticmouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to need a follow up PR that fixes up lints for Dart 2.17

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the app need network access in prod?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does, for Crashlytics.

Copy link
Member

@parlough parlough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really cool to see. Going through the sample, I learned a lot about some of the packages from your comments and usage, thanks!

I have some minor nits since this seems slightly intended to be used as a template, feel free to consider them or not :)

game_template/lib/src/audio/audio_controller.dart Outdated Show resolved Hide resolved
game_template/lib/src/audio/audio_controller.dart Outdated Show resolved Hide resolved
game_template/lib/src/audio/sounds.dart Show resolved Hide resolved
game_template/lib/src/audio/sounds.dart Show resolved Hide resolved
game_template/lib/src/crashlytics/crashlytics.dart Outdated Show resolved Hide resolved
game_template/lib/src/in_app_purchase/in_app_purchase.dart Outdated Show resolved Hide resolved
game_template/README.md Show resolved Hide resolved
game_template/lib/src/audio/audio_controller.dart Outdated Show resolved Hide resolved
game_template/lib/src/audio/songs.dart Outdated Show resolved Hide resolved
@filiph
Copy link
Contributor Author

filiph commented May 2, 2022

Thanks for the reviews, @domesticmouse and @parlough! I think I addressed all issues but there are some discussions I left unresolved. Feel free to either close them or continue.

@domesticmouse
Copy link
Contributor

I'm happy to land this as is, and fast follow changes as required. @parlough is there anything outstanding from your point of view?

@parlough
Copy link
Member

parlough commented May 2, 2022

Looks good to me. The required 2.17 changes and anything else can be completed in the future as needed :)

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had one or two minor edits. (OK, it's 58.) Otherwise lgtm :D

game_template/README.md Outdated Show resolved Hide resolved
game_template/README.md Outdated Show resolved Hide resolved
device attached.

It is often convenient to develop your game as a desktop app.
For example, you can run `flutter run -d macOS`, and get the same UI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to use the macOS tag once we hit stable. Also, that wouldn't work at all if you're on Windows or Linux. I'd reword this sentence.

game_template/README.md Outdated Show resolved Hide resolved
game_template/README.md Outdated Show resolved Hide resolved
game_template/README.md Outdated Show resolved Hide resolved
game_template/README.md Outdated Show resolved Hide resolved
rules:
# Remove or force lint rules by adding lines like the following.
# The lints below are disabled in order to make things smoother in early
# development. You might want to enable them once things stabilize.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# development. You might want to enable them once things stabilize.
# development. Consider enabling them once development is further along.

GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's SUPER interesting that the anchor in your original URL didn't work. I assume it has to do with using a flutter.dev URL rather than a docs.flutter.dev URL...

Suggested change
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
# For more info, check out
# [Reference the keystore from the app](https://docs.flutter.dev/deployment/android#reference-the-keystore-from-the-app).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These things (like .gitignore) come from Flutter SDK itself. For example: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/app_shared/android.tmpl/.gitignore.

I haven't touched these files. This is what all apps are created with.

@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Used by Flutter tool to assess capabilities and perform upgrades etc.
# The Flutter tool uses this info to assess capabilities and perform upgrades.

@domesticmouse
Copy link
Contributor

@filiph can you please update your PR to merge in the changes we have landed in master?

filiph and others added 24 commits May 10, 2022 11:52
Co-authored-by: Parker Lougheed <parlough@gmail.com>
Co-authored-by: Parker Lougheed <parlough@gmail.com>
Co-authored-by: Parker Lougheed <parlough@gmail.com>
This leads to a crash on startup. Isolates are not supported in the browser.
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
@filiph
Copy link
Contributor Author

filiph commented May 10, 2022

@domesticmouse - Did this now. The current run fails with "Verify web demos", though.

I'm going to wait for a bit, and try again later today. But since the web demos are completely separate from game_template, and I'm supposed to land the template today, I'm ready to ignore that failure.

@filiph filiph merged commit daa024a into flutter:master May 10, 2022
10 of 11 checks passed
@domesticmouse
Copy link
Contributor

Yup, the failing test is known. @craiglabenz is working on it, I believe. @sfshaza2 you should now have your game_template url live. 😎

@filiph filiph deleted the game_template branch May 10, 2022 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants