Respository for the I/O 2019 demo: Become a tech lead, slay bugs, and don't get fired.

Overview

Developer Quest

Become a tech lead, slay bugs, and don't get fired.

All in Flutter.

Research tree

The game progression is based on a "research tree" of tasks. The tree is defined in code in lib/src/shared_state/task_tree but for clarity it is also kept as a diagram in assets/docs. Here's the PNG.

The task "research tree"

Performance testing

Attach a real device and run the following command from the root of the repo:

flutter drive --target=test_driver/performance.dart --profile

This will do an automated run-through of the app, and will save the output to files.

  • Look into to build/walkthrough-*.json files for detailed summaries of each run.
  • Look at test_driver/perf_stats.tsv to compare latest runs with historical data.
  • Run Rscript test_driver/generate-graphs.R (assuming you have R installed) to generate boxplots of the latest runs. This will show up as test_driver/*.pdf files.
  • Peruse the raw data file (used by R to generate the boxplots) by opening the durations.tsv file. These files contain build and rasterization times for each frame for every run.

If you want to get several runs at once, you can use something like the following command:

DESC="my change" bash -c 'for i in {1..5}; do flutter drive --target=test_driver/performance.dart --profile; sleep 1; done'

Why run several times when we get so many data points on each walkthrough? With several identical walkthroughs it's possible to visually check variance between runs. Even with box plots, these nuances get lost in the summary stats, so it's hard to see whether a change actually brought any performance improvement or not. Running several times also eliminates the effect of extremely bad luck, like for example when Android decides to update some app while test is running.

Lock CPU and GPU speed for your performance test device

Run the following command when your performance test device is attached via USB.

./tool/lock_android_scaling.sh

WARNING:

Where to store the profiling data

You probably don't want to check the *.tsv output files into the repo. For that, run git update-index --assume-unchanged test_driver/*.tsv in the root dir. This is a one time command per machine.

Comments
  • Correct casing of paintDirty flag

    Correct casing of paintDirty flag

    Expected Project can be built shortly after clone.

    Actual

    $fl build appbundle
    Initializing gradle...                                              0.6s
    Resolving dependencies...                                           1.3s
                                                                            
    Compiler message:                                                       
    lib/src/widgets/flare/desaturated_actor.dart:16:48: Error: Getter not found: 'PaintDirty'.
        artboard.addDirt(artboard.root, DirtyFlags.PaintDirty, true);       
                                                   ^^^^^^^^^^               
    Compiler terminated unexpectedly.                                       
                                                                            
    FAILURE: Build failed with an exception.                                
                                                                            
    * Where:                                                                
    Script '/home/bean/bin/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 739
                                                                            
    * What went wrong:                                                      
    Execution failed for task ':app:compileFlutterBuildReleaseArm'.         
    > Process 'command '/home/bean/bin/flutter/bin/flutter'' finished with non-zero exit value 1
                                                                            
    * Try:                                                                  
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                            
    * Get more help at https://help.gradle.org                              
                                                                            
    BUILD FAILED in 8s                                                      
    Running Gradle task 'bundleRelease'...                                  
    Running Gradle task 'bundleRelease'... Done                         9.0s
    Gradle task bundleRelease failed with exit code 1
    
    opened by bean5 11
  • Multi Column/Landscape

    Multi Column/Landscape

    Here's the current state of the multi column layout. I wanted to submit this even though there are a few more changes to be made to make sure the direction with the implementation was correct. I also wanted to give you a chance to test it if you want/need to today.

    I called the two separate views Slim and Wide as we may end up using a different heuristic for when to show one vs the other. Right now it's using the orientation builder, but I think we may want to trigger it based on some maximum screen width (think portrait on desktop).

    @neurowave, I think we should probably center these so they don't take up the full width, same with the welcome screen. Any preferences here?

    opened by luigi-rosso 11
  • Welcome Screen, Team Tab, Hire Modal

    Welcome Screen, Team Tab, Hire Modal

    I'm submitting this now even though there's more I'd like to do to each of these sections. I realized this was becoming large enough that it'd be tedious to review if it kept growing.

    I've hooked up the following:

    • Welcome screen
      • Settings button launches the Style Sphynx mini game.
    • Npc pool page (Team Tab)
      • Because we're re-using the the Refactorer and Architect busts, the characters are difficult to discern in the grid. This will be solved when they each have their own image, right now you have to tap on them to see who it really is.
      • We could temporarily add the name under the status.
      • Particle effects only play when an Npc is available for hire.
    • Npc upgrade/hire modal
      • Icons are not correct here yet, we'll be doing these in Flare so we can get them to look exactly like the comps.
      • There's a delay when opening the modal as the Flare file is loading. This is much better in release mode.
      • I've added caching so that re-used Flare files are not re-loaded, but this is only used by the custom FlareRenderBoxes we use everywhere but the modal. I'm going to get the cacher into the Flare package this weekend so it'll be sharable across all these widgets.
    opened by luigi-rosso 11
  • final screen not launching? [p0]

    final screen not launching? [p0]

    I played through the game (defeated the style sphinx) but I never saw the pop up come to say how well I did. After that I was unable to assign team members to new tasks or "launch" other "finished" tasks.

    opened by efortuna 10
  • Style sphinx refactor design update

    Style sphinx refactor design update

    Applied the designs from Guido to the Style Sphinx game. This also includes the previous refactor + update to how the game starts (now based on configurable routes instead of nested Widgets).

    Notes

    • Developed the design and ensure it works on different devices with flutter run -d all using an iPad Pro 9.7 inch, iPhoneX and Nexus 5 simulators / emulator.
    • Used 2px for the rounded corners on the dropdown button b/c that's hard coded into the DropdownButton code on Flutter's side
    • Did not include line numbers -- not enough space on smaller devices
    • Test is failing, broken on master, fixed in #18
    • Use AutoSizeText package to fit the instructions on 2 lines max

    Todo

    • [ ] If cats look good, convert the "normalized" assets into the appropriate 1x, 2x, 3x formats.
    • [ ] Give the "Success" animation a bit more pizazz
    • [x] Test current version on Flutter web

    update_style_sphinx

    opened by brianegan 8
  • Separate out CharacterModal into smaller widgets

    Separate out CharacterModal into smaller widgets

    Broke CharacterModal out into smaller widgets. My chief concern it that it's okay that I now create a couple of FlareControl objects rather than the single one at the top. Based on what we discussed I think this should be okay, but I wanted to check.

    opened by efortuna 7
  • StyleSphinx design updates

    StyleSphinx design updates

    • Remove feature discovery, put instructions at top of screen (thanks for the suggestion, Guido!)
    • Show the sphinx when the question is finished instead of an AlertDialog
    • Add breathing animation to the Widget and icons to create a visual link and aid discovery
    • Fix style sphinx screen so it fits on various resolutions
    • Couple of small fixes for tablets
    • Played with tablet layouts, found the Question on Top / Results on bottom worked better than Question on Left, results on Right.

    (The following is a recap from my check-in with Emily so we're all on the same page!)

    I Need help with:

    • Pixel Art. Turns out I'm really bad at this! All images used (except the Chat Bubble) are taken from the internet after my own attempts failed.
      • Sphinx
      • Pyramid Background
      • Kitten in 3 colors
      • Cat bed in matching 3 colors
    • Design Review
    • Quick Gorilla Testing with folks in the office to see how well peeps who haven't played yet understand the flow

    Next Steps:

    • Add more questions for tablet displays that won't fit on mobile
    • Play around with code collapsing on longer question
    • See if I can make some of the animation logic more reusable, but a bit tricky for a couple of reasons
    • Flutter Web awesomeness

    sphinx

    opened by brianegan 7
  • Character modal should have a max height

    Character modal should have a max height

    This modal should probably not scale more than its contents' height. Separately, and not as important, we might want to give the character area a darker background… the glows don't look great on the white background.

    Simulator Screen Shot - iPad Pro (12 9-inch) (2nd generation) - 2019-04-26 at 16 19 46

    opened by neurowave 6
  • Character skill level a little hard to read for low levels

    Character skill level a little hard to read for low levels

    When the characters are at a low level, the little color dots are a little hard to see. I'm wondering if we can adjust it in some way to make them easier to read? (just a little wider? numbers?) IMG_1064

    opened by efortuna 6
  • Changing Flare dependency to use git.

    Changing Flare dependency to use git.

    The latest dev has breaking changes in the api Flare uses to draw texture mapped meshes. In order to not break our pub package working on stable, we need to use a git reference to flare_flutter's bleeding edge code.

    This also allows us to use compute which also has api and functional changes to allow it to work with async functions. This helps reduce the jank when loading Flare files as reported in issue #31.

    By the way, I didn't include this in the PR but I locally had to bump my Dart SDK version (I upgraded dev channel this morning):

    The current Dart SDK version is 2.3.0-dev.0.1.flutter-1f1592edce.
    
    Because dev_rpg requires SDK version >=2.3.0-dev.0.1.flutter-cf4444b803, version solving failed.
    
    opened by luigi-rosso 6
  • Possible Flare bug in hit-test / sizing

    Possible Flare bug in hit-test / sizing

    Repro:

    • checkout https://github.com/2d-inc/dev_rpg/commit/bfa130b5fdd0d69d6c1745a7469624f3f6175295 (current HEAD — just making sure it's recorded you get to this later)
    • run flutter drive --target=test_driver/performance.dart --profile (as documented here in the README, you can omit --profile in this case)
    • the test will never go past https://github.com/2d-inc/dev_rpg/blob/master/test_driver/performance_test.dart#L62 (the last log is [warning] FlutterDriver: tap message is taking a long time to complete...

    The easiest way to fix this is to remove the only Flare widget on that screen:

    • remove https://github.com/2d-inc/dev_rpg/blob/master/lib/src/welcome_screen.dart#L55-L60 (StartScreenHero) or replace it with any other widget
    • try again

    Now Flutter Driver should successfully tap the button. (It will fail just after that, probably because of the same issue.)

    I assume this is somehow related to either hitTest or sizing. But I didn't have luck fixing it with things like bool hitTest(...) => false or changing the size.

    opened by filiph 6
  • The app doesn't compile

    The app doesn't compile

    Warning
    ──────────────────────────────────────────────────────────────────────────────
    Your Flutter application is created using an older version of the Android
    embedding. It's being deprecated in favor of Android embedding v2. Follow the
    steps at
    
    https://flutter.dev/go/android-project-migration
    
    to migrate your project.
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    
    You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
    If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
        To generate an app bundle, run:
            flutter build appbundle --target-platform android-arm,android-arm64,android-x64
            Learn more on: https://developer.android.com/guide/app-bundle
        To split the APKs per ABI, run:
            flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
            Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
    [!] Your app isn't using AndroidX.
        To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY .
    Running Gradle task 'assembleRelease'...                        
    
    
    Welcome to Gradle 4.10.2!
    
    
    
    Here are the highlights of this release:
    
     - Incremental Java compilation by default
    
     - Periodic Gradle caches cleanup
    
     - Gradle Kotlin DSL 1.0-RC6
    
     - Nested included builds
    
     - SNAPSHOT plugin versions in the `plugins {}` block
    
    
    
    For more details see https://docs.gradle.org/4.10.2/release-notes.html
    
    
    
    
    
    
    FAILURE: Build failed with an exception.
    
    
    
    * What went wrong:
    
    Execution failed for task ':app:processReleaseResources'.
    
    > Android resource linking failed
    
      Output:  /Users/builder/clone/build/app/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:86: error: resource android:attr/fontVariationSettings not found.
    
      /Users/builder/clone/build/app/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:87: error: resource android:attr/ttcIndex not found.
    
      error: failed linking references.
    
    
    
      Command: /Users/builder/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/240b6c832eca7924d551bf6ba542dcbe/aapt2-3.2.1-4818971-osx/aapt2 link -I\
    
              /Users/builder/programs/android-sdk-macosx/platforms/android-27/android.jar\
    
              --manifest\
    
              /Users/builder/clone/build/app/intermediates/merged_manifests/release/processReleaseManifest/merged/AndroidManifest.xml\
    
              -o\
    
              /Users/builder/clone/build/app/intermediates/processed_res/release/processReleaseResources/out/resources-release.ap_\
    
              -R\
    
              @/Users/builder/clone/build/app/intermediates/incremental/processReleaseResources/resources-list-for-resources-release.ap_.txt\
    
              --auto-add-overlay\
    
              --java\
    
              /Users/builder/clone/build/app/generated/not_namespaced_r_class_sources/release/processReleaseResources/r\
    
              --proguard\
    
              /Users/builder/clone/build/app/intermediates/proguard-rules/release/aapt_rules.txt\
    
              --custom-package\
    
              dev.flutter.devrpg\
    
              -0\
    
              apk\
    
              --output-text-symbols\
    
              /Users/builder/clone/build/app/intermediates/symbols/release/R.txt\
    
              --no-version-vectors
    
      Daemon:  AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
    
      Output:  /Users/builder/.gradle/caches/transforms-1/files-1.1/core-1.1.0.aar/6420b02a8ec7479a3d9f57c4e19a6396/res/values/values.xml:174:5-210:25: AAPT: error: resource android:attr/fontVariationSettings not found.
    
    
    
      /Users/builder/.gradle/caches/transforms-1/files-1.1/core-1.1.0.aar/6420b02a8ec7479a3d9f57c4e19a6396/res/values/values.xml:174:5-210:25: AAPT: error: resource android:attr/ttcIndex not found.
    
    
    
      error: failed linking references.
    
      Command: /Users/builder/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/240b6c832eca7924d551bf6ba542dcbe/aapt2-3.2.1-4818971-osx/aapt2 link -I\
    
              /Users/builder/programs/android-sdk-macosx/platforms/android-27/android.jar\
    
              --manifest\
    
              /Users/builder/clone/build/app/intermediates/merged_manifests/release/processReleaseManifest/merged/AndroidManifest.xml\
    
              -o\
    
              /Users/builder/clone/build/app/intermediates/processed_res/release/processReleaseResources/out/resources-release.ap_\
    
              -R\
    
              @/Users/builder/clone/build/app/intermediates/incremental/processReleaseResources/resources-list-for-resources-release.ap_.txt\
    
              --auto-add-overlay\
    
              --java\
    
              /Users/builder/clone/build/app/generated/not_namespaced_r_class_sources/release/processReleaseResources/r\
    
              --proguard\
    
              /Users/builder/clone/build/app/intermediates/proguard-rules/release/aapt_rules.txt\
    
              --custom-package\
    
              dev.flutter.devrpg\
    
              -0\
    
              apk\
    
              --output-text-symbols\
    
              /Users/builder/clone/build/app/intermediates/symbols/release/R.txt\
    
              --no-version-vectors
    
      Daemon:  AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
    
    
    
    * Try:
    
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    
    
    * Get more help at https://help.gradle.org
    
    opened by Ascenio 1
  • Using 'part' is deprecated

    Using 'part' is deprecated

    Hi, this code is supposed to be a sample of good architecture, but as I can understand using the 'part' is discouraged by the Dart team now. Except some cases with code generators.

    Also, there is a lot of functions and variables outside of classes in the library namespace. It's quite confusing for a novice who will learn flutter by your code. Because it's quite an advanced technique, not covered in tutorials for beginners.

    But this app is great overall! It covers a lot of real-life problems, unlike other simple examples. So it will be amazing if this game will be some reference to good architecture and good code.

    So, do you plan to rewrite this app to current best practices?

    opened by 1g0rrr 0
Owner
2D, Inc
2D, Inc
A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter. flutter_bloc, hive, and REST API are some of the tech stacks used in this project.

last_fm A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter. flutter_bloc, hive, and REST API are some of the

Elias Andualem 129 Sep 9, 2022
Flutter application for the online hackathon MORE.tech 3.0 from VTB

vtb_hack_mobile Игра (мобильное приложение) для онлайн-хакатона MORE.tech 3.0 от ВТБ Скриншоты Getting Started For help getting started with Flutter,

Mirea Ninja 7 Feb 9, 2022
Flutter application for the online hackathon MORE.tech 3.0 from VTB

vtb_hack_mobile Игра (мобильное приложение) для онлайн-хакатона MORE.tech 3.0 от ВТБ Скриншоты Getting Started For help getting started with Flutter,

Mirea Ninja 7 Feb 9, 2022
Using weather application and get weather information daily and daily

Aris Weather Getting Started $ git clone https://github.com/ariscybertech/aris_weather.git $ flutter packages get Run the application and enjoy ?? ☺️

Behruz Hurramov 4 Jan 17, 2022
Generate a new file by compressed video, and provide metadata. Get video thumbnail from a video path, supports JPEG/GIF. To reduce app size not using FFmpeg in IOS.

flutter_video_compress Generate a new path by compressed video, Choose to keep the source video or delete it by a parameter. Get video thumbnail from

天海るり 172 Sep 27, 2022
An end-to-end Flutter app built to get details and trending recipes - made as a part of the book 'Flutter Apprentice' by raywenderlich.com

Fooderlich - Flutter Apprentice An end-to-end Flutter app built to get details and trending recipes - made as a part of the book 'Flutter Apprentice'

Suvaditya Mukherjee 1 Dec 4, 2021
Flutter apple music preview - A Music App that leverages the iTunes Rest API to get music data and playable music trailers

Apple Music Preview App Description This project is a Music App that leverages t

Willy Adinata Saragih 2 May 23, 2022
A discord bot, made with Dart, which lets you run your own pure Dart code snippets directly via a discord ping, and get the output in an instant.

A discord bot, made with Dart, which lets you run your own pure Dart code snippets directly via a discord ping, and get the output in an instant.

Anikate De 2 Sep 9, 2022
Flutter WebRTC demo with Python server to perform image processing on video frames using OpenCV

flutter + webrtc => python + aiortc + opencv This demo project should help you to get setup sending a video feed from a flutter app to a python backen

John Crisp 38 Aug 18, 2022
Starter app for Flutter that includes many different production app features; some not typically included in demo apps.

first_app: Starter app for a Flutter production app Maintainer: Greger Wedel, https://github.com/gregertw Listed on: Latest build and artifacts: ** La

Greger Teigre Wedel 363 Sep 22, 2022
simple Demo bloc Pattern in StateManagment in flutter

Weather Fake App A new Flutter application. Getting Started This project is a starting point for a Bloc Pattern in Flutter. This Simple Demo for bloc

Essam Mohamed 1 Oct 12, 2021
A demo flutter mobile app for a Bureau De Change

first_ally_demo A Flutter App DEMO challenge for First Ally. A brief preview Walk through Adding account Converting currency Getting Started Test Card

Nzeako, Kosisochukwu Anthony 5 Jul 27, 2022
Demo library index written in Flutter

demo_books A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if th

Nemanja Stošić 1 Oct 26, 2021
A demo of the socials-sign-in in flutter

socials_sign_in A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Kenneth Murerwa 0 Nov 1, 2021
A flutter demo app to implement google admob ads

test_ads A Flutter demo app to implement google admob ads. Getting Started important - if you are cloning the repo to your desktop, you will need to p

null 4 Apr 4, 2022
Demo app for Flutter Global Summit 21 Vol 2 talk by Oleksandr Leushchenko

Demo app for Flutter Global Summit 21 Vol 2 talk by Oleksandr Leushchenko This demo showcases a fake functional programming library usage. Go to the s

Oleksandr Leushchenko 1 Dec 9, 2021
A sample app to showcase signin-signup UI demo using clippers in flutter

flutter_signin_signup A sample app to showcase signin-signup UI demo using clippers in flutter. Screenshots Login Register Pull Requests I welcome and

Faiz Rhm 7 Jul 5, 2022
A basic demo example for integrating between Appwrite & Flutter 💙

?? Quiz With Flutter A simple Quiz App built with Flutter and Appwrite ?? Getting Started ?? Install Appwrite Follow our simple Installation Guide to

Appwrite 30 Sep 27, 2022
A flutter example demo of how to use the screen capture.

zego_express_example_screen_capture_flutter A flutter example demo of how to implement live broadcast of screen capture using ZEGO Express Audio and V

ZEGO 32 Sep 26, 2022