-1

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, HudButtonComponent? Is it needed? How does Flame handle showing the game in such cases?

How would you recommend to make a user interface for a Flame game? Flutter controls can be used, too, but they somehow do not fit into a game. Games usualy use custom drawn UI controls.

nobody
  • 64
  • 5
  • 15

1 Answers1

1

Flame doesn't have that built-in, but like you mentions you can use Flutter widgets as overlays so you can have clickable images that can be picked depending on the dpi.

You can also build it yourself in Flame by checking the resolution and taking different sprites depending on the devicePixelRatio.

spydon
  • 9,372
  • 6
  • 33
  • 63