The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
adds flutter multiplayer shooting game example app
dshukertjr7046f7d3e4e4
diff --git a/examples/realtime/flutter-multiplayer-shooting-game/.gitignore b/examples/realtime/flutter-multiplayer-shooting-game/.gitignorenew file mode 100644index 00000000000..6aff2fca046--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/.gitignore@@ -0,0 +1,46 @@+# Miscellaneous+*.class+*.log+*.pyc+*.swp+.DS_Store+.atom/+.buildlog/+.history+.svn/+migrate_working_dir/++# IntelliJ related+*.iml+*.ipr+*.iws+.idea/++# The .vscode folder contains launch configuration and tasks you configure in+# VS Code which you may wish to be included in version control, so this line+# is commented out by default.+#.vscode/++# Flutter/Dart/Pub related+**/doc/api/+**/ios/Flutter/.last_build_id+.dart_tool/+.flutter-plugins+.flutter-plugins-dependencies+.packages+.pub-cache/+.pub/+/build/++# Symbolication related+app.*.symbols++# Obfuscation related+app.*.map.json++# Android Studio will place build artifacts here+/android/app/debug+/android/app/profile+/android/app/release++/pubspec.lock\ No newline at end of filediff --git a/examples/realtime/flutter-multiplayer-shooting-game/README.md b/examples/realtime/flutter-multiplayer-shooting-game/README.mdnew file mode 100644index 00000000000..33e79b99676--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/README.md@@ -0,0 +1,16 @@+# flame_realtime_shooting++A new Flutter project.++## Getting Started++This project is a starting point for a Flutter application.++A few resources to get you started if this is your first Flutter project:++- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)++For help getting started with Flutter development, view the+[online documentation](https://docs.flutter.dev/), which offers tutorials,+samples, guidance on mobile development, and a full API reference.diff --git a/examples/realtime/flutter-multiplayer-shooting-game/analysis_options.yaml b/examples/realtime/flutter-multiplayer-shooting-game/analysis_options.yamlnew file mode 100644index 00000000000..61b6c4de17c--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/analysis_options.yaml@@ -0,0 +1,29 @@+# This file configures the analyzer, which statically analyzes Dart code to+# check for errors, warnings, and lints.+#+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be+# invoked from the command line by running `flutter analyze`.++# The following line activates a set of recommended lints for Flutter apps,+# packages, and plugins designed to encourage good coding practices.+include: package:flutter_lints/flutter.yaml++linter:+ # The lint rules applied to this project can be customized in the+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`+ # included above or to enable additional rules. A list of all available lints+ # and their documentation is published at+ # https://dart-lang.github.io/linter/lints/index.html.+ #+ # Instead of disabling a lint rule for the entire project in the+ # section below, it can also be suppressed for a single line of code+ # or a specific dart file by using the `// ignore: name_of_lint` and+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file+ # producing the lint.+ rules:+ # avoid_print: false # Uncomment to disable the `avoid_print` rule+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule++# Additional information about this file can be found at+# https://dart.dev/guides/language/analysis-optionsdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/.gitignore b/examples/realtime/flutter-multiplayer-shooting-game/android/.gitignorenew file mode 100644index 00000000000..6f568019d3c--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/.gitignore@@ -0,0 +1,13 @@+gradle-wrapper.jar+/.gradle+/captures/+/gradlew+/gradlew.bat+/local.properties+GeneratedPluginRegistrant.java++# Remember to never publicly share your keystore.+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app+key.properties+**/*.keystore+**/*.jksdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/build.gradle b/examples/realtime/flutter-multiplayer-shooting-game/android/app/build.gradlenew file mode 100644index 00000000000..7f49708856a--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/app/build.gradle@@ -0,0 +1,71 @@+def localProperties = new Properties()+def localPropertiesFile = rootProject.file('local.properties')+if (localPropertiesFile.exists()) {+ localPropertiesFile.withReader('UTF-8') { reader ->+ localProperties.load(reader)+ }+}++def flutterRoot = localProperties.getProperty('flutter.sdk')+if (flutterRoot == null) {+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")+}++def flutterVersionCode = localProperties.getProperty('flutter.versionCode')+if (flutterVersionCode == null) {+ flutterVersionCode = '1'+}++def flutterVersionName = localProperties.getProperty('flutter.versionName')+if (flutterVersionName == null) {+ flutterVersionName = '1.0'+}++apply plugin: 'com.android.application'+apply plugin: 'kotlin-android'+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"++android {+ compileSdkVersion flutter.compileSdkVersion+ ndkVersion flutter.ndkVersion++ compileOptions {+ sourceCompatibility JavaVersion.VERSION_1_8+ targetCompatibility JavaVersion.VERSION_1_8+ }++ kotlinOptions {+ jvmTarget = '1.8'+ }++ sourceSets {+ main.java.srcDirs += 'src/main/kotlin'+ }++ defaultConfig {+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).+ applicationId "com.example.flame_realtime_shooting"+ // You can update the following values to match your application needs.+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.+ minSdkVersion flutter.minSdkVersion+ targetSdkVersion flutter.targetSdkVersion+ versionCode flutterVersionCode.toInteger()+ versionName flutterVersionName+ }++ buildTypes {+ release {+ // TODO: Add your own signing config for the release build.+ // Signing with the debug keys for now, so `flutter run --release` works.+ signingConfig signingConfigs.debug+ }+ }+}++flutter {+ source '../..'+}++dependencies {+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/debug/AndroidManifest.xml b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/debug/AndroidManifest.xmlnew file mode 100644index 00000000000..c1a90c7a852--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/debug/AndroidManifest.xml@@ -0,0 +1,8 @@+<manifest xmlns:android="http://schemas.android.com/apk/res/android"+ package="com.example.flame_realtime_shooting">+ <!-- The INTERNET permission is required for development. Specifically,+ the Flutter tool needs it to communicate with the running application+ to allow setting breakpoints, to provide hot reload, etc.+ -->+ <uses-permission android:name="android.permission.INTERNET"/>+</manifest>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/AndroidManifest.xml b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/AndroidManifest.xmlnew file mode 100644index 00000000000..e2f598efe72--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/AndroidManifest.xml@@ -0,0 +1,34 @@+<manifest xmlns:android="http://schemas.android.com/apk/res/android"+ package="com.example.flame_realtime_shooting">+ <application+ android:label="flame_realtime_shooting"+ android:name="${applicationName}"+ android:icon="@mipmap/ic_launcher">+ <activity+ android:name=".MainActivity"+ android:exported="true"+ android:launchMode="singleTop"+ android:theme="@style/LaunchTheme"+ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"+ android:hardwareAccelerated="true"+ android:windowSoftInputMode="adjustResize">+ <!-- Specifies an Android theme to apply to this Activity as soon as+ the Android process has started. This theme is visible to the user+ while the Flutter UI initializes. After that, this theme continues+ to determine the Window background behind the Flutter UI. -->+ <meta-data+ android:name="io.flutter.embedding.android.NormalTheme"+ android:resource="@style/NormalTheme"+ />+ <intent-filter>+ <action android:name="android.intent.action.MAIN"/>+ <category android:name="android.intent.category.LAUNCHER"/>+ </intent-filter>+ </activity>+ <!-- Don't delete the meta-data below.+ This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->+ <meta-data+ android:name="flutterEmbedding"+ android:value="2" />+ </application>+</manifest>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/kotlin/com/example/flame_realtime_shooting/MainActivity.kt b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/kotlin/com/example/flame_realtime_shooting/MainActivity.ktnew file mode 100644index 00000000000..8d573d6f4e7--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/kotlin/com/example/flame_realtime_shooting/MainActivity.kt@@ -0,0 +1,6 @@+package com.example.flame_realtime_shooting++import io.flutter.embedding.android.FlutterActivity++class MainActivity: FlutterActivity() {+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/drawable-v21/launch_background.xmlnew file mode 100644index 00000000000..f74085f3f6a--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/drawable-v21/launch_background.xml@@ -0,0 +1,12 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- Modify this file to customize your launch splash screen -->+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">+ <item android:drawable="?android:colorBackground" />++ <!-- You can insert your own image assets here -->+ <!-- <item>+ <bitmap+ android:gravity="center"+ android:src="@mipmap/launch_image" />+ </item> -->+</layer-list>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/drawable/launch_background.xml b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/drawable/launch_background.xmlnew file mode 100644index 00000000000..304732f8842--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/drawable/launch_background.xml@@ -0,0 +1,12 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- Modify this file to customize your launch splash screen -->+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">+ <item android:drawable="@android:color/white" />++ <!-- You can insert your own image assets here -->+ <!-- <item>+ <bitmap+ android:gravity="center"+ android:src="@mipmap/launch_image" />+ </item> -->+</layer-list>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-hdpi/ic_launcher.pngnew file mode 100644index 00000000000..db77bb4b7b0Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-mdpi/ic_launcher.pngnew file mode 100644index 00000000000..17987b79bb8Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-xhdpi/ic_launcher.pngnew file mode 100644index 00000000000..09d4391482bBinary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.pngnew file mode 100644index 00000000000..d5f1c8d34e7Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.pngnew file mode 100644index 00000000000..4d6372eebdbBinary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/values-night/styles.xml b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/values-night/styles.xmlnew file mode 100644index 00000000000..06952be745f--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/values-night/styles.xml@@ -0,0 +1,18 @@+<?xml version="1.0" encoding="utf-8"?>+<resources>+ <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->+ <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">+ <!-- Show a splash screen on the activity. Automatically removed when+ the Flutter engine draws its first frame -->+ <item name="android:windowBackground">@drawable/launch_background</item>+ </style>+ <!-- Theme applied to the Android Window as soon as the process has started.+ This theme determines the color of the Android Window while your+ Flutter UI initializes, as well as behind your Flutter UI while its+ running.++ This Theme is only used starting with V2 of Flutter's Android embedding. -->+ <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">+ <item name="android:windowBackground">?android:colorBackground</item>+ </style>+</resources>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/values/styles.xml b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/values/styles.xmlnew file mode 100644index 00000000000..cb1ef88056e--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/main/res/values/styles.xml@@ -0,0 +1,18 @@+<?xml version="1.0" encoding="utf-8"?>+<resources>+ <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->+ <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">+ <!-- Show a splash screen on the activity. Automatically removed when+ the Flutter engine draws its first frame -->+ <item name="android:windowBackground">@drawable/launch_background</item>+ </style>+ <!-- Theme applied to the Android Window as soon as the process has started.+ This theme determines the color of the Android Window while your+ Flutter UI initializes, as well as behind your Flutter UI while its+ running.++ This Theme is only used starting with V2 of Flutter's Android embedding. -->+ <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">+ <item name="android:windowBackground">?android:colorBackground</item>+ </style>+</resources>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/profile/AndroidManifest.xml b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/profile/AndroidManifest.xmlnew file mode 100644index 00000000000..c1a90c7a852--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/app/src/profile/AndroidManifest.xml@@ -0,0 +1,8 @@+<manifest xmlns:android="http://schemas.android.com/apk/res/android"+ package="com.example.flame_realtime_shooting">+ <!-- The INTERNET permission is required for development. Specifically,+ the Flutter tool needs it to communicate with the running application+ to allow setting breakpoints, to provide hot reload, etc.+ -->+ <uses-permission android:name="android.permission.INTERNET"/>+</manifest>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/build.gradle b/examples/realtime/flutter-multiplayer-shooting-game/android/build.gradlenew file mode 100644index 00000000000..58a8c74b147--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/build.gradle@@ -0,0 +1,31 @@+buildscript {+ ext.kotlin_version = '1.7.10'+ repositories {+ google()+ mavenCentral()+ }++ dependencies {+ classpath 'com.android.tools.build:gradle:7.2.0'+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"+ }+}++allprojects {+ repositories {+ google()+ mavenCentral()+ }+}++rootProject.buildDir = '../build'+subprojects {+ project.buildDir = "${rootProject.buildDir}/${project.name}"+}+subprojects {+ project.evaluationDependsOn(':app')+}++task clean(type: Delete) {+ delete rootProject.buildDir+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/gradle.properties b/examples/realtime/flutter-multiplayer-shooting-game/android/gradle.propertiesnew file mode 100644index 00000000000..94adc3a3f97--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/gradle.properties@@ -0,0 +1,3 @@+org.gradle.jvmargs=-Xmx1536M+android.useAndroidX=true+android.enableJetifier=truediff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/gradle/wrapper/gradle-wrapper.properties b/examples/realtime/flutter-multiplayer-shooting-game/android/gradle/wrapper/gradle-wrapper.propertiesnew file mode 100644index 00000000000..3c472b99c6f--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/gradle/wrapper/gradle-wrapper.properties@@ -0,0 +1,5 @@+distributionBase=GRADLE_USER_HOME+distributionPath=wrapper/dists+zipStoreBase=GRADLE_USER_HOME+zipStorePath=wrapper/dists+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zipdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/android/settings.gradle b/examples/realtime/flutter-multiplayer-shooting-game/android/settings.gradlenew file mode 100644index 00000000000..44e62bcf06a--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/android/settings.gradle@@ -0,0 +1,11 @@+include ':app'++def localPropertiesFile = new File(rootProject.projectDir, "local.properties")+def properties = new Properties()++assert localPropertiesFile.exists()+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }++def flutterSdkPath = properties.getProperty("flutter.sdk")+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"diff --git a/examples/realtime/flutter-multiplayer-shooting-game/assets/images/background.jpg b/examples/realtime/flutter-multiplayer-shooting-game/assets/images/background.jpgnew file mode 100644index 00000000000..c101bbf4a6dBinary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/assets/images/background.jpg differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/assets/images/opponent-bullet.png b/examples/realtime/flutter-multiplayer-shooting-game/assets/images/opponent-bullet.pngnew file mode 100644index 00000000000..b48a3a845d2Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/assets/images/opponent-bullet.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/assets/images/opponent.png b/examples/realtime/flutter-multiplayer-shooting-game/assets/images/opponent.pngnew file mode 100644index 00000000000..483d370942cBinary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/assets/images/opponent.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/assets/images/player-bullet.png b/examples/realtime/flutter-multiplayer-shooting-game/assets/images/player-bullet.pngnew file mode 100644index 00000000000..b688f8b04acBinary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/assets/images/player-bullet.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/assets/images/player.png b/examples/realtime/flutter-multiplayer-shooting-game/assets/images/player.pngnew file mode 100644index 00000000000..15548733bd8Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/assets/images/player.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/.gitignore b/examples/realtime/flutter-multiplayer-shooting-game/ios/.gitignorenew file mode 100644index 00000000000..7a7f9873ad7--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/.gitignore@@ -0,0 +1,34 @@+**/dgph+*.mode1v3+*.mode2v3+*.moved-aside+*.pbxuser+*.perspectivev3+**/*sync/+.sconsign.dblite+.tags*+**/.vagrant/+**/DerivedData/+Icon?+**/Pods/+**/.symlinks/+profile+xcuserdata+**/.generated/+Flutter/App.framework+Flutter/Flutter.framework+Flutter/Flutter.podspec+Flutter/Generated.xcconfig+Flutter/ephemeral/+Flutter/app.flx+Flutter/app.zip+Flutter/flutter_assets/+Flutter/flutter_export_environment.sh+ServiceDefinitions.json+Runner/GeneratedPluginRegistrant.*++# Exceptions to above rules.+!default.mode1v3+!default.mode2v3+!default.pbxuser+!default.perspectivev3diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Flutter/AppFrameworkInfo.plist b/examples/realtime/flutter-multiplayer-shooting-game/ios/Flutter/AppFrameworkInfo.plistnew file mode 100644index 00000000000..9625e105df3--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Flutter/AppFrameworkInfo.plist@@ -0,0 +1,26 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>CFBundleDevelopmentRegion</key>+ <string>en</string>+ <key>CFBundleExecutable</key>+ <string>App</string>+ <key>CFBundleIdentifier</key>+ <string>io.flutter.flutter.app</string>+ <key>CFBundleInfoDictionaryVersion</key>+ <string>6.0</string>+ <key>CFBundleName</key>+ <string>App</string>+ <key>CFBundlePackageType</key>+ <string>FMWK</string>+ <key>CFBundleShortVersionString</key>+ <string>1.0</string>+ <key>CFBundleSignature</key>+ <string>????</string>+ <key>CFBundleVersion</key>+ <string>1.0</string>+ <key>MinimumOSVersion</key>+ <string>11.0</string>+</dict>+</plist>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Flutter/Debug.xcconfig b/examples/realtime/flutter-multiplayer-shooting-game/ios/Flutter/Debug.xcconfignew file mode 100644index 00000000000..ec97fc6f302--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Flutter/Debug.xcconfig@@ -0,0 +1,2 @@+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"+#include "Generated.xcconfig"diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Flutter/Release.xcconfig b/examples/realtime/flutter-multiplayer-shooting-game/ios/Flutter/Release.xcconfignew file mode 100644index 00000000000..c4855bfe200--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Flutter/Release.xcconfig@@ -0,0 +1,2 @@+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"+#include "Generated.xcconfig"diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Podfile b/examples/realtime/flutter-multiplayer-shooting-game/ios/Podfilenew file mode 100644index 00000000000..88359b225fa--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Podfile@@ -0,0 +1,41 @@+# Uncomment this line to define a global platform for your project+# platform :ios, '11.0'++# CocoaPods analytics sends network stats synchronously affecting flutter build latency.+ENV['COCOAPODS_DISABLE_STATS'] = 'true'++project 'Runner', {+ 'Debug' => :debug,+ 'Profile' => :release,+ 'Release' => :release,+}++def flutter_root+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)+ unless File.exist?(generated_xcode_build_settings_path)+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"+ end++ File.foreach(generated_xcode_build_settings_path) do |line|+ matches = line.match(/FLUTTER_ROOT\=(.*)/)+ return matches[1].strip if matches+ end+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"+end++require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)++flutter_ios_podfile_setup++target 'Runner' do+ use_frameworks!+ use_modular_headers!++ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))+end++post_install do |installer|+ installer.pods_project.targets.each do |target|+ flutter_additional_ios_build_settings(target)+ end+enddiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Podfile.lock b/examples/realtime/flutter-multiplayer-shooting-game/ios/Podfile.locknew file mode 100644index 00000000000..f439848ae60--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Podfile.lock@@ -0,0 +1,35 @@+PODS:+ - app_links (0.0.1):+ - Flutter+ - Flutter (1.0.0)+ - path_provider_foundation (0.0.1):+ - Flutter+ - FlutterMacOS+ - url_launcher_ios (0.0.1):+ - Flutter++DEPENDENCIES:+ - app_links (from `.symlinks/plugins/app_links/ios`)+ - Flutter (from `Flutter`)+ - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)+ - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)++EXTERNAL SOURCES:+ app_links:+ :path: ".symlinks/plugins/app_links/ios"+ Flutter:+ :path: Flutter+ path_provider_foundation:+ :path: ".symlinks/plugins/path_provider_foundation/ios"+ url_launcher_ios:+ :path: ".symlinks/plugins/url_launcher_ios/ios"++SPEC CHECKSUMS:+ app_links: ab4ba54d10a13d45825336bc9707b5eadee81191+ Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854+ path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852+ url_launcher_ios: ae1517e5e344f5544fb090b079e11f399dfbe4d2++PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3++COCOAPODS: 1.11.3diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.pbxproj b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.pbxprojnew file mode 100644index 00000000000..1246743553c--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.pbxproj@@ -0,0 +1,551 @@+// !$*UTF8*$!+{+ archiveVersion = 1;+ classes = {+ };+ objectVersion = 54;+ objects = {++/* Begin PBXBuildFile section */+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };+ BE23484369E0A627E72B448C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B449CD597D82C8759DF3E2B7 /* Pods_Runner.framework */; };+/* End PBXBuildFile section */++/* Begin PBXCopyFilesBuildPhase section */+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {+ isa = PBXCopyFilesBuildPhase;+ buildActionMask = 2147483647;+ dstPath = "";+ dstSubfolderSpec = 10;+ files = (+ );+ name = "Embed Frameworks";+ runOnlyForDeploymentPostprocessing = 0;+ };+/* End PBXCopyFilesBuildPhase section */++/* Begin PBXFileReference section */+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };+ 704E3DD2DB644C18A6649B8B /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };+ A5EAF25F523BC10830465093 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };+ B449CD597D82C8759DF3E2B7 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };+ C4C86A4EFA7674C82FEAA392 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };+/* End PBXFileReference section */++/* Begin PBXFrameworksBuildPhase section */+ 97C146EB1CF9000F007C117D /* Frameworks */ = {+ isa = PBXFrameworksBuildPhase;+ buildActionMask = 2147483647;+ files = (+ BE23484369E0A627E72B448C /* Pods_Runner.framework in Frameworks */,+ );+ runOnlyForDeploymentPostprocessing = 0;+ };+/* End PBXFrameworksBuildPhase section */++/* Begin PBXGroup section */+ 27852139F92CD9F990CE4A71 /* Frameworks */ = {+ isa = PBXGroup;+ children = (+ B449CD597D82C8759DF3E2B7 /* Pods_Runner.framework */,+ );+ name = Frameworks;+ sourceTree = "<group>";+ };+ 35EBDD9546014B9099FCEC6A /* Pods */ = {+ isa = PBXGroup;+ children = (+ C4C86A4EFA7674C82FEAA392 /* Pods-Runner.debug.xcconfig */,+ A5EAF25F523BC10830465093 /* Pods-Runner.release.xcconfig */,+ 704E3DD2DB644C18A6649B8B /* Pods-Runner.profile.xcconfig */,+ );+ name = Pods;+ path = Pods;+ sourceTree = "<group>";+ };+ 9740EEB11CF90186004384FC /* Flutter */ = {+ isa = PBXGroup;+ children = (+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,+ );+ name = Flutter;+ sourceTree = "<group>";+ };+ 97C146E51CF9000F007C117D = {+ isa = PBXGroup;+ children = (+ 9740EEB11CF90186004384FC /* Flutter */,+ 97C146F01CF9000F007C117D /* Runner */,+ 97C146EF1CF9000F007C117D /* Products */,+ 35EBDD9546014B9099FCEC6A /* Pods */,+ 27852139F92CD9F990CE4A71 /* Frameworks */,+ );+ sourceTree = "<group>";+ };+ 97C146EF1CF9000F007C117D /* Products */ = {+ isa = PBXGroup;+ children = (+ 97C146EE1CF9000F007C117D /* Runner.app */,+ );+ name = Products;+ sourceTree = "<group>";+ };+ 97C146F01CF9000F007C117D /* Runner */ = {+ isa = PBXGroup;+ children = (+ 97C146FA1CF9000F007C117D /* Main.storyboard */,+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,+ 97C147021CF9000F007C117D /* Info.plist */,+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,+ );+ path = Runner;+ sourceTree = "<group>";+ };+/* End PBXGroup section */++/* Begin PBXNativeTarget section */+ 97C146ED1CF9000F007C117D /* Runner */ = {+ isa = PBXNativeTarget;+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;+ buildPhases = (+ 547CCC55113E27B88A271312 /* [CP] Check Pods Manifest.lock */,+ 9740EEB61CF901F6004384FC /* Run Script */,+ 97C146EA1CF9000F007C117D /* Sources */,+ 97C146EB1CF9000F007C117D /* Frameworks */,+ 97C146EC1CF9000F007C117D /* Resources */,+ 9705A1C41CF9048500538489 /* Embed Frameworks */,+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,+ 80DF38846FB2DB612DDD07ED /* [CP] Embed Pods Frameworks */,+ );+ buildRules = (+ );+ dependencies = (+ );+ name = Runner;+ productName = Runner;+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;+ productType = "com.apple.product-type.application";+ };+/* End PBXNativeTarget section */++/* Begin PBXProject section */+ 97C146E61CF9000F007C117D /* Project object */ = {+ isa = PBXProject;+ attributes = {+ LastUpgradeCheck = 1300;+ ORGANIZATIONNAME = "";+ TargetAttributes = {+ 97C146ED1CF9000F007C117D = {+ CreatedOnToolsVersion = 7.3.1;+ LastSwiftMigration = 1100;+ };+ };+ };+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;+ compatibilityVersion = "Xcode 9.3";+ developmentRegion = en;+ hasScannedForEncodings = 0;+ knownRegions = (+ en,+ Base,+ );+ mainGroup = 97C146E51CF9000F007C117D;+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;+ projectDirPath = "";+ projectRoot = "";+ targets = (+ 97C146ED1CF9000F007C117D /* Runner */,+ );+ };+/* End PBXProject section */++/* Begin PBXResourcesBuildPhase section */+ 97C146EC1CF9000F007C117D /* Resources */ = {+ isa = PBXResourcesBuildPhase;+ buildActionMask = 2147483647;+ files = (+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,+ );+ runOnlyForDeploymentPostprocessing = 0;+ };+/* End PBXResourcesBuildPhase section */++/* Begin PBXShellScriptBuildPhase section */+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {+ isa = PBXShellScriptBuildPhase;+ alwaysOutOfDate = 1;+ buildActionMask = 2147483647;+ files = (+ );+ inputPaths = (+ );+ name = "Thin Binary";+ outputPaths = (+ );+ runOnlyForDeploymentPostprocessing = 0;+ shellPath = /bin/sh;+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";+ };+ 547CCC55113E27B88A271312 /* [CP] Check Pods Manifest.lock */ = {+ isa = PBXShellScriptBuildPhase;+ buildActionMask = 2147483647;+ files = (+ );+ inputFileListPaths = (+ );+ inputPaths = (+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",+ "${PODS_ROOT}/Manifest.lock",+ );+ name = "[CP] Check Pods Manifest.lock";+ outputFileListPaths = (+ );+ outputPaths = (+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",+ );+ runOnlyForDeploymentPostprocessing = 0;+ shellPath = /bin/sh;+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";+ showEnvVarsInLog = 0;+ };+ 80DF38846FB2DB612DDD07ED /* [CP] Embed Pods Frameworks */ = {+ isa = PBXShellScriptBuildPhase;+ buildActionMask = 2147483647;+ files = (+ );+ inputFileListPaths = (+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",+ );+ name = "[CP] Embed Pods Frameworks";+ outputFileListPaths = (+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",+ );+ runOnlyForDeploymentPostprocessing = 0;+ shellPath = /bin/sh;+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";+ showEnvVarsInLog = 0;+ };+ 9740EEB61CF901F6004384FC /* Run Script */ = {+ isa = PBXShellScriptBuildPhase;+ alwaysOutOfDate = 1;+ buildActionMask = 2147483647;+ files = (+ );+ inputPaths = (+ );+ name = "Run Script";+ outputPaths = (+ );+ runOnlyForDeploymentPostprocessing = 0;+ shellPath = /bin/sh;+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";+ };+/* End PBXShellScriptBuildPhase section */++/* Begin PBXSourcesBuildPhase section */+ 97C146EA1CF9000F007C117D /* Sources */ = {+ isa = PBXSourcesBuildPhase;+ buildActionMask = 2147483647;+ files = (+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,+ );+ runOnlyForDeploymentPostprocessing = 0;+ };+/* End PBXSourcesBuildPhase section */++/* Begin PBXVariantGroup section */+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {+ isa = PBXVariantGroup;+ children = (+ 97C146FB1CF9000F007C117D /* Base */,+ );+ name = Main.storyboard;+ sourceTree = "<group>";+ };+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {+ isa = PBXVariantGroup;+ children = (+ 97C147001CF9000F007C117D /* Base */,+ );+ name = LaunchScreen.storyboard;+ sourceTree = "<group>";+ };+/* End PBXVariantGroup section */++/* Begin XCBuildConfiguration section */+ 249021D3217E4FDB00AE95B9 /* Profile */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ ALWAYS_SEARCH_USER_PATHS = NO;+ CLANG_ANALYZER_NONNULL = YES;+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";+ CLANG_CXX_LIBRARY = "libc++";+ CLANG_ENABLE_MODULES = YES;+ CLANG_ENABLE_OBJC_ARC = YES;+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;+ CLANG_WARN_BOOL_CONVERSION = YES;+ CLANG_WARN_COMMA = YES;+ CLANG_WARN_CONSTANT_CONVERSION = YES;+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;+ CLANG_WARN_EMPTY_BODY = YES;+ CLANG_WARN_ENUM_CONVERSION = YES;+ CLANG_WARN_INFINITE_RECURSION = YES;+ CLANG_WARN_INT_CONVERSION = YES;+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;+ CLANG_WARN_STRICT_PROTOTYPES = YES;+ CLANG_WARN_SUSPICIOUS_MOVE = YES;+ CLANG_WARN_UNREACHABLE_CODE = YES;+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";+ COPY_PHASE_STRIP = NO;+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";+ ENABLE_NS_ASSERTIONS = NO;+ ENABLE_STRICT_OBJC_MSGSEND = YES;+ GCC_C_LANGUAGE_STANDARD = gnu99;+ GCC_NO_COMMON_BLOCKS = YES;+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;+ GCC_WARN_UNDECLARED_SELECTOR = YES;+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;+ GCC_WARN_UNUSED_FUNCTION = YES;+ GCC_WARN_UNUSED_VARIABLE = YES;+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;+ MTL_ENABLE_DEBUG_INFO = NO;+ SDKROOT = iphoneos;+ SUPPORTED_PLATFORMS = iphoneos;+ TARGETED_DEVICE_FAMILY = "1,2";+ VALIDATE_PRODUCT = YES;+ };+ name = Profile;+ };+ 249021D4217E4FDB00AE95B9 /* Profile */ = {+ isa = XCBuildConfiguration;+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;+ buildSettings = {+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;+ CLANG_ENABLE_MODULES = YES;+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";+ ENABLE_BITCODE = NO;+ INFOPLIST_FILE = Runner/Info.plist;+ LD_RUNPATH_SEARCH_PATHS = (+ "$(inherited)",+ "@executable_path/Frameworks",+ );+ PRODUCT_BUNDLE_IDENTIFIER = com.example.flameRealtimeShooting;+ PRODUCT_NAME = "$(TARGET_NAME)";+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";+ SWIFT_VERSION = 5.0;+ VERSIONING_SYSTEM = "apple-generic";+ };+ name = Profile;+ };+ 97C147031CF9000F007C117D /* Debug */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ ALWAYS_SEARCH_USER_PATHS = NO;+ CLANG_ANALYZER_NONNULL = YES;+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";+ CLANG_CXX_LIBRARY = "libc++";+ CLANG_ENABLE_MODULES = YES;+ CLANG_ENABLE_OBJC_ARC = YES;+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;+ CLANG_WARN_BOOL_CONVERSION = YES;+ CLANG_WARN_COMMA = YES;+ CLANG_WARN_CONSTANT_CONVERSION = YES;+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;+ CLANG_WARN_EMPTY_BODY = YES;+ CLANG_WARN_ENUM_CONVERSION = YES;+ CLANG_WARN_INFINITE_RECURSION = YES;+ CLANG_WARN_INT_CONVERSION = YES;+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;+ CLANG_WARN_STRICT_PROTOTYPES = YES;+ CLANG_WARN_SUSPICIOUS_MOVE = YES;+ CLANG_WARN_UNREACHABLE_CODE = YES;+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";+ COPY_PHASE_STRIP = NO;+ DEBUG_INFORMATION_FORMAT = dwarf;+ ENABLE_STRICT_OBJC_MSGSEND = YES;+ ENABLE_TESTABILITY = YES;+ GCC_C_LANGUAGE_STANDARD = gnu99;+ GCC_DYNAMIC_NO_PIC = NO;+ GCC_NO_COMMON_BLOCKS = YES;+ GCC_OPTIMIZATION_LEVEL = 0;+ GCC_PREPROCESSOR_DEFINITIONS = (+ "DEBUG=1",+ "$(inherited)",+ );+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;+ GCC_WARN_UNDECLARED_SELECTOR = YES;+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;+ GCC_WARN_UNUSED_FUNCTION = YES;+ GCC_WARN_UNUSED_VARIABLE = YES;+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;+ MTL_ENABLE_DEBUG_INFO = YES;+ ONLY_ACTIVE_ARCH = YES;+ SDKROOT = iphoneos;+ TARGETED_DEVICE_FAMILY = "1,2";+ };+ name = Debug;+ };+ 97C147041CF9000F007C117D /* Release */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ ALWAYS_SEARCH_USER_PATHS = NO;+ CLANG_ANALYZER_NONNULL = YES;+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";+ CLANG_CXX_LIBRARY = "libc++";+ CLANG_ENABLE_MODULES = YES;+ CLANG_ENABLE_OBJC_ARC = YES;+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;+ CLANG_WARN_BOOL_CONVERSION = YES;+ CLANG_WARN_COMMA = YES;+ CLANG_WARN_CONSTANT_CONVERSION = YES;+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;+ CLANG_WARN_EMPTY_BODY = YES;+ CLANG_WARN_ENUM_CONVERSION = YES;+ CLANG_WARN_INFINITE_RECURSION = YES;+ CLANG_WARN_INT_CONVERSION = YES;+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;+ CLANG_WARN_STRICT_PROTOTYPES = YES;+ CLANG_WARN_SUSPICIOUS_MOVE = YES;+ CLANG_WARN_UNREACHABLE_CODE = YES;+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";+ COPY_PHASE_STRIP = NO;+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";+ ENABLE_NS_ASSERTIONS = NO;+ ENABLE_STRICT_OBJC_MSGSEND = YES;+ GCC_C_LANGUAGE_STANDARD = gnu99;+ GCC_NO_COMMON_BLOCKS = YES;+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;+ GCC_WARN_UNDECLARED_SELECTOR = YES;+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;+ GCC_WARN_UNUSED_FUNCTION = YES;+ GCC_WARN_UNUSED_VARIABLE = YES;+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;+ MTL_ENABLE_DEBUG_INFO = NO;+ SDKROOT = iphoneos;+ SUPPORTED_PLATFORMS = iphoneos;+ SWIFT_COMPILATION_MODE = wholemodule;+ SWIFT_OPTIMIZATION_LEVEL = "-O";+ TARGETED_DEVICE_FAMILY = "1,2";+ VALIDATE_PRODUCT = YES;+ };+ name = Release;+ };+ 97C147061CF9000F007C117D /* Debug */ = {+ isa = XCBuildConfiguration;+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;+ buildSettings = {+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;+ CLANG_ENABLE_MODULES = YES;+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";+ ENABLE_BITCODE = NO;+ INFOPLIST_FILE = Runner/Info.plist;+ LD_RUNPATH_SEARCH_PATHS = (+ "$(inherited)",+ "@executable_path/Frameworks",+ );+ PRODUCT_BUNDLE_IDENTIFIER = com.example.flameRealtimeShooting;+ PRODUCT_NAME = "$(TARGET_NAME)";+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";+ SWIFT_VERSION = 5.0;+ VERSIONING_SYSTEM = "apple-generic";+ };+ name = Debug;+ };+ 97C147071CF9000F007C117D /* Release */ = {+ isa = XCBuildConfiguration;+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;+ buildSettings = {+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;+ CLANG_ENABLE_MODULES = YES;+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";+ ENABLE_BITCODE = NO;+ INFOPLIST_FILE = Runner/Info.plist;+ LD_RUNPATH_SEARCH_PATHS = (+ "$(inherited)",+ "@executable_path/Frameworks",+ );+ PRODUCT_BUNDLE_IDENTIFIER = com.example.flameRealtimeShooting;+ PRODUCT_NAME = "$(TARGET_NAME)";+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";+ SWIFT_VERSION = 5.0;+ VERSIONING_SYSTEM = "apple-generic";+ };+ name = Release;+ };+/* End XCBuildConfiguration section */++/* Begin XCConfigurationList section */+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {+ isa = XCConfigurationList;+ buildConfigurations = (+ 97C147031CF9000F007C117D /* Debug */,+ 97C147041CF9000F007C117D /* Release */,+ 249021D3217E4FDB00AE95B9 /* Profile */,+ );+ defaultConfigurationIsVisible = 0;+ defaultConfigurationName = Release;+ };+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {+ isa = XCConfigurationList;+ buildConfigurations = (+ 97C147061CF9000F007C117D /* Debug */,+ 97C147071CF9000F007C117D /* Release */,+ 249021D4217E4FDB00AE95B9 /* Profile */,+ );+ defaultConfigurationIsVisible = 0;+ defaultConfigurationName = Release;+ };+/* End XCConfigurationList section */+ };+ rootObject = 97C146E61CF9000F007C117D /* Project object */;+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedatanew file mode 100644index 00000000000..919434a6254--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata@@ -0,0 +1,7 @@+<?xml version="1.0" encoding="UTF-8"?>+<Workspace+ version = "1.0">+ <FileRef+ location = "self:">+ </FileRef>+</Workspace>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistnew file mode 100644index 00000000000..18d981003d6--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist@@ -0,0 +1,8 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>IDEDidComputeMac32BitWarning</key>+ <true/>+</dict>+</plist>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingsnew file mode 100644index 00000000000..f9b0d7c5ea1--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings@@ -0,0 +1,8 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>PreviewsEnabled</key>+ <false/>+</dict>+</plist>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemenew file mode 100644index 00000000000..c87d15a3352--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme@@ -0,0 +1,87 @@+<?xml version="1.0" encoding="UTF-8"?>+<Scheme+ LastUpgradeVersion = "1300"+ version = "1.3">+ <BuildAction+ parallelizeBuildables = "YES"+ buildImplicitDependencies = "YES">+ <BuildActionEntries>+ <BuildActionEntry+ buildForTesting = "YES"+ buildForRunning = "YES"+ buildForProfiling = "YES"+ buildForArchiving = "YES"+ buildForAnalyzing = "YES">+ <BuildableReference+ BuildableIdentifier = "primary"+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"+ BuildableName = "Runner.app"+ BlueprintName = "Runner"+ ReferencedContainer = "container:Runner.xcodeproj">+ </BuildableReference>+ </BuildActionEntry>+ </BuildActionEntries>+ </BuildAction>+ <TestAction+ buildConfiguration = "Debug"+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"+ shouldUseLaunchSchemeArgsEnv = "YES">+ <MacroExpansion>+ <BuildableReference+ BuildableIdentifier = "primary"+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"+ BuildableName = "Runner.app"+ BlueprintName = "Runner"+ ReferencedContainer = "container:Runner.xcodeproj">+ </BuildableReference>+ </MacroExpansion>+ <Testables>+ </Testables>+ </TestAction>+ <LaunchAction+ buildConfiguration = "Debug"+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"+ launchStyle = "0"+ useCustomWorkingDirectory = "NO"+ ignoresPersistentStateOnLaunch = "NO"+ debugDocumentVersioning = "YES"+ debugServiceExtension = "internal"+ allowLocationSimulation = "YES">+ <BuildableProductRunnable+ runnableDebuggingMode = "0">+ <BuildableReference+ BuildableIdentifier = "primary"+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"+ BuildableName = "Runner.app"+ BlueprintName = "Runner"+ ReferencedContainer = "container:Runner.xcodeproj">+ </BuildableReference>+ </BuildableProductRunnable>+ </LaunchAction>+ <ProfileAction+ buildConfiguration = "Profile"+ shouldUseLaunchSchemeArgsEnv = "YES"+ savedToolIdentifier = ""+ useCustomWorkingDirectory = "NO"+ debugDocumentVersioning = "YES">+ <BuildableProductRunnable+ runnableDebuggingMode = "0">+ <BuildableReference+ BuildableIdentifier = "primary"+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"+ BuildableName = "Runner.app"+ BlueprintName = "Runner"+ ReferencedContainer = "container:Runner.xcodeproj">+ </BuildableReference>+ </BuildableProductRunnable>+ </ProfileAction>+ <AnalyzeAction+ buildConfiguration = "Debug">+ </AnalyzeAction>+ <ArchiveAction+ buildConfiguration = "Release"+ revealArchiveInOrganizer = "YES">+ </ArchiveAction>+</Scheme>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcworkspace/contents.xcworkspacedatanew file mode 100644index 00000000000..21a3cc14c74--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcworkspace/contents.xcworkspacedata@@ -0,0 +1,10 @@+<?xml version="1.0" encoding="UTF-8"?>+<Workspace+ version = "1.0">+ <FileRef+ location = "group:Runner.xcodeproj">+ </FileRef>+ <FileRef+ location = "group:Pods/Pods.xcodeproj">+ </FileRef>+</Workspace>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistnew file mode 100644index 00000000000..18d981003d6--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist@@ -0,0 +1,8 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>IDEDidComputeMac32BitWarning</key>+ <true/>+</dict>+</plist>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingsnew file mode 100644index 00000000000..f9b0d7c5ea1--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings@@ -0,0 +1,8 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>PreviewsEnabled</key>+ <false/>+</dict>+</plist>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/AppDelegate.swift b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/AppDelegate.swiftnew file mode 100644index 00000000000..70693e4a8c1--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/AppDelegate.swift@@ -0,0 +1,13 @@+import UIKit+import Flutter++@UIApplicationMain+@objc class AppDelegate: FlutterAppDelegate {+ override func application(+ _ application: UIApplication,+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?+ ) -> Bool {+ GeneratedPluginRegistrant.register(with: self)+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)+ }+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.jsonnew file mode 100644index 00000000000..d36b1fab2d9--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json@@ -0,0 +1,122 @@+{+ "images" : [+ {+ "size" : "20x20",+ "idiom" : "iphone",+ "filename" : "[email protected]",+ "scale" : "2x"+ },+ {+ "size" : "20x20",+ "idiom" : "iphone",+ "filename" : "[email protected]",+ "scale" : "3x"+ },+ {+ "size" : "29x29",+ "idiom" : "iphone",+ "filename" : "[email protected]",+ "scale" : "1x"+ },+ {+ "size" : "29x29",+ "idiom" : "iphone",+ "filename" : "[email protected]",+ "scale" : "2x"+ },+ {+ "size" : "29x29",+ "idiom" : "iphone",+ "filename" : "[email protected]",+ "scale" : "3x"+ },+ {+ "size" : "40x40",+ "idiom" : "iphone",+ "filename" : "[email protected]",+ "scale" : "2x"+ },+ {+ "size" : "40x40",+ "idiom" : "iphone",+ "filename" : "[email protected]",+ "scale" : "3x"+ },+ {+ "size" : "60x60",+ "idiom" : "iphone",+ "filename" : "[email protected]",+ "scale" : "2x"+ },+ {+ "size" : "60x60",+ "idiom" : "iphone",+ "filename" : "[email protected]",+ "scale" : "3x"+ },+ {+ "size" : "20x20",+ "idiom" : "ipad",+ "filename" : "[email protected]",+ "scale" : "1x"+ },+ {+ "size" : "20x20",+ "idiom" : "ipad",+ "filename" : "[email protected]",+ "scale" : "2x"+ },+ {+ "size" : "29x29",+ "idiom" : "ipad",+ "filename" : "[email protected]",+ "scale" : "1x"+ },+ {+ "size" : "29x29",+ "idiom" : "ipad",+ "filename" : "[email protected]",+ "scale" : "2x"+ },+ {+ "size" : "40x40",+ "idiom" : "ipad",+ "filename" : "[email protected]",+ "scale" : "1x"+ },+ {+ "size" : "40x40",+ "idiom" : "ipad",+ "filename" : "[email protected]",+ "scale" : "2x"+ },+ {+ "size" : "76x76",+ "idiom" : "ipad",+ "filename" : "[email protected]",+ "scale" : "1x"+ },+ {+ "size" : "76x76",+ "idiom" : "ipad",+ "filename" : "[email protected]",+ "scale" : "2x"+ },+ {+ "size" : "83.5x83.5",+ "idiom" : "ipad",+ "filename" : "[email protected]",+ "scale" : "2x"+ },+ {+ "size" : "1024x1024",+ "idiom" : "ios-marketing",+ "filename" : "[email protected]",+ "scale" : "1x"+ }+ ],+ "info" : {+ "version" : 1,+ "author" : "xcode"+ }+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..dc9ada4725eBinary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..7353c41ecf9Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..797d452e458Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..6ed2d933e11Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..4cd7b0099caBinary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..fe730945a01Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..321773cd857Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..797d452e458Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..502f463a9bcBinary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..0ec30343922Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..0ec30343922Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..e9f5fea27c7Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..84ac32ae7d9Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..8953cba0906Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]new file mode 100644index 00000000000..0467bf12aa4Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.jsonnew file mode 100644index 00000000000..0bedcf2fd46--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json@@ -0,0 +1,23 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "filename" : "LaunchImage.png",+ "scale" : "1x"+ },+ {+ "idiom" : "universal",+ "filename" : "[email protected]",+ "scale" : "2x"+ },+ {+ "idiom" : "universal",+ "filename" : "[email protected]",+ "scale" : "3x"+ }+ ],+ "info" : {+ "version" : 1,+ "author" : "xcode"+ }+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.pngnew file mode 100644index 00000000000..9da19eacad3Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]new file mode 100644index 00000000000..9da19eacad3Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]new file mode 100644index 00000000000..9da19eacad3Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.mdnew file mode 100644index 00000000000..89c2725b70f--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md@@ -0,0 +1,5 @@+# Launch Screen Assets++You can customize the launch screen with your own desired assets by replacing the image files in this directory.++You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.\ No newline at end of filediff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Base.lproj/LaunchScreen.storyboardnew file mode 100644index 00000000000..f2e259c7c93--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Base.lproj/LaunchScreen.storyboard@@ -0,0 +1,37 @@+<?xml version="1.0" encoding="UTF-8" standalone="no"?>+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">+ <dependencies>+ <deployment identifier="iOS"/>+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>+ </dependencies>+ <scenes>+ <!--View Controller-->+ <scene sceneID="EHf-IW-A2E">+ <objects>+ <viewController id="01J-lp-oVM" sceneMemberID="viewController">+ <layoutGuides>+ <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>+ <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>+ </layoutGuides>+ <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>+ <subviews>+ <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">+ </imageView>+ </subviews>+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>+ <constraints>+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>+ </constraints>+ </view>+ </viewController>+ <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>+ </objects>+ <point key="canvasLocation" x="53" y="375"/>+ </scene>+ </scenes>+ <resources>+ <image name="LaunchImage" width="168" height="185"/>+ </resources>+</document>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Base.lproj/Main.storyboard b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Base.lproj/Main.storyboardnew file mode 100644index 00000000000..f3c28516fb3--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Base.lproj/Main.storyboard@@ -0,0 +1,26 @@+<?xml version="1.0" encoding="UTF-8" standalone="no"?>+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">+ <dependencies>+ <deployment identifier="iOS"/>+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>+ </dependencies>+ <scenes>+ <!--Flutter View Controller-->+ <scene sceneID="tne-QT-ifu">+ <objects>+ <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">+ <layoutGuides>+ <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>+ <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>+ </layoutGuides>+ <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">+ <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>+ </view>+ </viewController>+ <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>+ </objects>+ </scene>+ </scenes>+</document>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Info.plist b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Info.plistnew file mode 100644index 00000000000..463bc7fd16a--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Info.plist@@ -0,0 +1,51 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>CFBundleDevelopmentRegion</key>+ <string>$(DEVELOPMENT_LANGUAGE)</string>+ <key>CFBundleDisplayName</key>+ <string>Flame Realtime Shooting</string>+ <key>CFBundleExecutable</key>+ <string>$(EXECUTABLE_NAME)</string>+ <key>CFBundleIdentifier</key>+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>+ <key>CFBundleInfoDictionaryVersion</key>+ <string>6.0</string>+ <key>CFBundleName</key>+ <string>flame_realtime_shooting</string>+ <key>CFBundlePackageType</key>+ <string>APPL</string>+ <key>CFBundleShortVersionString</key>+ <string>$(FLUTTER_BUILD_NAME)</string>+ <key>CFBundleSignature</key>+ <string>????</string>+ <key>CFBundleVersion</key>+ <string>$(FLUTTER_BUILD_NUMBER)</string>+ <key>LSRequiresIPhoneOS</key>+ <true/>+ <key>UILaunchStoryboardName</key>+ <string>LaunchScreen</string>+ <key>UIMainStoryboardFile</key>+ <string>Main</string>+ <key>UISupportedInterfaceOrientations</key>+ <array>+ <string>UIInterfaceOrientationPortrait</string>+ <string>UIInterfaceOrientationLandscapeLeft</string>+ <string>UIInterfaceOrientationLandscapeRight</string>+ </array>+ <key>UISupportedInterfaceOrientations~ipad</key>+ <array>+ <string>UIInterfaceOrientationPortrait</string>+ <string>UIInterfaceOrientationPortraitUpsideDown</string>+ <string>UIInterfaceOrientationLandscapeLeft</string>+ <string>UIInterfaceOrientationLandscapeRight</string>+ </array>+ <key>UIViewControllerBasedStatusBarAppearance</key>+ <false/>+ <key>CADisableMinimumFrameDurationOnPhone</key>+ <true/>+ <key>UIApplicationSupportsIndirectInputEvents</key>+ <true/>+</dict>+</plist>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Runner-Bridging-Header.h b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Runner-Bridging-Header.hnew file mode 100644index 00000000000..308a2a560b4--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/ios/Runner/Runner-Bridging-Header.h@@ -0,0 +1 @@+#import "GeneratedPluginRegistrant.h"diff --git a/examples/realtime/flutter-multiplayer-shooting-game/lib/game/bullet.dart b/examples/realtime/flutter-multiplayer-shooting-game/lib/game/bullet.dartnew file mode 100644index 00000000000..a668c0f3c60--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/lib/game/bullet.dart@@ -0,0 +1,55 @@+import 'dart:async';++import 'package:flame/collisions.dart';+import 'package:flame/components.dart';+import 'package:flame/image_composition.dart' as flame_image;++class Bullet extends PositionComponent with CollisionCallbacks, HasGameRef {+ final Vector2 velocity;++ final flame_image.Image image;++ static const radius = 5.0;++ bool hasBeenHit = false;++ final bool isMine;++ /// Damage that it deals when it hits the player+ final int damage = 5;++ Bullet({+ required this.isMine,+ required this.velocity,+ required this.image,+ required Vector2 initialPosition,+ }) : super(position: initialPosition);++ @override+ Future<void>? onLoad() async {+ anchor = Anchor.center;++ width = radius * 2;+ height = radius * 2;++ add(CircleHitbox()+ ..collisionType = CollisionType.passive+ ..anchor = Anchor.center);++ final sprite =+ SpriteComponent.fromImage(image, size: Vector2.all(radius * 2));++ add(sprite);+ await super.onLoad();+ }++ @override+ void update(double dt) {+ super.update(dt);+ position += velocity * dt;++ if (position.y < 0 || position.y > gameRef.size.y) {+ removeFromParent();+ }+ }+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/lib/game/game.dart b/examples/realtime/flutter-multiplayer-shooting-game/lib/game/game.dartnew file mode 100644index 00000000000..93e8fc3b41b--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/lib/game/game.dart@@ -0,0 +1,160 @@+import 'dart:async';++import 'package:flame/game.dart';+import 'package:flame/components.dart';+import 'package:flame/events.dart';+import 'package:flame/image_composition.dart' as flame_image;+import 'package:flame_realtime_shooting/game/bullet.dart';+import 'package:flame_realtime_shooting/game/player.dart';+import 'package:flutter/material.dart';++class MyGame extends FlameGame with PanDetector, HasCollisionDetection {+ MyGame({+ required this.onGameOver,+ required this.onGameStateUpdate,+ });++ static const _initialHealthPoints = 100;++ /// Callback to notify the parent when the game ends.+ final void Function(bool didWin) onGameOver;++ /// Callback for when the game state updates.+ final void Function(+ Vector2 position,+ int health,+ ) onGameStateUpdate;++ /// `Player` instance of the player+ late Player _player;++ /// `Player` instance of the opponent+ late Player _opponent;++ bool isGameOver = true;++ int _playerHealthPoint = _initialHealthPoints;++ late final flame_image.Image _playerBulletImage;+ late final flame_image.Image _opponentBulletImage;++ @override+ Color backgroundColor() {+ return Colors.transparent;+ }++ @override+ Future<void>? onLoad() async {+ final playerImage = await images.load('player.png');+ _player = Player(isMe: true);+ final spriteSize = Vector2.all(Player.radius * 2);+ _player.add(SpriteComponent(sprite: Sprite(playerImage), size: spriteSize));+ add(_player);++ final opponentImage = await images.load('opponent.png');+ _opponent = Player(isMe: false);+ _opponent.add(SpriteComponent.fromImage(opponentImage, size: spriteSize));+ add(_opponent);++ _playerBulletImage = await images.load('player-bullet.png');+ _opponentBulletImage = await images.load('opponent-bullet.png');++ await super.onLoad();+ }++ @override+ void onPanUpdate(DragUpdateInfo info) {+ _player.move(info.delta.global);+ final mirroredPosition = _player.getMirroredPercentPosition();+ onGameStateUpdate(mirroredPosition, _playerHealthPoint);+ super.onPanUpdate(info);+ }++ @override+ void update(double dt) {+ super.update(dt);+ if (isGameOver) {+ return;+ }+ for (final child in children) {+ if (child is Bullet && child.hasBeenHit && !child.isMine) {+ _playerHealthPoint = _playerHealthPoint - child.damage;+ final mirroredPosition = _player.getMirroredPercentPosition();+ onGameStateUpdate(mirroredPosition, _playerHealthPoint);+ _player.updateHealth(_playerHealthPoint / _initialHealthPoints);+ }+ }+ if (_playerHealthPoint <= 0) {+ endGame(false);+ }+ }++ void startNewGame() {+ isGameOver = false;+ _playerHealthPoint = _initialHealthPoints;++ for (final child in children) {+ if (child is Player) {+ child.position = child.initialPosition;+ } else if (child is Bullet) {+ child.removeFromParent();+ }+ }++ _shootBullets();+ }++ /// shoots out bullets form both the player and the opponent.+ ///+ /// Calls itself every 500 milliseconds+ Future<void> _shootBullets() async {+ await Future.delayed(const Duration(milliseconds: 500));++ /// Player's bullet+ final playerBulletInitialPosition = Vector2.copy(_player.position)+ ..y -= Player.radius;+ final playerBulletVelocities = [+ Vector2(0, -100),+ Vector2(60, -80),+ Vector2(-60, -80),+ ];+ for (final bulletVelocity in playerBulletVelocities) {+ add((Bullet(+ isMine: true,+ velocity: bulletVelocity,+ image: _playerBulletImage,+ initialPosition: playerBulletInitialPosition,+ )));+ }++ /// Opponent's bullet+ final opponentBulletInitialPosition = Vector2.copy(_opponent.position)+ ..y += Player.radius;+ final opponentBulletVelocities = [+ Vector2(0, 100),+ Vector2(60, 80),+ Vector2(-60, 80),+ ];+ for (final bulletVelocity in opponentBulletVelocities) {+ add((Bullet(+ isMine: false,+ velocity: bulletVelocity,+ image: _opponentBulletImage,+ initialPosition: opponentBulletInitialPosition,+ )));+ }++ _shootBullets();+ }++ void updateOpponent({required Vector2 position, required int health}) {+ _opponent.position = Vector2(size.x * position.x, size.y * position.y);+ _opponent.updateHealth(health / _initialHealthPoints);+ }++ /// Called when either the player or the opponent has run out of health points+ void endGame(bool playerWon) {+ isGameOver = true;+ onGameOver(playerWon);+ }+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/lib/game/player.dart b/examples/realtime/flutter-multiplayer-shooting-game/lib/game/player.dartnew file mode 100644index 00000000000..0785b00f0fc--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/lib/game/player.dart@@ -0,0 +1,103 @@+import 'dart:async';++import 'package:flame/collisions.dart';+import 'package:flame/components.dart';+import 'package:flame_realtime_shooting/game/bullet.dart';+import 'package:flutter/material.dart';++class Player extends PositionComponent with HasGameRef, CollisionCallbacks {+ Vector2 velocity = Vector2.zero();++ late final Vector2 initialPosition;++ Player({required bool isMe}) : _isMyPlayer = isMe;++ /// Whether it's me or the opponent+ final bool _isMyPlayer;++ static const radius = 30.0;++ @override+ Future<void>? onLoad() async {+ anchor = Anchor.center;+ width = radius * 2;+ height = radius * 2;++ final initialX = gameRef.size.x / 2;+ initialPosition = _isMyPlayer+ ? Vector2(initialX, gameRef.size.y * 0.8)+ : Vector2(initialX, gameRef.size.y * 0.2);+ position = initialPosition;++ add(CircleHitbox());+ add(_Gauge());+ await super.onLoad();+ }++ void move(Vector2 delta) {+ position += delta;+ }++ void updateHealth(double healthLeft) {+ for (final child in children) {+ if (child is _Gauge) {+ child._healthLeft = healthLeft;+ }+ }+ }++ @override+ void onCollision(Set<Vector2> intersectionPoints, PositionComponent other) {+ super.onCollision(intersectionPoints, other);+ if (other is Bullet && _isMyPlayer != other.isMine) {+ other.hasBeenHit = true;+ other.removeFromParent();+ }+ }++ /// returns the mirrored percent position of the player+ /// to be broadcasted to other clients+ Vector2 getMirroredPercentPosition() {+ final mirroredPosition = gameRef.size - position;+ return Vector2(mirroredPosition.x / gameRef.size.x,+ mirroredPosition.y / gameRef.size.y);+ }+}++class _Gauge extends PositionComponent {+ double _healthLeft = 1.0;++ @override+ FutureOr<void> onLoad() {+ final playerParent = parent;+ if (playerParent is Player) {+ width = playerParent.width;+ height = 10;+ anchor = Anchor.centerLeft;+ position = Vector2(0, 0);+ }+ return super.onLoad();+ }++ @override+ void render(Canvas canvas) {+ super.render(canvas);+ canvas.drawRect(+ Rect.fromPoints(+ const Offset(0, 0),+ Offset(width, height),+ ),+ Paint()..color = Colors.white);+ canvas.drawRect(+ Rect.fromPoints(+ const Offset(0, 0),+ Offset(width * _healthLeft, height),+ ),+ Paint()+ ..color = _healthLeft > 0.5+ ? Colors.green+ : _healthLeft > 0.25+ ? Colors.orange+ : Colors.red);+ }+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/lib/main.dart b/examples/realtime/flutter-multiplayer-shooting-game/lib/main.dartnew file mode 100644index 00000000000..11eadb2c4a3--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/lib/main.dart@@ -0,0 +1,252 @@+import 'package:flame/game.dart';+import 'package:flame_realtime_shooting/game/game.dart';+import 'package:flutter/material.dart';+import 'package:supabase_flutter/supabase_flutter.dart';+import 'package:uuid/uuid.dart';++void main() async {+ await Supabase.initialize(+ url: 'supabaseUrl',+ anonKey: 'supabaseAnonKey',+ realtimeClientOptions: const RealtimeClientOptions(eventsPerSecond: 40),+ );+ runApp(const MyApp());+}++final supabase = Supabase.instance.client;++class MyApp extends StatelessWidget {+ const MyApp({super.key});++ @override+ Widget build(BuildContext context) {+ return const MaterialApp(+ title: 'UFO Shooting Game',+ debugShowCheckedModeBanner: false,+ home: GamePage(),+ );+ }+}++class GamePage extends StatefulWidget {+ const GamePage({Key? key}) : super(key: key);++ @override+ State<GamePage> createState() => _GamePageState();+}++class _GamePageState extends State<GamePage> {+ late final MyGame _game;++ /// Holds the RealtimeChannel to sync game states+ RealtimeChannel? _gameChannel;++ @override+ Widget build(BuildContext context) {+ return Scaffold(+ body: Stack(+ fit: StackFit.expand,+ children: [+ Image.asset('assets/images/background.jpg', fit: BoxFit.cover),+ GameWidget(game: _game),+ ],+ ),+ );+ }++ @override+ void initState() {+ super.initState();+ _initialize();+ }++ Future<void> _initialize() async {+ _game = MyGame(+ onGameStateUpdate: (position, health) async {+ ChannelResponse response;+ do {+ response = await _gameChannel!.send(+ type: RealtimeListenTypes.broadcast,+ event: 'game_state',+ payload: {'x': position.x, 'y': position.y, 'health': health},+ );++ // wait for a frame to avoid infinite rate limiting loops+ await Future.delayed(Duration.zero);+ setState(() {});+ } while (response == ChannelResponse.rateLimited && health <= 0);+ },+ onGameOver: (playerWon) async {+ await showDialog(+ barrierDismissible: false,+ context: context,+ builder: ((context) {+ return AlertDialog(+ title: Text(playerWon ? 'You Won!' : 'You lost...'),+ actions: [+ TextButton(+ onPressed: () async {+ Navigator.of(context).pop();+ await supabase.removeChannel(_gameChannel!);+ _openLobbyDialog();+ },+ child: const Text('Back to Lobby'),+ ),+ ],+ );+ }),+ );+ },+ );++ // await for a frame so that the widget mounts+ await Future.delayed(Duration.zero);++ if (mounted) {+ _openLobbyDialog();+ }+ }++ void _openLobbyDialog() {+ showDialog(+ context: context,+ barrierDismissible: false,+ builder: (context) {+ return _LobbyDialog(+ onGameStarted: (gameId) async {+ // await a frame to allow subscribing to a new channel in a realtime callback+ await Future.delayed(Duration.zero);++ setState(() {});++ _game.startNewGame();++ _gameChannel = supabase.channel(gameId,+ opts: const RealtimeChannelConfig(ack: true));++ _gameChannel!.on(RealtimeListenTypes.broadcast,+ ChannelFilter(event: 'game_state'), (payload, [_]) {+ final position =+ Vector2(payload['x'] as double, payload['y'] as double);+ final opponentHealth = payload['health'] as int;+ _game.updateOpponent(+ position: position,+ health: opponentHealth,+ );++ if (opponentHealth <= 0) {+ if (!_game.isGameOver) {+ _game.isGameOver = true;+ _game.onGameOver(true);+ }+ }+ }).subscribe();+ },+ );+ });+ }+}++class _LobbyDialog extends StatefulWidget {+ const _LobbyDialog({+ required this.onGameStarted,+ });++ final void Function(String gameId) onGameStarted;++ @override+ State<_LobbyDialog> createState() => _LobbyDialogState();+}++class _LobbyDialogState extends State<_LobbyDialog> {+ List<String> _userids = [];+ bool _loading = false;++ /// Unique identifier for each players to identify eachother in lobby+ final myUserId = const Uuid().v4();++ late final RealtimeChannel _lobbyChannel;++ @override+ void initState() {+ super.initState();++ _lobbyChannel = supabase.channel(+ 'lobby',+ opts: const RealtimeChannelConfig(self: true),+ );+ _lobbyChannel.on(RealtimeListenTypes.presence, ChannelFilter(event: 'sync'),+ (payload, [ref]) {+ // Update the lobby count+ final presenceState = _lobbyChannel.presenceState();++ setState(() {+ _userids = presenceState.values+ .map((presences) =>+ (presences.first as Presence).payload['user_id'] as String)+ .toList();+ });+ }).on(RealtimeListenTypes.broadcast, ChannelFilter(event: 'game_start'),+ (payload, [_]) {+ // Start the game if someone has started a game with you+ final participantIds = List<String>.from(payload['participants']);+ if (participantIds.contains(myUserId)) {+ final gameId = payload['game_id'] as String;+ widget.onGameStarted(gameId);+ Navigator.of(context).pop();+ }+ }).subscribe(+ (status, [ref]) async {+ if (status == 'SUBSCRIBED') {+ await _lobbyChannel.track({'user_id': myUserId});+ }+ },+ );+ }++ @override+ void dispose() {+ supabase.removeChannel(_lobbyChannel);+ super.dispose();+ }++ @override+ Widget build(BuildContext context) {+ return AlertDialog(+ title: const Text('Lobby'),+ content: _loading+ ? const SizedBox(+ height: 100,+ child: Center(child: CircularProgressIndicator()),+ )+ : Text('${_userids.length} users waiting'),+ actions: [+ TextButton(+ onPressed: _userids.length < 2+ ? null+ : () async {+ setState(() {+ _loading = true;+ });++ final opponentId =+ _userids.firstWhere((userId) => userId != myUserId);+ final gameId = const Uuid().v4();+ await _lobbyChannel.send(+ type: RealtimeListenTypes.broadcast,+ event: 'game_start',+ payload: {+ 'participants': [+ opponentId,+ myUserId,+ ],+ 'game_id': gameId,+ },+ );+ },+ child: const Text('start'),+ ),+ ],+ );+ }+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/pubspec.yaml b/examples/realtime/flutter-multiplayer-shooting-game/pubspec.yamlnew file mode 100644index 00000000000..7cf20eebac6--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/pubspec.yaml@@ -0,0 +1,28 @@+name: flame_realtime_shooting+description: Multiplayer shooting game using Flutter, Flame and Supabase.++publish_to: 'none'++version: 1.0.0+1++environment:+ sdk: '>=2.19.0 <3.0.0'++dependencies:+ flutter:+ sdk: flutter++ supabase_flutter: ^1.4.0+ flame: ^1.6.0+ uuid: ^3.0.7++dev_dependencies:+ flutter_test:+ sdk: flutter++ flutter_lints: ^2.0.0++flutter:+ uses-material-design: true+ assets:+ - assets/images/diff --git a/examples/realtime/flutter-multiplayer-shooting-game/test/widget_test.dart b/examples/realtime/flutter-multiplayer-shooting-game/test/widget_test.dartnew file mode 100644index 00000000000..0baf2d94663--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/test/widget_test.dart@@ -0,0 +1,30 @@+// This is a basic Flutter widget test.+//+// To perform an interaction with a widget in your test, use the WidgetTester+// utility in the flutter_test package. For example, you can send tap and scroll+// gestures. You can also use WidgetTester to find child widgets in the widget+// tree, read text, and verify that the values of widget properties are correct.++import 'package:flutter/material.dart';+import 'package:flutter_test/flutter_test.dart';++import 'package:flame_realtime_shooting/main.dart';++void main() {+ testWidgets('Counter increments smoke test', (WidgetTester tester) async {+ // Build our app and trigger a frame.+ await tester.pumpWidget(const MyApp());++ // Verify that our counter starts at 0.+ expect(find.text('0'), findsOneWidget);+ expect(find.text('1'), findsNothing);++ // Tap the '+' icon and trigger a frame.+ await tester.tap(find.byIcon(Icons.add));+ await tester.pump();++ // Verify that our counter has incremented.+ expect(find.text('0'), findsNothing);+ expect(find.text('1'), findsOneWidget);+ });+}diff --git a/examples/realtime/flutter-multiplayer-shooting-game/web/favicon.png b/examples/realtime/flutter-multiplayer-shooting-game/web/favicon.pngnew file mode 100644index 00000000000..8aaa46ac1aeBinary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/web/favicon.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-192.png b/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-192.pngnew file mode 100644index 00000000000..b749bfef074Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-192.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-512.png b/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-512.pngnew file mode 100644index 00000000000..88cfd48dff1Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-512.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-maskable-192.png b/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-maskable-192.pngnew file mode 100644index 00000000000..eb9b4d76e52Binary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-maskable-192.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-maskable-512.png b/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-maskable-512.pngnew file mode 100644index 00000000000..d69c56691fbBinary files /dev/null and b/examples/realtime/flutter-multiplayer-shooting-game/web/icons/Icon-maskable-512.png differdiff --git a/examples/realtime/flutter-multiplayer-shooting-game/web/index.html b/examples/realtime/flutter-multiplayer-shooting-game/web/index.htmlnew file mode 100644index 00000000000..4ea399de5b0--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/web/index.html@@ -0,0 +1,59 @@+<!DOCTYPE html>+<html>+<head>+ <!--+ If you are serving your web app in a path other than the root, change the+ href value below to reflect the base path you are serving from.++ The path provided below has to start and end with a slash "/" in order for+ it to work correctly.++ For more details:+ * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base++ This is a placeholder for base href that will be replaced by the value of+ the `--base-href` argument provided to `flutter build`.+ -->+ <base href="$FLUTTER_BASE_HREF">++ <meta charset="UTF-8">+ <meta content="IE=Edge" http-equiv="X-UA-Compatible">+ <meta name="description" content="A new Flutter project.">++ <!-- iOS meta tags & icons -->+ <meta name="apple-mobile-web-app-capable" content="yes">+ <meta name="apple-mobile-web-app-status-bar-style" content="black">+ <meta name="apple-mobile-web-app-title" content="flame_realtime_shooting">+ <link rel="apple-touch-icon" href="icons/Icon-192.png">++ <!-- Favicon -->+ <link rel="icon" type="image/png" href="favicon.png"/>++ <title>flame_realtime_shooting</title>+ <link rel="manifest" href="manifest.json">++ <script>+ // The value below is injected by flutter build, do not touch.+ var serviceWorkerVersion = null;+ </script>+ <!-- This script adds the flutter initialization JS code -->+ <script src="flutter.js" defer></script>+</head>+<body>+ <script>+ window.addEventListener('load', function(ev) {+ // Download main.dart.js+ _flutter.loader.loadEntrypoint({+ serviceWorker: {+ serviceWorkerVersion: serviceWorkerVersion,+ },+ onEntrypointLoaded: function(engineInitializer) {+ engineInitializer.initializeEngine().then(function(appRunner) {+ appRunner.runApp();+ });+ }+ });+ });+ </script>+</body>+</html>diff --git a/examples/realtime/flutter-multiplayer-shooting-game/web/manifest.json b/examples/realtime/flutter-multiplayer-shooting-game/web/manifest.jsonnew file mode 100644index 00000000000..e32da9ac52d--- /dev/null+++ b/examples/realtime/flutter-multiplayer-shooting-game/web/manifest.json@@ -0,0 +1,35 @@+{+ "name": "flame_realtime_shooting",+ "short_name": "flame_realtime_shooting",+ "start_url": ".",+ "display": "standalone",+ "background_color": "#0175C2",+ "theme_color": "#0175C2",+ "description": "A new Flutter project.",+ "orientation": "portrait-primary",+ "prefer_related_applications": false,+ "icons": [+ {+ "src": "icons/Icon-192.png",+ "sizes": "192x192",+ "type": "image/png"+ },+ {+ "src": "icons/Icon-512.png",+ "sizes": "512x512",+ "type": "image/png"+ },+ {+ "src": "icons/Icon-maskable-192.png",+ "sizes": "192x192",+ "type": "image/png",+ "purpose": "maskable"+ },+ {+ "src": "icons/Icon-maskable-512.png",+ "sizes": "512x512",+ "type": "image/png",+ "purpose": "maskable"+ }+ ]+}