10
msdsk
11d

Is there any game engine with actually good support for SVG? I want to do some 2D animations but I don't want to do it with goddamn png sprites like some caveman.

Comments
  • 1
    Not as far as I'm aware, there are a few vector libraries but they all suck and have no features

    I'm considering biting the bullet and just going full skia for my engines ui
  • 0
    Also slug seems good (https://sluglibrary.com/ ) but it's "contact us" so yeah...
  • 0
    this is a very very very very very very bad idea.

    also, the browser. And raphael.
  • 0
    Flash was most popular vector video and game engine, now revived with Ruffle. After that everyone forgot about 2D vector graphics and only use 3D vector graphics.
  • 0
  • 0
    svg looks like polygon rendering so a translation layer might not be that complicated to make
  • 0
    @jestdotty SVG performance depends on the number of SVG objects rendered. Unless your objects are plain black shapes, you’re going to need a lot of such objects. Want a piece of armor that looks even remotely recognizable? That would be 36 objects please. It just doesn’t scale
    I have a majestic SVG pic with every single commune of France displayed with its borders. When I open it, my M1 Mac shits itself.
    There are just ~35,000 communes in France. 35k polygons is a laughable number, yet it’s enough to push a modern computer to its limits. Now imagine animating that!
  • 0
    @kiki well if the svg isn't moving cache all the pixels

    I forget what it's called

    basically you render it to a layer and then just print the layer over and over again

    simple svgs might be faster than the layer trick tho

    I remember making a space game and I wanted to draw all the spaceships in SVG, but those aren't gonna be that complex cuz it was basically asteroids but maybe like a little more fancy
  • 0
    @retoor you send instructions to the gpu to draw over previous things you drew

    you can speed this up by not overwriting old pixels you drew

    so if you can know the end state (or a later state to skip the calculation steps) of all the pixels somehow you can skip the drawing over the same pixel x10-x200 steps and just cache the final pixel and only draw it once instead of x10-x200

    the benefit of svg is that you always get clean pixel-perfect images. because you just have coordinates. the resolution is irrelevant, so svg will always draw at the perfect resolution on any system (unless your SVG rendering software is doing it wrong I guess, whatever)
    but complex SVG will draw over the same pixels it drew on multiple times. it's good for making rendering meshes I guess though. whatever mesh means but maybe I'm using that word right

    also for simple games it's fine. like svg arcade games
  • 0
    ok meshes are apparently svg coordinates

    so it's good for "caching the texture" not "caching the rendering mesh" then

    thought rendering mesh was like differently sized textures for different resolutions

    I hate words
  • 0
    @retoor afaik 3d models are vector and textures are raster. So it’s just SVG, not vector graphics in general.
  • 0
    SVG has a lot of features graphics cards really hate, but a subset of SVG might be viable.
  • 0
    Godot/Redot have SVG support, for whatever that's worth...
  • 0
    whenever you're rendering, in the end, everything ends up as bitmap one way or the other. just accept the facts of the world.
Add Comment