Feature: UI: Make UI elements SVGs for easy scaling

Discussion in 'Planetary Annihilation General Discussion' started by coldboot, September 1, 2012.

  1. coldboot

    coldboot Active Member

    Messages:
    447
    Likes Received:
    112
    This was first mentioned in the Barrier Free Gaming thread, but I'll go into detail here.

    Making UI elements SVG graphics will ensure they're scalable and make it easier for people to use standard tools to draw them.

    The way SVGs tend to look also seem to fit well with the game's art. Unit icons could easily be drawn to look cartoony so they're easier to tell the difference between. Traditionally all TA-family games have had pretty cryptic unit icons that didn't scale well with higher resolutions.

    Would you consider using SVGs, or do you have another format in mind already?
  2. neutrino

    neutrino low mass particle Uber Employee

    Messages:
    3,123
    Likes Received:
    2,687
    Not a fan of SVG after previous experiences.
  3. coldboot

    coldboot Active Member

    Messages:
    447
    Likes Received:
    112
    What didn't you like about SVG?

    What did you have in mind instead? Can you still make the UI scalable?
  4. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    SVG and other vector graphics formats are awesome for variable resolution graphics. They're generally terrible for performance. Sure there's demos of GPU accelerated SVG graphics running at 200 fps, but that's with the GPU not doing anything else and that's on a recent high end graphics card.

    Even Apple with their big push to accommodate super high resolutions for iOS and OSX use normal bitmap graphics, they just have their UI art at extremely high resolution even though the source files are almost all vector based.
  5. superroach

    superroach Member

    Messages:
    72
    Likes Received:
    4
    Was going to post in against svg as well. I didn't know about performance, but svg isn't a magical fix for resolution independence.

    Take battlefield for an example, which like Skyrim uses basically flash in a wrapper to give us the layout components. It looks nice I guess, however it does not accommodate larger resolutions. How come? Because the layout is fixed.

    It takes massive effort to actually cater for the higher resolutions then - you will likely want a different interface at that hd resolution.
  6. coldboot

    coldboot Active Member

    Messages:
    447
    Likes Received:
    112
    I agree that wasting GPU cycles on real-time rendering of SVG graphics isn't a good idea, but could you use SVG as the source files and have the game render them at various resolutions so the UI elements could be stretched to various sizes during game-time?

    It would be easier for modders to make good-looking UI elements, and more flexible for players who want to resize them in-game.

    If you don't think that's feasible, is there another way you plan to do scalable UI elements or do you not plan to support it at all?
  7. linecircle

    linecircle Member

    Messages:
    83
    Likes Received:
    0
    I think that scalable UI is an important feature, especially for a game that seeks to make use of large and multiple* screens and especially for future-proofing: the UI is meant for the eyes of the player and our screen capabilities, distance we sit from the screen, and visual acuity are all different from one another.

    It would be nice to see both vector graphics and bitmaps supported natively. However, this really only provides marginal fun improvement. A sufficiently large bitmap is going to look fine now and for the near future. Scaling downards, vector graphics do not give much additional benefit. Those who wish to work with vector graphics now can simply render them into (large enough) bitmaps outside the game. I would rather development time not be spent on such a fringe feature. Perhaps it could be considered in future patches.

    * If you want to really go for that extra mile, each individual screen uses its own scaling factor. That way someone could, say, have a setup with several flat panels on their desktop and additional images projected onto big 'mission control'-type screens behind it. Or more down to earth, someone could just be pairing two screens with different resolutions.
  8. nlspeed911

    nlspeed911 Member

    Messages:
    482
    Likes Received:
    18
    Yeah, this would be another important feature, in my opinion.
  9. coldboot

    coldboot Active Member

    Messages:
    447
    Likes Received:
    112
    uber_neutrino, bgolus: How about rendering the SVG once at different sizes and saving the bitmaps for runtime use? Or rendering the SVG every time the user scales their UI, then saving that particular size of bitmap for use.

Share This Page