K
K
Kuusandr2020-05-08 14:52:30
Android
Kuusandr, 2020-05-08 14:52:30

Flutter and Flame. Logical and physical pixels. How does the internal mechanics work?

I smoked the manual and did not understand how flutter + flame works with a physical screen. The manual and roadmap says use tiles and you'll be happy.

I want to write a game on flutter, but I don't understand how to display graphics. If I have an asset formed under 1440x720, and the device, for example, will be 1080x1920? Scale the image myself or the platform will do it for me?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew Nodermann, 2020-05-10
@Lucian

Flame uses canvas for rendering, so you have to scale everything yourself. Calculate aspect ratios, place anchors, bind objects to them. The implementation will depend on the type of game, whether the game has a camera, how it moves, whether the scenes are static, etc.
This is a lot of logic, if you don’t want to suffer, then take Unity. its ecosystem is more mature to meet the challenges you describe.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question