Questions tagged [flame]
Flame is a modular game engine built with Flutter.
305
questions
0
votes
1
answer
15
views
Flutter Flame Background image full screen
I'm using the Tick Tack Toe app sample and modified the Play session screen to use a Flame Game widget. I'm trying to set a full screen background image (windows) that will resize when the window ...
1
vote
1
answer
21
views
HasTappableComponents class in Flame flutter deprecated
The onTapDown method in GamePlayScreen doesn't seem to be triggered, and I can't figure out why. Any insights or suggestions would be greatly appreciated.
class FlyingCrowGameStart extends FlameGame ...
0
votes
2
answers
50
views
new to Flame and Tile
i have been fooling around with Flame and Tiled for a few days and i have read the docs, but i cant figure out how to get tile data from the TiledComponent ?
Hope someone can help :)
I Would also like ...
1
vote
1
answer
29
views
Flutter Flame SpawnComponent sample
Trying to implement the Flame SpawnComponent but get the error:
The argument type 'MyComponent Function()' can't be assigned to the parameter type 'PositionComponent Function(int)'....
0
votes
1
answer
60
views
Flutter Flame Drag & Drop
I have a Flutter App with Flame. I need to drag and drop SpriteComponents. I also have a Tiled map added to world that has a SpriteComponent (named cell) added to each Tile. I need to drop other ...
1
vote
1
answer
27
views
Flutter Flame collisions do not update
I have a simple RectangleHitbox (sort of wall) and CircleHitbox (player). When they collide each other I can see through the "onCollision" method which points are involved. However if I move ...
1
vote
1
answer
18
views
How to make the origin (0,0) point in flame engine in the bottom
I want to make the origin point in the bottom-left corner instead of the top-left corner
1
vote
1
answer
18
views
Collision detection in platformer, how to fix my character sliding off the edges of platforms?
The character/player in my game will slowly slide off platforms once he is near the edge. How would I fix this? Ideally my character would remain on top of a platform even in a situation like this:
My ...
0
votes
2
answers
91
views
How to position SpriteComponent relative to Game screen in Flutter Flame Engine?
I have a sprite component that I would like to set as the main background of the Flame game and move an avatar on top of this, with CameraComponent following this avatar. Sprite movements that need to ...
0
votes
1
answer
39
views
Flutter Flame Game how to add projectile?
I've added bullets that my character can shoot but despite making their starting position the same as my character they seem to be rendered to the bottom left/right underneath my level. The bullets ...
1
vote
1
answer
59
views
Flame flutter interpolate between multiple vector2
I've just started the flame, and I'd like to move a component from this position to a list of positions progressively over 7 seconds.
What I've managed to do so far has a latency of between the ...
0
votes
1
answer
37
views
Dropdown Menu/button in Flame Game
Is there a way to add a dropdown menu in flame? I want to be able to make a dropdown button in specific with values that I can select from in that you can click it and the values show below.
I've ...
0
votes
1
answer
63
views
How to create collision shapes for SVG in Forge2D using Flame?
I am working on a Flutter project, utilizing the Flame game engine and the Forge2D library for physics simulation. I need to add collisions for my SVG elements in the game. I already know how to ...
0
votes
1
answer
58
views
Flutter flame's flame_audio background music is not working on web platform
I am trying to play background music for my Flutter Flame Game, but the music is not playing on Web platform.
Testing on android device, the same code works fine and plays music.
Checking with docs, ...
1
vote
0
answers
128
views
Playing Plinko on Flutter via Flame [closed]
I want to create a Plinko game using flutter through flames so that the end result looks like this:
But this is the only thing I can do:
Here's the code:
class MyGame extends FlameGame with ...
2
votes
1
answer
81
views
How to handle Object collision for platformer game?
I watched a few tutorials and tried to put together the code for the onCollision method in my Player class. The tutorial persons' explanation was good, but I still don't understand how exactly it ...
0
votes
1
answer
63
views
How to add touch button in Flutter Flame?
I need to add touch button, when I touch the button it needs to do a task, when I release the button it need to stop doing the task.
@override
voidonTapDown(TapDownEvent event) {
isTapped=true;
...
0
votes
1
answer
32
views
'ticker' is deprecated and shouldn't be used. Will be removed in Flame v1.9, use createTicker() instead
Warning of deprecation :
package:flame/src/sprite_animation.dart SpriteAnimationTicker ticker()
Containing class: SpriteAnimation
Returns a new instance of SpriteAnimationTicker
ticker() method is ...
2
votes
1
answer
228
views
How to use CameraComponent.setBounds() in Flutter Flame?
I have a world and a player. My camera follows the player. The player can't go out the worlds bounds I had created, but camera can see what is behind the world borders(black screen).
I tried to add ...
1
vote
1
answer
31
views
SpriteAnimationTicker class
What does the SpriteAnimationTicker class does and what are some applications for it?
I am making a game where a character is running with each tap. Each tap will alternate the left and right stride ...
0
votes
1
answer
31
views
Rotating point (anchor) for SpriteComponent
I'm playing around with Flame and Flutter and trying to add a SpriteComponent that rotates around its center. I'm a beginner, so bare with me.
It works when I do the following:
class Player extends ...
0
votes
1
answer
35
views
The getter 'velocity' isn't defined for the type 'JoystickComponent'
I'm trying to make a Joystick
class JoystickPlayer extends SpriteComponent with HasGameRef {
JoystickPlayer(this.joystick)
: super(
anchor: Anchor.center,
size: Vector2.all(100.0)...
1
vote
1
answer
40
views
In spite of onCollision handling my character falls through the platform
This is the mechanism I use to prevent this bad accident happening to my beloved character:
void onCollision(Set<Vector2> intersectionPoints, PositionComponent other) {
print(
"...
0
votes
1
answer
119
views
How should I set camera to fit the device screen in flame 1.8
I'm trying to make a RPG style game using Flame 1.8.
This is my onLoad of my game (extends FlameGame):
@override
Future<void> onLoad() async {
// debugMode = true;
myWorld = MyWorld()...
0
votes
1
answer
79
views
FPSCounter is not recognised and can't be used
I wanted to see if I could add a FPSCounter to a Flutter Flame app and the official documentation shows it to just be added after FlameGame.
This is what the official documentation shows:
class MyGame ...
1
vote
1
answer
59
views
Exclusive touch in Flutter FlameGame
I am developing a game in Flutter using Flame (FlameGame). There are multiple draggable components on the screen but I want to limit the user to only being able to drag one at a time.
I understand ...
-1
votes
1
answer
41
views
Flame on various devices and their resolutions
Flutter/android supports various resolutions (hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi) for resources used in apps.
Is there something similar available for Flame resources like SpriteButtonComponent, ...
0
votes
0
answers
51
views
Need to load isometric tile map using Flutter Flame without tile layers overlapping each other?
Current bug behavior - (https://prnt.sc/AZt3-gBovXLw)
There is a strange overlapping issue occurring at the time of rendering the map. I am using embedded tilesets and external as well. I have tried ...
0
votes
1
answer
56
views
Flame: Forming a component from a repeated image
I'm making a simple game in flutter / flame. I have a brick-wall image, something like this:
https://opengameart.org/sites/default/files/styles/medium/public/oga-textures/97263/brick_wall.png
If I ...
0
votes
1
answer
99
views
Gravity in Flutter Flame
I am currently following this Flutter Flame tutorial: https://www.youtube.com/watch?v=gjGwLsjIF1o
However, even though the code works perfectly well, I can't seem to understand how the variable "...
0
votes
1
answer
49
views
Flutter flame : var and kdebugmode
In this code (main.dart):
void main() {
WidgetsFlutterBinding.ensureInitialized();
Flame.device.fullScreen();
Flame.device.setLandscape();
RunAdventure game = RunAdventure();
runApp(...
0
votes
1
answer
74
views
Need Help Replacing Deprecated Collision Code in Flutter's Flame Game Development"
I'm developing a game with Flutter's Flame, but my code is deprecated, and I don't know how to replace this part. Can you help me?
void onCollision(Set<Vector2> intersectionPoints, Collidable ...
0
votes
2
answers
144
views
Fixed Resolution in Flutter and Flame for Browser on PC
I have started to develop a small game with Flutter and Flame. However, I have a problem: how can I define a maximum resolution for my game for users who might be on a browser on a PC (since my game ...
0
votes
1
answer
34
views
Performance Issues with 500x500 Maps in Flame: Tiled Loading Impact on FPS?
I'm uncertain if Flame continuously updates all tiles or if it selectively loads only the visible ones on the screen. The concern arises from my experience with a 500x500 map, which, despite using ...
2
votes
0
answers
118
views
Flutter Flame ScaleDetector doesn't work when a Component with DragCallbacks is added
How can I make scale and drag gestures work simultaneously in Flutter Flame? I want to have draggable components placed on the zoomable board. Imagine you have a puzzle board and you want to zoom in ...
0
votes
1
answer
130
views
Problem on Flutter flame updating spritecomponent position
I am new to flutter flame development, and i am trying to make a object that contain a spritecomponent and sprite animation component, currently i am trying to update there position and i got ...
0
votes
1
answer
72
views
Change ball angle when hit another body (Paddle)
I'm studying Flame + Forge2D, developing the famous breakout game. I'm struggling with changing the ball's direction when it hits the paddle.
Imagine a paddle with size 6, when the ball hits paddle's &...
3
votes
1
answer
204
views
flutter flame camera shake deprecated
When I tried to repeat some lecture of flutter flame, most of youtube instructors teach me this way to shake screen.
But IDE complaint using camera property directly was deprecated.
So,
What is best ...
1
vote
2
answers
180
views
How to deal with character collision on corners in Flutter Flame
I am trying to create little top view game with a character that moves around an open world. The world is filled with obstacles. I cannot figure out to handle my character position when he collides ...
0
votes
1
answer
52
views
Flutter Flame parallax not showing images on ios device
here's my code and it works perfectly on Android, but doesn't show on ios devices, just black blank screen.
class MyParallaxComponent extends ParallaxComponent<RocketMan> {
@override
Future&...
0
votes
1
answer
135
views
Scoring System in a Flame (Flutter) Game Engine
I am making a simple game using Flame (Flutter) game engine.
I want to implement a simple scoring system where the high score and the current score can be displayed at the end of the current round.
If ...
0
votes
1
answer
106
views
Is there an EffectController function in Flame/Flutter that allows you to change animation?
I'm currently using Flutter and Flame to create a simulation that runs through a set of instructions. Each instruction adds an effect to the character by using effect queue that uses MoveByEffect and ...
1
vote
1
answer
138
views
Flutter Flame using two Camera Components and hide a Component inside a World Component form one Camera
In the game, two CameraComponents are employed. One camera is used for the actual gameplay, while the other serves the purpose of displaying a minimap to the player. Both cameras utilize the same ...
1
vote
1
answer
273
views
How to deal with the "anti-aliasing bug" in flutter [3.3.1] using flame [1.7.3]?
I am making a replica of FF3 for learning purposes. The tiles are 15x15, therefore the map looks very small on practically any device. I thought one simple solution would be to set the zoom value of ...
0
votes
1
answer
61
views
Shaping a RiveComponent in Flutter
My app below is a Flame_Flutter screen with Rive animation
class HorizontalAnimComponent extends RiveComponent
with HasGameRef<Aviator>, TapCallbacks {
HorizontalAnimComponent(Artboard ...
1
vote
1
answer
185
views
Flame - onComplete and reset() removed from SpriteAnimation
I used to be able to call
spriteAnimation.reset()
or
spriteAnimation.onComplete = (){}
But once I upgrade to flame 1.8.0, they got removed.
What are the new solutions for the above behaviors?
1
vote
1
answer
97
views
2d game multiplayer rpg with golang and flutter flame
I am working on creating a 2d flutter flame game with multiplayer support. I have a character moving across the map with a joystick. When moving joystick it generates newPosition(Vector2) and newAngle(...
0
votes
1
answer
252
views
How can I change the size of the text in TextComponent using Flutter Flame?
How do you change the size of the text in the TextComponent in Flame? I want to make the text larger
I used the Flame documentation to get this, but I don't know how to modify it for a larger text ...
0
votes
1
answer
149
views
cameraComponent fixedResolution doesn't work right
I have been trying to implement fixedResolution for my game. And the old method works but the new cameraComponent doesn't work fine. When I change the width and height I don't see any changes in my ...
0
votes
1
answer
88
views
State Machine into Flame from Flutter?
just got a Question about the Flame Engine from Flutter.
Does someone know, how i can implement a Game State Machine into Flame? I tried something similar like you see in the code bellow, but when the ...