TurboWarp / desktop

A better offline editor for Scratch 3.
https://desktop.turbowarp.org/
GNU General Public License v3.0
379 stars 90 forks source link

is vector better than png #615

Open Djidjey opened 1 year ago

Djidjey commented 1 year ago

Good morning. I was wondering, I have the impression that putting the images in vector (.svg) slows down my game much more.. But I'm not sure.

Would putting the images in .png be better for my game?

Best regards

Mickmick21 commented 1 year ago

yes, pngs are only colors. Svgs uses a renderer, this is why the quality is better

GarboMuffin commented 1 year ago

if you have not actually tested this or are familiar with how the renderer actually works (because that's what matters -- not theories), please refrain from making conclusive statements

the answer is that it's complicated due to the way SVGs can be lazily uploaded to the GPU while bitmaps are eagerly uploaded (again, complicated). But bitmaps are always uploaded at 1x resolution while SVGs may be uploaded at larger resolutions. I don't have any real data at this moment as we have played with bitmap loading for a while to try to find a balance between load time/avoiding bugs/memory usage

proper lazy loading will make the difference largely unimportant for your game anyways