From bc3c2e7a6716ac4357653b4f1c6b82730f1994e0 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Wed, 20 Sep 2023 18:38:28 +0200 Subject: [PATCH 01/13] Show achievement QR-code for top players --- assets/images/qr-top.png | Bin 0 -> 35769 bytes lib/end_game/view/end_game_page.dart | 45 +++++++++++++++++++++++++-- lib/firebase/scores.dart | 26 ++++++++++++++++ lib/game/components/count_down.dart | 2 +- 4 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 assets/images/qr-top.png diff --git a/assets/images/qr-top.png b/assets/images/qr-top.png new file mode 100644 index 0000000000000000000000000000000000000000..3a1115c8b6367e3819b4adcc1cd35c5410ac026e GIT binary patch literal 35769 zcmeFa2{_ej+diyJrJ~TFgv?|fGLr^FNTgCJnG>1k43#D&LrIdU5S54qNvJ5ID3u{X zLXlaSS^x81YPa`(_ILch=lkC0J&yM{-k#lRS$^yO-M@RduJbyt^SYmqEt|C$FfC`I zp`lrztFytFhK4Sf{GBr!pV-*%Pr^U1ZA^7-b#+B)=HLfhIg5^F7TyKZ;q9N^&z?m~ zLyON(;4drQlWWM|<+JFi|AylIil6VJ@Lu@mHRMjxvu4vQz`t?$D}(p!`1c0>+Mk@c zS0Ub$KXa)6)4@B^@~?ljbq%)g$Vf;_Nyy6K`%*Hp%2G3hrd-;Fldt948 zr|LjZZ`GSLn}ZB={H?;W;wOEAeQe)KEA_FR$w=B?@}-1r$)1SO$Zt2Qoa2VL=BaMI zYy863GSaj>_x6XU8T&d*-j-MxCNPBtx{Pz<0kez&caK~a(J`CwE*Q^&`Tw+f~XU3=5a;?3)p z{@KW!f;H%4Z({0UYM`%d<$O@W!rIx=M#ATy3z;w)RSh2(3o8d34<1V!J9{TJ-oE@I zULJdEHQpWa22utt>uvVi>-f3ZZ1vl0V&&&xrDV;kq0Xf0ql^X)+IU#-_#AX}a#!|I zz&12 zQsdq4;o+hzDe3L)E#WOI;p}E7DXpZWBq=2$DI+6}E5zM>ojfdj#GTyvNE0({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b8)6YV-o$;JTN|mk~G?3cG z4;{I|EB0 z;utHH3Nt`bxwyGx^7VsGs@BEfJdWsUmrqu;RBdfJSdKO^RE1#~fc+}2#Q|5jkr7I1S~zR8%Z+%2VbKEv_TT0+F=9x8&i>S> z|2}p2uTi)EGKALsm;YZs@vjj`G5z@8-sOM$6WybA|EobujU{cNaguovIw=dBd3Y)7 M>9eP$O>y1w56<&YR{#J2 literal 0 HcmV?d00001 diff --git a/lib/end_game/view/end_game_page.dart b/lib/end_game/view/end_game_page.dart index e186652..f450ae3 100644 --- a/lib/end_game/view/end_game_page.dart +++ b/lib/end_game/view/end_game_page.dart @@ -3,6 +3,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:gamepads/gamepads.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:lightrunners/firebase/score.dart'; import 'package:lightrunners/firebase/score_calculator.dart'; import 'package:lightrunners/firebase/scores.dart'; import 'package:lightrunners/game/game.dart'; @@ -36,14 +37,17 @@ class _EndGamePageState extends State { late GamepadNavigator _gamepadNavigator; bool updatingFirebase = true; + bool receivedTopPlayers = false; bool minDurationElapsed = false; + Iterable topPlayers = []; - bool get canMoveOn => !updatingFirebase && minDurationElapsed; + bool get canMoveOn => + !updatingFirebase && minDurationElapsed && receivedTopPlayers; @override void initState() { super.initState(); - _updateFirebase(); + _updateFirebase().whenComplete(_fetchTopPlayers); _gamepadNavigator = GamepadNavigator( onAny: () { if (canMoveOn) { @@ -78,6 +82,16 @@ class _EndGamePageState extends State { setState(() => updatingFirebase = false); } + Future _fetchTopPlayers() async { + final topPlayers = await Scores.fetchTopPlayers( + playerIds: widget.points.keys.map((p) => p.playerId).whereType(), + ); + setState(() { + this.topPlayers = topPlayers; + receivedTopPlayers = true; + }); + } + @override Widget build(BuildContext context) { final fontFamily = GoogleFonts.bungee().fontFamily; @@ -158,6 +172,33 @@ class _EndGamePageState extends State { ), ], ), + if (topPlayers.isNotEmpty) ...[ + Text( + 'Congratulations, the following players have received\n' + 'an achievement and can scan the QR code with the F3 app!', + style: TextStyle( + fontFamily: fontFamily, + fontSize: 32, + color: GamePalette.yellow, + ), + ), + Text( + topPlayers.map((p) => p.username).join(' | '), + style: TextStyle( + fontFamily: fontFamily, + fontSize: 32, + color: GamePalette.lightBlue, + ), + ), + Align( + child: Image.asset( + 'assets/images/qr-top.png', + width: 600, + height: 600, + fit: BoxFit.cover, + ), + ), + ], OpacityBlinker( child: TextButton( onPressed: () => diff --git a/lib/firebase/scores.dart b/lib/firebase/scores.dart index 0f77c16..d2a411d 100644 --- a/lib/firebase/scores.dart +++ b/lib/firebase/scores.dart @@ -78,6 +78,32 @@ class Scores { } } + static Future> fetchTopPlayers({ + required Iterable playerIds, + }) async { + final firestore = _firestore; + if (firestore == null) { + print('Error: Firestore not initialized.'); + return []; + } else if (playerIds.isEmpty) { + print('No registered players playing this round.'); + return []; + } + + final topPlayers = (await firestore + .collection('scores') + .where( + 'playerId', + whereIn: playerIds.map((i) => i.toString()).toList(), + ) + .where('score', isGreaterThanOrEqualTo: 1) + .get()) + .map(Score.fromDocument) + .toList(); + print(topPlayers); + return topPlayers; + } + static String _getServiceAccountUuid() { return File('.secrets/uuid.conf').readAsStringSync(); } diff --git a/lib/game/components/count_down.dart b/lib/game/components/count_down.dart index 0582a65..9c946d5 100644 --- a/lib/game/components/count_down.dart +++ b/lib/game/components/count_down.dart @@ -4,7 +4,7 @@ import 'package:flutter/painting.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:lightrunners/ui/ui.dart'; -const _matchLength = 60.0; +const _matchLength = 4.0; const _radius = Radius.circular(3.0); class CountDown extends PositionComponent { From 4f5745a400f986006522386eae0fe1a086eb57cf Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 12:23:23 +0200 Subject: [PATCH 02/13] Fix min level --- lib/firebase/scores.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/firebase/scores.dart b/lib/firebase/scores.dart index d2a411d..23553e5 100644 --- a/lib/firebase/scores.dart +++ b/lib/firebase/scores.dart @@ -96,7 +96,7 @@ class Scores { 'playerId', whereIn: playerIds.map((i) => i.toString()).toList(), ) - .where('score', isGreaterThanOrEqualTo: 1) + .where('score', isGreaterThanOrEqualTo: 10) .get()) .map(Score.fromDocument) .toList(); From 5e6ad114a63877d328d8369be3288147e3805a74 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 13:51:56 +0200 Subject: [PATCH 03/13] WIP --- lib/lobby/view/lobby_page.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lobby/view/lobby_page.dart b/lib/lobby/view/lobby_page.dart index f45fb48..53e99c7 100644 --- a/lib/lobby/view/lobby_page.dart +++ b/lib/lobby/view/lobby_page.dart @@ -275,7 +275,8 @@ class _PlayerIdentificationState extends State { widget.onPlayerIdentified(widget.slotNumber, null); } } else { - if (aButton.matches(event) || bButton.matches(event)) { + if (leftYAxis.matches(event) || rightYAxis.matches(event)) { + print(event.value); final delta = aButton.matches(event) ? 1 : -1; // Increment current digit final digit = From 4e09c6fc6e2a2338ea8f0863211df9a0df5e6a9f Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 13:58:37 +0200 Subject: [PATCH 04/13] Upgrade to Flame 1.9.0 --- lib/game/components/background.dart | 1 - lib/game/components/bullet.dart | 1 - lib/game/components/powerup.dart | 1 - lib/game/components/score_box.dart | 1 - lib/game/components/score_panel.dart | 1 - lib/game/components/ship.dart | 1 - lib/game/components/spotlight.dart | 1 - lib/game/lightrunners_game.dart | 18 +++++++----------- pubspec.lock | 16 ++++++++-------- pubspec.yaml | 8 ++++---- 10 files changed, 19 insertions(+), 30 deletions(-) diff --git a/lib/game/components/background.dart b/lib/game/components/background.dart index 8135abc..8c124ad 100644 --- a/lib/game/components/background.dart +++ b/lib/game/components/background.dart @@ -3,7 +3,6 @@ import 'dart:ui'; import 'package:collection/collection.dart'; import 'package:flame/components.dart'; -import 'package:flame/experimental.dart'; import 'package:flame/extensions.dart'; import 'package:lightrunners/game/lightrunners_game.dart'; import 'package:lightrunners/ui/palette.dart'; diff --git a/lib/game/components/bullet.dart b/lib/game/components/bullet.dart index 7299399..54904ae 100644 --- a/lib/game/components/bullet.dart +++ b/lib/game/components/bullet.dart @@ -2,7 +2,6 @@ import 'dart:ui'; import 'package:flame/collisions.dart'; import 'package:flame/components.dart'; -import 'package:flame/experimental.dart'; import 'package:lightrunners/game/game.dart'; import 'package:lightrunners/ui/ui.dart'; diff --git a/lib/game/components/powerup.dart b/lib/game/components/powerup.dart index ab6b3bd..0cc4da0 100644 --- a/lib/game/components/powerup.dart +++ b/lib/game/components/powerup.dart @@ -3,7 +3,6 @@ import 'dart:math'; import 'package:flame/collisions.dart'; import 'package:flame/components.dart'; import 'package:flame/effects.dart'; -import 'package:flame/experimental.dart'; import 'package:flame/extensions.dart'; import 'package:flame/geometry.dart'; import 'package:flutter/animation.dart'; diff --git a/lib/game/components/score_box.dart b/lib/game/components/score_box.dart index d2119b3..f85e628 100644 --- a/lib/game/components/score_box.dart +++ b/lib/game/components/score_box.dart @@ -1,5 +1,4 @@ import 'package:flame/components.dart'; -import 'package:flame/experimental.dart'; import 'package:flutter/painting.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:lightrunners/game/components/ship.dart'; diff --git a/lib/game/components/score_panel.dart b/lib/game/components/score_panel.dart index fc5f41a..91836a5 100644 --- a/lib/game/components/score_panel.dart +++ b/lib/game/components/score_panel.dart @@ -1,7 +1,6 @@ import 'dart:ui'; import 'package:flame/components.dart'; -import 'package:flame/experimental.dart'; import 'package:lightrunners/game/components/score_box.dart'; import 'package:lightrunners/game/lightrunners_game.dart'; import 'package:lightrunners/ui/palette.dart'; diff --git a/lib/game/components/ship.dart b/lib/game/components/ship.dart index 28bba03..7f86b30 100644 --- a/lib/game/components/ship.dart +++ b/lib/game/components/ship.dart @@ -3,7 +3,6 @@ import 'dart:ui'; import 'package:flame/collisions.dart'; import 'package:flame/components.dart'; -import 'package:flame/experimental.dart'; import 'package:flame/extensions.dart'; import 'package:flame/geometry.dart'; import 'package:flutter/services.dart'; diff --git a/lib/game/components/spotlight.dart b/lib/game/components/spotlight.dart index cac5c76..6301807 100644 --- a/lib/game/components/spotlight.dart +++ b/lib/game/components/spotlight.dart @@ -3,7 +3,6 @@ import 'dart:ui'; import 'package:flame/collisions.dart'; import 'package:flame/components.dart'; -import 'package:flame/experimental.dart'; import 'package:flame/palette.dart'; import 'package:lightrunners/game/components/ship.dart'; import 'package:lightrunners/game/lightrunners_game.dart'; diff --git a/lib/game/lightrunners_game.dart b/lib/game/lightrunners_game.dart index 9a82d0a..406b026 100644 --- a/lib/game/lightrunners_game.dart +++ b/lib/game/lightrunners_game.dart @@ -20,25 +20,22 @@ class LightRunnersGame extends FlameGame final List players; late final Rect playArea; late final CameraComponent cameraComponent; - late final World world; late final Map ships; StreamSubscription? _subscription; final void Function(Map) onEndGame; - LightRunnersGame({required this.players, required this.onEndGame}); + LightRunnersGame({required this.players, required this.onEndGame}) + : super( + camera: CameraComponent.withFixedResolution( + width: fixedSize.x, + height: fixedSize.y, + ), + ); @override Future onLoad() async { _createShips(); - world = World(); - - cameraComponent = CameraComponent.withFixedResolution( - world: world, - width: fixedSize.x, - height: fixedSize.y, - ); - add(cameraComponent); playArea = Rect.fromLTWH( screenMargin - fixedSize.x / 2, @@ -49,7 +46,6 @@ class LightRunnersGame extends FlameGame cameraComponent.viewport.add(ScorePanel()); world.addAll([Background(), GameBorder()]); world.addAll([Spotlight(), ...ships.values]); - add(world); late final CountDown countDown; add( diff --git a/pubspec.lock b/pubspec.lock index 40ba3b2..f7b3046 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -253,34 +253,34 @@ packages: dependency: "direct main" description: name: flame - sha256: bd2b45f9fc0ec4939031b85c0b0a97cf09357c12ecd072d44389a4c577a2c0f0 + sha256: b61d557d340e4541dec5ffa9c5bc82dd0fb42cce7ec99d3e8cab3c745c93c327 url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.0" flame_audio: dependency: "direct main" description: name: flame_audio - sha256: "62c98d1541ecd023e8b549e0fd7f5e5b2026724f3289b44bd272959d170c8bba" + sha256: d05d8b358ff7943eee02fb81217d6c66c097b876f53a2b30f31b868784605ed8 url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.1.0" flame_lint: dependency: "direct dev" description: name: flame_lint - sha256: "216a327ecc169b8fa1286598485f9ec243b9d0c0e4f24127794b12f5cebe71f7" + sha256: "49ed8ba7b4ef666ea0e9ff4c63b12091140258ee88953f482e46b8d9c51df067" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flame_test: dependency: "direct dev" description: name: flame_test - sha256: "073933552b86282027109a071b689904074691975e77ebf7c653e9c506e6f6a0" + sha256: b2c650ba28756d124b74d210bb441aad8ec651eaa6ea43f3af5950eee9100392 url: "https://pub.dev" source: hosted - version: "1.12.1" + version: "1.13.0" flutter: dependency: "direct main" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 740194b..b2a0cf7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,8 +11,8 @@ dependencies: collection: ^1.17.0 firebase_admin: ^0.2.0 firedart: ^0.9.7 - flame: ^1.8.2 - flame_audio: ^2.0.5 + flame: ^1.9.0 + flame_audio: ^2.1.0 flutter: sdk: flutter flutter_shaders: ^0.1.2 @@ -22,8 +22,8 @@ dependencies: vector_math: ^2.1.4 dev_dependencies: - flame_lint: ^1.1.0 - flame_test: ^1.12.1 + flame_lint: ^1.1.1 + flame_test: ^1.13.0 flutter_test: sdk: flutter integration_test: From c49718b349befcd8f199b92c5a9a451ea4b236bd Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 14:05:27 +0200 Subject: [PATCH 05/13] Try with y-axis --- lib/lobby/view/lobby_page.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lobby/view/lobby_page.dart b/lib/lobby/view/lobby_page.dart index 53e99c7..9fcc0e4 100644 --- a/lib/lobby/view/lobby_page.dart +++ b/lib/lobby/view/lobby_page.dart @@ -276,8 +276,8 @@ class _PlayerIdentificationState extends State { } } else { if (leftYAxis.matches(event) || rightYAxis.matches(event)) { - print(event.value); - final delta = aButton.matches(event) ? 1 : -1; + print(event.type.name); + final delta = event.value.sign; // Increment current digit final digit = int.parse(_playerId.substring(_cursor, _cursor + 1)); From 5ad4f481e4f0a5cfa8d44be76a8bb1b16e04cf4d Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 14:15:47 +0200 Subject: [PATCH 06/13] Debouncing --- lib/lobby/view/lobby_page.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/lobby/view/lobby_page.dart b/lib/lobby/view/lobby_page.dart index 9fcc0e4..d68bea2 100644 --- a/lib/lobby/view/lobby_page.dart +++ b/lib/lobby/view/lobby_page.dart @@ -256,6 +256,8 @@ class _PlayerIdentificationState extends State { var _selectedPlayerMode = false; var _playerId = '0000'; var _cursor = 0; + int? _lastChange; + double? _lastDirection; late StreamSubscription _gamepadSubscription; @@ -276,8 +278,14 @@ class _PlayerIdentificationState extends State { } } else { if (leftYAxis.matches(event) || rightYAxis.matches(event)) { - print(event.type.name); final delta = event.value.sign; + if ((_lastChange != null && + event.timestamp - _lastChange! < 500) || + delta != _lastDirection) { + return; + } + _lastChange = event.timestamp; + _lastDirection = delta; // Increment current digit final digit = int.parse(_playerId.substring(_cursor, _cursor + 1)); From dc6bc4d4629ff981bd41ce89603d4fb93d8aab93 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 14:16:52 +0200 Subject: [PATCH 07/13] Correct direction --- lib/lobby/view/lobby_page.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lobby/view/lobby_page.dart b/lib/lobby/view/lobby_page.dart index d68bea2..4b75fbd 100644 --- a/lib/lobby/view/lobby_page.dart +++ b/lib/lobby/view/lobby_page.dart @@ -280,8 +280,8 @@ class _PlayerIdentificationState extends State { if (leftYAxis.matches(event) || rightYAxis.matches(event)) { final delta = event.value.sign; if ((_lastChange != null && - event.timestamp - _lastChange! < 500) || - delta != _lastDirection) { + event.timestamp - _lastChange! < 500) && + delta == _lastDirection) { return; } _lastChange = event.timestamp; From eecabd3a6e2548a6dde914eec339d6c34c4a1621 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 14:18:12 +0200 Subject: [PATCH 08/13] Doubles are not needed --- lib/lobby/view/lobby_page.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lobby/view/lobby_page.dart b/lib/lobby/view/lobby_page.dart index 4b75fbd..8b3c862 100644 --- a/lib/lobby/view/lobby_page.dart +++ b/lib/lobby/view/lobby_page.dart @@ -257,7 +257,7 @@ class _PlayerIdentificationState extends State { var _playerId = '0000'; var _cursor = 0; int? _lastChange; - double? _lastDirection; + int? _lastDirection; late StreamSubscription _gamepadSubscription; @@ -278,7 +278,7 @@ class _PlayerIdentificationState extends State { } } else { if (leftYAxis.matches(event) || rightYAxis.matches(event)) { - final delta = event.value.sign; + final delta = event.value.sign.toInt(); if ((_lastChange != null && event.timestamp - _lastChange! < 500) && delta == _lastDirection) { From 958c5febe7640ccaee79ccacf75601d269b09cc5 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 14:23:49 +0200 Subject: [PATCH 09/13] Reverse direction --- lib/lobby/view/lobby_page.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/lobby/view/lobby_page.dart b/lib/lobby/view/lobby_page.dart index 8b3c862..1c56c83 100644 --- a/lib/lobby/view/lobby_page.dart +++ b/lib/lobby/view/lobby_page.dart @@ -278,9 +278,9 @@ class _PlayerIdentificationState extends State { } } else { if (leftYAxis.matches(event) || rightYAxis.matches(event)) { - final delta = event.value.sign.toInt(); - if ((_lastChange != null && - event.timestamp - _lastChange! < 500) && + final delta = event.value.sign.toInt() * -1; + if (_lastChange != null && + event.timestamp - _lastChange! < 200 && delta == _lastDirection) { return; } From 6ea393ef3f70a818b21cac195df7d354d4f3b651 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 14:27:28 +0200 Subject: [PATCH 10/13] Try out good min values --- lib/lobby/view/lobby_page.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/lobby/view/lobby_page.dart b/lib/lobby/view/lobby_page.dart index 1c56c83..dd2e776 100644 --- a/lib/lobby/view/lobby_page.dart +++ b/lib/lobby/view/lobby_page.dart @@ -279,9 +279,10 @@ class _PlayerIdentificationState extends State { } else { if (leftYAxis.matches(event) || rightYAxis.matches(event)) { final delta = event.value.sign.toInt() * -1; - if (_lastChange != null && - event.timestamp - _lastChange! < 200 && - delta == _lastDirection) { + if ((_lastChange != null && + event.timestamp - _lastChange! < 200 && + delta == _lastDirection) || + event.value.abs() < 1000) { return; } _lastChange = event.timestamp; From 8e4cd3e25ef4e4a896dd84b726511510a95451b4 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 14:36:15 +0200 Subject: [PATCH 11/13] Movement in lobby --- lib/lobby/view/lobby_page.dart | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/lobby/view/lobby_page.dart b/lib/lobby/view/lobby_page.dart index dd2e776..1eeb0bc 100644 --- a/lib/lobby/view/lobby_page.dart +++ b/lib/lobby/view/lobby_page.dart @@ -267,6 +267,13 @@ class _PlayerIdentificationState extends State { _gamepadSubscription = Gamepads.events.listen((GamepadEvent event) { setState(() { + final isYaxis = leftYAxis.matches(event) || rightYAxis.matches(event); + final isRight = + (leftXAxis.matches(event) || rightXAxis.matches(event)) && + event.value > 30000; + final isLeft = + (leftXAxis.matches(event) || rightXAxis.matches(event)) && + event.value < -30000; if (event.gamepadId == widget.gamepadId) { if (_selectedPlayerMode == false) { if (aButton.matches(event)) { @@ -277,12 +284,12 @@ class _PlayerIdentificationState extends State { widget.onPlayerIdentified(widget.slotNumber, null); } } else { - if (leftYAxis.matches(event) || rightYAxis.matches(event)) { + if (isYaxis) { final delta = event.value.sign.toInt() * -1; if ((_lastChange != null && event.timestamp - _lastChange! < 200 && delta == _lastDirection) || - event.value.abs() < 1000) { + event.value.abs() < 5000) { return; } _lastChange = event.timestamp; @@ -298,12 +305,14 @@ class _PlayerIdentificationState extends State { '$newDigit', ); }); - } else if (r1Bumper.matches(event) && event.value > 30000) { + } else if (isRight || + (r1Bumper.matches(event) && event.value > 30000)) { // Move the cursor to the next digit if R1 is fully pressed setState(() { _cursor = (_cursor + 1) % _playerId.characters.length; }); - } else if (l1Bumper.matches(event) && event.value > 30000) { + } else if (isLeft || + (l1Bumper.matches(event) && event.value > 30000)) { // Move the cursor to the previous digit if L1 is fully pressed setState(() { _cursor = (_cursor - 1) % _playerId.characters.length; From 00c95cca1d981250cc4fc082f02babf9aae46ed7 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 14:36:53 +0200 Subject: [PATCH 12/13] Upgrade --- pubspec.lock | 140 +++++++++++++++++++++++++++------------------------ 1 file changed, 74 insertions(+), 66 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index f7b3046..169c565 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -13,42 +13,42 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: e440ac42679dfc04bbbefb58ed225c994bc7e07fccc8a68ec7d3631a127e5da9 + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a url: "https://pub.dev" source: hosted - version: "54.0.0" + version: "61.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "2c2e3721ee9fb36de92faa060f3480c81b23e904352b087e5c64224b1a044427" + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 url: "https://pub.dev" source: hosted - version: "5.6.0" + version: "5.13.0" archive: dependency: transitive description: name: archive - sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a" + sha256: "1227dc3efc4ea571eebb2dfb814506ed2cfb1d4b1b89fb918abdddde617ead3c" url: "https://pub.dev" source: hosted - version: "3.3.7" + version: "3.4.0" args: dependency: transitive description: name: args - sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.2" asn1lib: dependency: transitive description: name: asn1lib - sha256: b74e3842a52c61f8819a1ec8444b4de5419b41a7465e69d4aa681445377398b0 + sha256: "21afe4333076c02877d14f4a89df111e658a6d466cbfc802eb705eb91bd5adfd" url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.5.0" async: dependency: transitive description: @@ -165,10 +165,10 @@ packages: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" crypto_keys: dependency: transitive description: @@ -205,10 +205,10 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.0" file: dependency: transitive description: @@ -366,18 +366,18 @@ packages: dependency: transitive description: name: gcloud - sha256: "64e1f3b8e94d3ad0477fd25daf17ed5fb8590f1cda293bfd2616243a8da3c22f" + sha256: "94cc7901dba3bcc9cd1c0530caf2d87e733392ce8f93734ccb23d82ef9f2a3e2" url: "https://pub.dev" source: hosted - version: "0.8.9" + version: "0.8.11" glob: dependency: transitive description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" google_fonts: dependency: "direct main" description: @@ -422,10 +422,10 @@ packages: dependency: transitive description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "0.13.6" http2: dependency: transitive description: @@ -475,10 +475,10 @@ packages: dependency: transitive description: name: jose - sha256: "06d28181b3ca26ffb83bf943f62f29d6b1b55793c852a389d3a29e6a5f54d325" + sha256: "7955ec5d131960104e81fbf151abacb9d835c16c9e793ed394b2809f28b2198d" url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "0.3.4" js: dependency: transitive description: @@ -491,10 +491,10 @@ packages: dependency: transitive description: name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" matcher: dependency: transitive description: @@ -547,10 +547,10 @@ packages: dependency: transitive description: name: ordered_set - sha256: "3fedcc9121b3ba24c0a84f32da2989c42e36c159b73feadbc2f402dc55966b81" + sha256: "3858c7d84619edfab87c3e367584648020903187edb70b52697646f4b2a93022" url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "5.0.2" package_config: dependency: transitive description: @@ -571,50 +571,50 @@ packages: dependency: transitive description: name: path_provider - sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9" + sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa url: "https://pub.dev" source: hosted - version: "2.0.13" + version: "2.1.1" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "7623b7d4be0f0f7d9a8b5ee6879fc13e4522d4c875ab86801dee4af32b54b83e" + sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" url: "https://pub.dev" source: hosted - version: "2.0.23" + version: "2.2.0" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: eec003594f19fe2456ea965ae36b3fc967bc5005f508890aafe31fa75e41d972 + sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.3.1" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: "525ad5e07622d19447ad740b1ed5070031f7a5437f44355ae915ff56e986429a" + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.9" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.1" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: "642ddf65fde5404f83267e8459ddb4556316d3ee6d511ed193357e25caa3632d" + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.1" petitparser: dependency: transitive description: @@ -643,10 +643,10 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.6" pointycastle: dependency: transitive description: @@ -675,18 +675,18 @@ packages: dependency: transitive description: name: protobuf - sha256: "4034a02b7e231e7e60bff30a8ac13a7347abfdac0798595fae0b90a3f0afe759" + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.0" pub_semver: dependency: transitive description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" quiver: dependency: transitive description: @@ -695,6 +695,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.1" + retry: + dependency: transitive + description: + name: retry + sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc" + url: "https://pub.dev" + source: hosted + version: "3.1.2" rxdart: dependency: transitive description: @@ -707,34 +715,34 @@ packages: dependency: transitive description: name: shelf - sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - sha256: aef74dc9195746a384843102142ab65b6a4735bb3beea791e63527b88cc83306 + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" shelf_static: dependency: transitive description: name: shelf_static - sha256: e792b76b96a36d4a41b819da593aff4bdd413576b3ba6150df5d8d9996d2e74c + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" sky_engine: dependency: transitive description: flutter @@ -848,10 +856,10 @@ packages: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" uuid: dependency: transitive description: @@ -880,10 +888,10 @@ packages: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" web: dependency: transitive description: @@ -896,10 +904,10 @@ packages: dependency: transitive description: name: web_socket_channel - sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.0" webdriver: dependency: transitive description: @@ -912,18 +920,18 @@ packages: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" win32: dependency: transitive description: name: win32 - sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + sha256: c97defd418eef4ec88c0d1652cdce84b9f7b63dd7198e266d06ac1710d527067 url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "5.0.8" x509: dependency: transitive description: @@ -936,18 +944,18 @@ packages: dependency: transitive description: name: xdg_directories - sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.3" yaml: dependency: transitive description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: dart: ">=3.1.0-185.0.dev <4.0.0" flutter: ">=3.10.0" From f77514dcfef80249b5a2029bbfde12add3be5823 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Fri, 22 Sep 2023 14:46:52 +0200 Subject: [PATCH 13/13] Add flag for scavenger hunt --- lib/end_game/view/end_game_page.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/end_game/view/end_game_page.dart b/lib/end_game/view/end_game_page.dart index f450ae3..1554370 100644 --- a/lib/end_game/view/end_game_page.dart +++ b/lib/end_game/view/end_game_page.dart @@ -36,6 +36,7 @@ class _EndGamePageState extends State { late StreamSubscription _gamepadSubscription; late GamepadNavigator _gamepadNavigator; + bool isScavengerHunt = true; bool updatingFirebase = true; bool receivedTopPlayers = false; bool minDurationElapsed = false; @@ -172,7 +173,7 @@ class _EndGamePageState extends State { ), ], ), - if (topPlayers.isNotEmpty) ...[ + if (isScavengerHunt && topPlayers.isNotEmpty) ...[ Text( 'Congratulations, the following players have received\n' 'an achievement and can scan the QR code with the F3 app!',