• 2D
  • Can I use vector graphic in godot to automatically scale according to the resolution of the device?

I am making an android game for the first time in godot. Can I use .svg? and does it scale automatically according to the resolution? If yes, is there an easy to understand tutorial or documentation that I can refer to?

Thanks in advance =) and sorry if the question is stupid :'(

Reduz mentioned there is nothing that should stop SVG files from being converted into Mesh2D nodes, but no one has worked on it yet.

Last I knew, SVG files in Godot are converted/rasterized when imported into a Godot project. I do not think there is any way to resize them when the game is running, as I believe the SVG to rasterized image process happens in the Godot editor.

I have not personally used SVG files in Godot myself, but this video by Pigdev covers some tips on using Vector Art (SVG) in Godot, which might be helpful:

(Also, no reason to apologize! It is not a stupid question. You cannot know what you don't know :smile:)

@TwistedTwigleg said: Reduz mentioned there is nothing that should stop SVG files from being converted into Mesh2D nodes, but no one has worked on it yet.

Last I knew, SVG files in Godot are converted/rasterized when imported into a Godot project. I do not think there is any way to resize them when the game is running, as I believe the SVG to rasterized image process happens in the Godot editor.

I have not personally used SVG files in Godot myself, but this video by Pigdev covers some tips on using Vector Art (SVG) in Godot, which might be helpful:

(Also, no reason to apologize! It is not a stupid question. You cannot know what you don't know :smile:)

Hey thanks. I found that video very useful. Also I have set my resolution to 720p. The only thing I'm afraid of is that it won't scale to 1080p or higher resolutions. Should I set it to 1080p or is 720p good enough for Android?

@Anderoo99 said:

@TwistedTwigleg said: Reduz mentioned there is nothing that should stop SVG files from being converted into Mesh2D nodes, but no one has worked on it yet.

Last I knew, SVG files in Godot are converted/rasterized when imported into a Godot project. I do not think there is any way to resize them when the game is running, as I believe the SVG to rasterized image process happens in the Godot editor.

I have not personally used SVG files in Godot myself, but this video by Pigdev covers some tips on using Vector Art (SVG) in Godot, which might be helpful:

(Also, no reason to apologize! It is not a stupid question. You cannot know what you don't know :smile:)

Hey thanks. I found that video very useful. Also I have set my resolution to 720p. The only thing I'm afraid of is that it won't scale to 1080p or higher resolutions. Should I set it to 1080p or is 720p good enough for Android?

I do not know, I have only done a little bit of Android development (and a tad more iOS development). I would say that 720p is probably good enough for most devices, especially if you are targeting phones, which have small screens. If you are targeting tablets and/or larger devices, then I might consider 1080p just to be on the safe side.

a year later

@TwistedTwigleg said: […] I would say that 720p is probably good enough for most devices, especially if you are targeting phones, which have small screens. If you are targeting tablets and/or larger devices, then I might consider 1080p just to be on the safe side.

Manufacturers started deeming it necessary to make their most expensive phones with a 4K screen. And the cheaper devices are becoming more powerful. As a result, graphics rasterized for 720p screens will result in a blurry mess on the now ubiquitous 1080p screens.

There's 3 options on how we could handle importing vector graphics, with their pros and cons: - Import for 4K screens ( +⃝ Sharp on 4K screens, -⃝ Lower Performance on less powerful devices where most of them have a 1080p screen - Import for 1080p screens ( +⃝ Better performance, still sharp on 1080p screens, -⃝ Blurrier Visuals on 4K screens) - Import upon the first time opening the app ( +⃝ Good performance on both 1080p and 4K devices, -⃝ Long waiting time before the first time playing )

Displaying the SVGs natively would make them even sharper and more future-proof (in case that the game will eventually be played on an 8K or even 32K screen), but it could result in really bad performance when many SVGs are used. For my current project, I'm remaking the SVGs as MeshInstance2Ds or Polgon2Ds, where the slight Jagginess is well worth the much-increased performance (And there'll always be the possibility of adding more detail in a later version with the help of the reference SVGs. Plus points if your game's visual style allows for many intentionally Low-Poly objects).