Questions tagged [flame]

Flame is a modular game engine built with Flutter.

Flame is a 2D game engine built on top of the Flutter framework, composed of a ever expanding set of modular solutions that developers can pick and choose to make from simple to very complex games on Android, iOS and now web/desktop (beta).

281 questions
10
votes
2 answers

Flutter: Fatal Error: Callback lookup failed! (with audioplayers package)

The following snippet is the button by clicking which, a short beep plays: FlatButton( onPressed: () => { final player = new AudioCache(); player.play('note1.wav'); } child: Text('Click to ding!'), ), The problem I'm facing is…
7
votes
2 answers

uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library [:audioplayers]

I am creating a simple game in flutter, dart and flame, my flame is updated version same goes with the flutter, C:\Users\Users\Desktop\vcflutter\flutter_application_1\lib\Flutter Game\flutter_application_1\android\app\src\debug\AndroidManifest.xml…
user15115251
6
votes
2 answers

Realtime Multiplayer Game with firebase

I just created a mobile game with flutter and would like to extend that to a multiplayer online game. So I thought about making it with firebase. I'm rather new to this domain so I hope my questions don't sound too stupid. As the characters in my…
Gerus
  • 61
  • 1
  • 3
5
votes
2 answers

dependency_overrides for dependency with path dependency

In Flame we have a monorepo with Flame and its bridge packages and all of the bridge packages has Flame as a path dependency (not when they are released). It doesn't seem to be possible to depend on our main branch and on a bridge library on the…
spydon
  • 9,372
  • 6
  • 33
  • 63
5
votes
3 answers

Failed to find definition for url(#paint0_linear) in flutter

I am using flame_svg: ^0.0.1 package from flutter for rendering svg when i try to load the svg it gives the below error flutter: The following assertion was thrown in _getDefinitionPaint: flutter: Failed to find definition for…
Balaji Venkatraman
  • 1,228
  • 12
  • 19
4
votes
1 answer

Fullscreen with flame 1.1.0

Is there a way to use fullscreen window mode in Flame 1.1.0 (under Windows Desktop)? There is no Util class from version 1.0.0 any more and the Flame.device.fullScreen(); call does not work, no matter where I call it. Future main() async { …
Christian
  • 576
  • 1
  • 4
  • 16
4
votes
1 answer

How to reset the game properly in the Flutter Flame?

I want to reset the game and use bellow methods for resetting, it works, but there is two problem. First is, when I use Future.delayed(Duration(seconds: 1)).then((value) {//} in startGame() method, resetting works correctly! but when I call…
Davoud
  • 2,576
  • 1
  • 32
  • 53
3
votes
1 answer

Rotate position component around parent component

I am new to flame engine and its capabilities. I have two components: player component gun component The idea is for the gun component to follow the player when the player moves. In terms of aim gun, how would I go about rotating the gun component…
3
votes
1 answer

Flame Audio not not working on Android but works fine on iPhone

Flame Audio (flame_audio 1.2.0) is not playing the sound effects (wav or mp3) on an android device or emulator. But works fine on ios simulator. I have tried playing "wav" & mp3 files but no error was shown either. PFB my pubspect.yml environment: …
Ganapat
  • 6,984
  • 3
  • 24
  • 38
3
votes
1 answer

Flutter logic issue

I'm building this small game , it's similar to Qix game . I already built the first screens now i need to implement the functionality , the car should be moving using the buttons , and while moving it should draw like a container behind it until it…
3
votes
1 answer

Flutter flame_tiled load collisions

Is it possible to load collisions from tsx with level into flame_tiled? final level = await TiledComponent.load('intro.tmx', Vector2.all(32));
3
votes
1 answer

On flutter flame 1.0.0 how to use the onComplete callback when move effect is over?

I was using the onComplete callback on previous flame engine version in move effect but now that version 1.0.0 was released I can’t manage to find it although it is mentioned in the documentation but not clearly and there is no example for…
Eli dp
  • 31
  • 2
3
votes
1 answer

Flutter-Flame: How to calculate the relect of a raycast?

Thank you for your reading. My English is not good, I'll explain this as well as I can. I need to generate the reflection line in canvas, but it not work well. I think my problem is the "The formula for calculating the reflected vector". The…
HarrisonQi
  • 183
  • 7
3
votes
1 answer

How do you sort the render order of sprites in Flame (Flutter) at runtime?

What's the most concise (and ideally, most efficient) approach to sort the rendering order of sprites in the game scene at runtime, post add()-ing the objects to the scene? Is there a built-in property on SpriteComponent or…
3
votes
1 answer

Flutter - Flame engine | collision: When an object have a high velocity/speed the collision don't trigger

I did some test and I saw when an object have a high velocity/speed the collision don't trigger. On the Flame docs it notes: Do note that the built-in collision detection system does not take collisions between two hitboxes that overshoot each…
1
2 3
18 19