Animatable HUD

    Joined
    Jan 14, 2014
    Messages
    434
    Reaction score
    201
    • Legacy Citizen 6
    • Community Content - Silver 1
    A few days ago, I attempted to create a simple HUD, an animated one (below).



    However, when I replaced the file in the image resource folder and ran the game, it appeared as a single image form the first frame. No animation whatsoever. Is there any way to incorporate an animated HUD into the game, and if not, could this be incorporated easily?
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Is there any way to incorporate an animated HUD into the game, and if not, could this be incorporated easily?
    Theoretically yes.

    A gif is just a 1x5y or 5x1y sectors Picture where a 1x1 sector (which is as big as one picture) is choosen for each frame.

    offset = size * (frameNumber % numberPictures + firstFrameNumber)
    x|y = x|y + offset

    It just needs to be implemented. And the GPU-RAM must hold all pictures of an animationi (which may be the bigger problem, dependent on gif length and number of animated elements or big pictures.)
     

    Reilly Reese

    #1 Top Forum Poster & Raiben Jackpot Winner
    Joined
    Oct 13, 2013
    Messages
    5,140
    Reaction score
    1,365
    • Legacy Citizen 8
    • Thinking Positive
    • Purchased!
    Yeah gif is way to go. May not be supported though
     
    Joined
    Sep 4, 2013
    Messages
    723
    Reaction score
    200
    • Purchased!
    • Legacy Citizen 5
    Theoretically yes.

    A gif is just a 1x5y or 5x1y sectors Picture where a 1x1 sector (which is as big as one picture) is choosen for each frame.

    offset = size * (frameNumber % numberPictures + firstFrameNumber)
    x|y = x|y + offset

    It just needs to be implemented. And the GPU-RAM must hold all pictures of an animationi (which may be the bigger problem, dependent on gif length and number of animated elements or big pictures.)
    Why the hell You make calculations to check if game is able to handle animated image.
    If You'r computer is newer than this:


    Then You have (50+(2*25))% chances that Your PC will handle it.
     
    Joined
    May 26, 2013
    Messages
    1,176
    Reaction score
    939
    • Legacy Citizen 7
    • Modder
    • Top Forum Contributor
    I have also suggested APNG (Animated PNG) support for Starmade. It provides more color, better transparency masks and whatnot.
    GIF support is a step in the right direction, however. I too would like to see more animated elements.
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    If the dev didn't implement animation cycling for pics in a given function (in this case, HUD images), then the system will display just the first frame of an animated image. You'll see this with less sophisticated image viewers versus better ones. Better ones will show the complete animated image, while their lesser cousins will simply display the first frame, because they were only designed to show a single, static image.

    Bring on the lovely animated HUDs! I love moving images!

    Edit: APNGs sounds like a nice option, but for maximum compatibility, it should at least support animated GIF.

    Based on a another thread about warp drive block animations not switching orientation, it sounds like the animation system might get an upgrade in a future update, so this sort of thing might go along with that.
     
    Joined
    Sep 4, 2013
    Messages
    723
    Reaction score
    200
    • Purchased!
    • Legacy Citizen 5
    Schema can even support animated bmps if He want to. Because if You create Your own engine then You don't need to restric yourself :P