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
0
votes
1 answer

How to make an animated sprite look like it's walking forward in Flame Game?

I've got a moving sprite that animates over a loop of 4 images to make it look like it's walking in one spot. I want to make the sprite move forward by a certain amount when I click a button. I've tried looking for how this might be done, but it's…
Samuel
  • 3
  • 1
0
votes
1 answer

building a game using dart, flutter and flame: rendering the image layer from tiled

I'm building a game using the flame game engine. I encountered an issue with the map I built using Tiled - which generates a .tmx file that is called by the code using the following commands: var demoMap = await TiledComponent.load("demoMap.tmx",…
0
votes
0 answers

Isometric Tile map Transforms

Do we have a chance to transform control in the Flutter Flame plugin -> IsometricTileMapComponent as in the attached example (its Graphx dependencies but no source code)? Animation of what I mean: https://giphy.com/gifs/EInY3MKZ2xvmYNl3fm Links to…
0
votes
1 answer

Creating enemy with vision radius and blind spots

I’m using flutter and flame to create a game similar to sneak ops. I’m wondering how to go about creating an enemy that has a vision radius or area, that is obstructed by objects.
0
votes
1 answer

How to change the structure of asset locations in flame?

I'd like to change where the default structure of assets that flame uses. The documentation says If you want to change this structure, this is possible by using the prefix parameter and creating your own instances of AssetsCache, ImagesCache,…
0
votes
2 answers

How to delete subordinate components correctly?

buildNewStructure(){ removeAll(children.query()); sprite = Sprite(Flame.images.fromCache('new_structure.png')); add(ListButton0(g,structure!)); add(ListButton1(g,structure!)); add(ListButton2(g,structure!)); …
0
votes
1 answer

Flame-engine, Draggable component doesn't work

I am completely newbie in flutter world specially flame-engine. Maybe it's a simple issue. But currently I couldn't figure it out. So please help me! The main issue is my Draggable component doesn't work all event handler functions seem like doesn't…
Nyamkhuu Buyanjargal
  • 621
  • 2
  • 11
  • 29
0
votes
2 answers

Concurrent modification during iteration: _LinkedHashSet

I am following this game but with a new version of Flame. So the game code is not exactly the same. The difference here in this class is that the method addChild used in tutorial doesn't exist anymore, it seems. I have this code inside my…
Arash
  • 11,697
  • 14
  • 54
  • 81
0
votes
1 answer

Sprite Component exits screen in flame flutter

I am completely new to flame and game development, I know with camera and viewpoint you can control the components but my component exits the screen and I don't know how to stop it from moving forward when it reaches the screen end. Any idea how?
0
votes
1 answer

From flame 0.29.0 to flame 1.0.0 and from box2d_flame: ^0.4.6 to flame_forge2d 0.11.0

I'm Migrating to flame 1.1.1 from flame v0.29.4 and I can't find a good roadmap. How can I effectively replace Box2DComponent ? Attributes like components and viewport for example, i can't understand where and how to replace them. Is correct…
rohtvccx_
  • 3
  • 3
0
votes
1 answer

revoluteJointDef.localAnchorA y-axes looks wrong

From this, I would expect the following RevoluteJoint bodyB, to be higher up than the blue box on the y-axe - setting revoluteJointDef.localAnchorA? flame_forge2d: ^0.11.0 class Box extends BaseBox { // just a BodyComponent for same shape …
Chris G.
  • 23,930
  • 48
  • 177
  • 302
0
votes
1 answer

Show/Hide a SpriteComponent using Flame in Flutter

I am a beginner with the use of Flame, and I have a small problem. My game has 3 states: Game is playing Game is paused Game is over During each state, there should be different buttons displayed. I use SpriteComponent to display my buttons, but I…
Louis
  • 49
  • 6
0
votes
1 answer

MouseJoint gets less and less reactive

Still new to flame and forge2d - both very impressive stuff. I just learned that you need a MouseJoint to move a (Body)Component so you dont mess with the physics in Forge2d/Box2d. From this example - MouseJointSample I see that it does work for…
Chris G.
  • 23,930
  • 48
  • 177
  • 302
0
votes
1 answer

Forge2DGame: No effect setting - body.position.setFrom(info.delta.game)

From this example you can drag around(not at the draggable point but some factor) a BodyComponent by setting body.applyLinearImpulse. If I try to drag around, setting body.position I get no effect. I was hoping to be able to drag the BodyComponent…
Chris G.
  • 23,930
  • 48
  • 177
  • 302
0
votes
1 answer

Set world backgroundcolor

How can you set the background color? I tried setting this in onLoad: world.color.setRGB(0,0,255); I also tried adding a component, but I maybe there is a better way: class Background extends PositionComponent with HasGameRef { @override int…
Chris G.
  • 23,930
  • 48
  • 177
  • 302