A Pinball game built with Flutter and Firebase for Google I/O 2022.

Related tags

Gaming pinball
Overview

I/O Pinball

Pinball Header

io_pinball coverage style: very good analysis License: MIT

A Pinball game built with Flutter and Firebase for Google I/O 2022.

Try it now and learn about how it's made.

Built by Very Good Ventures in partnership with Google

Created using Very Good CLI πŸ€–


Getting Started πŸš€

To run the desired project either use the launch configuration in VSCode/Android Studio or use the following commands:

$ flutter run -d chrome

*I/O Pinball works on Web for desktop and mobile.


Running Tests πŸ§ͺ

To run all unit and widget tests use the following command:

$ flutter test --coverage --test-randomize-ordering-seed random

To view the generated coverage report you can use lcov.

# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/
# Open Coverage Report
$ open coverage/index.html

Working with Translations 🌐

This project relies on flutter_localizations and follows the official internationalization guide for Flutter.

Adding Strings

  1. To add a new localizable string, open the app_en.arb file at lib/l10n/arb/app_en.arb.
{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    }
}
  1. Then add a new key/value and description
{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    },
    "helloWorld": "Hello World",
    "@helloWorld": {
        "description": "Hello World Text"
    }
}
  1. Use the new string
import 'package:pinball/l10n/l10n.dart';

@override
Widget build(BuildContext context) {
  final l10n = context.l10n;
  return Text(l10n.helloWorld);
}

Adding Translations

  1. For each supported locale, add a new ARB file in lib/l10n/arb.
β”œβ”€β”€ l10n
β”‚   β”œβ”€β”€ arb
β”‚   β”‚   β”œβ”€β”€ app_en.arb
β”‚   β”‚   └── app_es.arb
  1. Add the translated strings to each .arb file:

app_en.arb

{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    }
}

app_es.arb

{
    "@@locale": "es",
    "counterAppBarTitle": "Contador",
    "@counterAppBarTitle": {
        "description": "Texto mostrado en la AppBar de la pΓ‘gina del contador"
    }
}
Comments
  • dashbook dependency is maybe missing

    dashbook dependency is maybe missing

    flutter pub add dashbook

    because

    is is missing, i think in https://github.com/flutter/pinball/blob/main/packages/pinball_components/sandbox/pubspec.yaml

    and requested by https://github.com/flutter/pinball/blob/main/packages/pinball_components/sandbox/lib/main.dart

    Maybe I am looking at the wrong place, bacause the test should have not passed this not building version. Maybe the dependency file needs the 'excatly right' versions, not just the package name.

    I am sorry, but I am pretty new here, and have no time right now, thats why my ticket is not up to par.

    Fresh VSCode and flutter install on win10, (with VS2022 Pre c++ Toolchain)

    and I crash (on 'nuget restore in pup-world') because out of low memory, when some programs are running (Teamviewer, Chome), but that is unrelated to dashbook and happens with other Applications as well.

    opened by derKosi 6
  • Added Portuguese transalations

    Added Portuguese transalations

    Description

    I have added an .arb translation file for Portuguese translations

    Type of Change

    • [ x] ✨ New feature (non-breaking change which adds functionality)
    • [ ] πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
    • [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] 🧹 Code refactor
    • [ ] βœ… Build configuration change
    • [ ] πŸ“ Documentation
    • [ ] πŸ—‘οΈ Chore
    opened by Santos-Enoque 6
  • Flippers occasionally clip through ball

    Flippers occasionally clip through ball

    Sometimes (often when the ball has a bit of momentum) the flippers will simply clip through the ball instead of hitting it.

    I snagged a recording of it happening once.

    Platform: Chrome OS version 101

    pinball-clip-through-flipper

    opened by Skylled 6
  • fix: changed `GameHud` position and size

    fix: changed `GameHud` position and size

    Description

    Changes:

    • clamped game hud margin
    • calculated game hub width
    • removed margin from score view

    web:

    https://user-images.githubusercontent.com/33895544/166812442-82744c50-e48c-45a6-8fac-2b68bffe893c.mp4

    mobile:

    https://user-images.githubusercontent.com/33895544/166812584-572ba43b-7b9f-44da-832c-717b4d3696dd.mp4

    ultra-wide:

    https://user-images.githubusercontent.com/33895544/166812742-10f2abcb-89bb-42f4-8953-e8dbc95ee934.mp4

    Type of Change

    • [ ] ✨ New feature (non-breaking change which adds functionality)
    • [x] πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
    • [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] 🧹 Code refactor
    • [ ] βœ… Build configuration change
    • [ ] πŸ“ Documentation
    • [ ] πŸ—‘οΈ Chore
    opened by arturplaczek 5
  • Windows desktop app crashes (no Firebase)

    Windows desktop app crashes (no Firebase)

    [log] [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() [log] #0 MethodChannelFirebase.app

    Web is working if I put credentials to web/.../init.js

    Where to put for Windows Desktop?

    opened by msveshnikov 4
  • fix: update Firestore rules

    fix: update Firestore rules

    Description

    Adding in a few more checks

    • Initials have to be 3 in length and only be capital letters
    • Score needs to be within the valid score window
    • Character needs to match the defined set

    Type of Change

    • [ ] ✨ New feature (non-breaking change which adds functionality)
    • [x] πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
    • [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] 🧹 Code refactor
    • [ ] βœ… Build configuration change
    • [ ] πŸ“ Documentation
    • [ ] πŸ—‘οΈ Chore
    opened by tomarra 4
  • feat: background music

    feat: background music

    Description

    Adds background music to the game.

    Type of Change

    • [x] ✨ New feature (non-breaking change which adds functionality)
    • [ ] πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
    • [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] 🧹 Code refactor
    • [ ] βœ… Build configuration change
    • [ ] πŸ“ Documentation
    • [ ] πŸ—‘οΈ Chore
    opened by erickzanardo 4
  • feat: add sparky bumpers

    feat: add sparky bumpers

    Description

    • added SparkyBumper to pinball_components
    • added assets to SparkyBumper
    • added SparkyBumper to sandbox

    https://user-images.githubusercontent.com/4946682/161988921-fc59414e-6064-46a7-a956-21bd8db1793e.mov

    Type of Change

    • [X] ✨ New feature (non-breaking change which adds functionality)
    • [ ] πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
    • [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] 🧹 Code refactor
    • [ ] βœ… Build configuration change
    • [ ] πŸ“ Documentation
    • [ ] πŸ—‘οΈ Chore
    opened by RuiMiguel 4
  • fix: Add restitution to Ball

    fix: Add restitution to Ball

    Description

    This adds some restitution to the ball (this means that it will bounce off things) which makes the physics simulation look a bit more realistic. Currently when it hits the pads for example the ball just stops, which looks a bit unnatural.

    Preferably I would like to have changed the friction of the ball not to be 0 too, but since the rendering currently depends on the direction of the ball and the 0 friction is used to ensure that the ball doesn't rotate that is a much bigger change.

    Type of Change

    • [ ] ✨ New feature (non-breaking change which adds functionality)
    • [x] πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
    • [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
    • [x] 🧹 Code refactor
    • [ ] βœ… Build configuration change
    • [ ] πŸ“ Documentation
    • [ ] πŸ—‘οΈ Chore
    opened by spydon 3
  • fix: Firestore Security Rules Vulnerabilities

    fix: Firestore Security Rules Vulnerabilities

    Description

    There was an issue in the security rules that allowed:

    1. Passing playerInitials with less than 3 characters (which is not intended).
    2. Passing an invalid or no character (which breaks the leaderboards completely).

    The second one is severe because the app will display that there is no connection and the leaderboards cannot be fetched (due to an error in parsing).

    Type of Change

    • [x] πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
    opened by creativecreatorormaybenot 3
  • fix: ball entering on ramp

    fix: ball entering on ramp

    There was a "random" error when a Ball went into the SpaceshipRamp showing the ball below the ramp and rolling through some curve again out.

    bad

    Looking at the image it seems that the Ball hits the blue/red bodies for the railings, after hitting on yellow sensors. That makes Ball roll below the ramp without changing the zindex or layer.

    https://user-images.githubusercontent.com/4946682/167404068-afa47656-7cbb-44da-9544-dd539293d58f.mov

    Solution: good

    modified sensor width to be sure that Ball hits also these sensors, and let ZIndexContactBehavior change zindex at onBefore

    https://user-images.githubusercontent.com/4946682/167404098-13c0685e-6d50-449d-9aa0-4c29ddfac5a2.mov

    Type of Change

    • [ ] ✨ New feature (non-breaking change which adds functionality)
    • [X] πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
    • [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] 🧹 Code refactor
    • [ ] βœ… Build configuration change
    • [ ] πŸ“ Documentation
    • [ ] πŸ—‘οΈ Chore
    opened by RuiMiguel 3
  • Performance issues

    Performance issues

    I have tried many WebGL games in my iPhone/browser and all works great, but this game and in general the app made with Flutter and exported for web has performance issues. This in specific overheat my iPhone XR and after some time playing I start seeing a performance degrading. Probably Flutter need to improve his performance for web targets

    opened by tufik2 0
  • Rocket not accessible

    Rocket not accessible

    Screenshot_20220514-095920 It is not possible to tap the rocket, if installed with as app with chrome on Google Pixel 6. Everything is Google that should work. If it is not installed and running in browser, I am able to tap at the very end of the screen.

    opened by Wilhelmsson177 1
  • Forced to use mouse on desktop?

    Forced to use mouse on desktop?

    Playing on desktop I'm using up/down/left/right on my keyboard to play the game and edit my initials. But once I've done that I have to use the mouse to click Replay. Also I can't select the character using the keyboard, instead the flippers and launcher move.

    Ideally I'd just keep using the keyboard to play until bored.

    opened by artesea 0
  • Blank screen if WASM is disabled or enhanced security is enabled in browser.

    Blank screen if WASM is disabled or enhanced security is enabled in browser.

    I have enhanced security mode enabled on my browser. This prevents wasm from running.

    I noticed that, when wasm was disabled, the page did not show any information and was just blank. I was only able to understand what happened after I opened the js console.

    A warning or a message on the page itself would've helped me.

    A curious question here. How can we make sure users know that we are having troubles with WASM? Should we use vanilla js to check for WebAssembly support? Or do we have APIs in Flutter to help determine support?

    opened by sampathbalivada 0
Owner
Flutter
Flutter is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, desktop, and embedded devices from a single codebase.
Flutter
An application cum Game-based App built using Flutter that compose a mind-tricked word game, Just for fun.

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

dev_allauddin 3 Feb 3, 2022
A simple dice game built using Flutter, that allows users to engage in a dice game

A simple dice game built using Flutter, that allows users to engage in a dice game. Each player rolls the dice and the highest value number that you can make WINS!

Dubem Ezeagwu 1 Sep 1, 2022
A Flutter plugin to support game center and google play games services.

A Flutter plugin to support game center and google play games services. Screenshot iOS Android Tutorials Written tutorial Video tutorial Will be added

Abedalkareem Omreyh 76 Jan 6, 2023
Warrior Runner - Game made with Flutter and Flame game engine

Warrior Runner - Game made with Flutter Demo and Screenshot Flutter Version Used : 1.22.4 flame: 0.29.3 hive: 1.5.0-pre Learing Resources: Create a Mo

Mohammed Hashim 20 Oct 10, 2022
Snake-Game - A flutter based classic snake game with nothing just and just a feel to have play

snake_game This is a simple snake Game under development made with the help of y

Shubham Kumar 2 Mar 22, 2022
A starter game in Flutter with all the bells and whistles of a mobile (iOS & Android) game

A starter game in Flutter with all the bells and whistles of a mobile (iOS & Android) game including the following features: sound music main menu scr

Samuel Abada 14 Dec 22, 2022
Chess-game - Some simple lines of coding and made this awesome looking full functional chess board game

flutter simple chess game It's a flutter chess game application with fast code.

Munem Sarker 5 Jun 17, 2022
M.U.D. Role-playing text-based game. A multiple-choice multiplayer interactive game developed on Flutter (Android, iOS, Windows, Web)

Teia M.U.D. Role-playing text-based game. A multiple-choice multiplayer interactive game developed on Flutter (Android, iOS, Windows, Web). The main f

Pedro Gonçalves 3 Feb 17, 2022
Game characters ui - A redesign of a game characters app using flutter

Game characters ui - A redesign of a game characters app using flutter

null 20 Oct 23, 2022
Flutter Switch Game: Get Fun With Play This Game

switch_game A new Flutter project. Getting Started Try Swap red circle to green

Sermed Berwari 1 Jun 17, 2022
A simple 2D multiplayer online game built using Flutter and Flame engine

Club Penguin Introduction ?? Club Penguin A multiplayer game involving penguins and anonymous chat in a virtual 2D world Before we start, you can take

Sanjeev Madhav 67 Dec 24, 2022
Dungeon Fantasy - A simple RPG game built with Bonfire and Flame engine

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

Nguyen Minh Dung 1 Dec 28, 2021
A Simple TicTacToe Game Built With Flutter

A Simple TicTacToe Game Built With Flutter

Sai Manoj 5 Jun 30, 2022
Tap-Tap-Go Game built with flutter

Tap Tap Go 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

Keerthan Chand 1 Oct 12, 2021
A simple TicTacToe game app built with Flutter

Tic-Tac-Toe A simple TicTacToe game app built with Flutter. Getting Started This project is a starting point for a Flutter application. A few resource

Soumyadip Sarkar 6 Jan 22, 2021
Tic Tac Toe Game built with flutter

Flutter Tic Tac Game ?? ⭐️ this repo if you like it. Getting Started ?? Clone the repo Install the dependicies Run it Preview ?? Contact me ?? Email :

Bouaggad Moez 91 Dec 6, 2022
A Simple EYE Test Game, built using Flutter CustomPainter

fCreate A Simple EYE Test Game, powered by Flutter CustomPainter. Getting Started A simple Android Application built with ❀️ using Flutter. This appli

Anjan Roy 9 May 10, 2021
FiveSins: A Web3 Game Built Using Flutter

FiveSins FiveSins is a Web3 Game ε›’ι˜Ÿ Ziqiang HuangοΌšεˆηΊ¦εΌ€ε‘ Wenhao DengοΌšζΈΈζˆεΌ€ε‘γ€ε‰η«― Rui S

AhaClub 3 Jul 14, 2022
😘 A wordle game clone built in flutter.

Worddle A wordle game clone built in flutter. Uses hooks_riverpod for state management ?? Screen Shots To Do - Add Statistics - Add Dark Mode - Add Cu

Chiziaruhoma Ogbonda 68 Dec 25, 2022