Background animations - optimalization

  • #1, by gustyTuesday, 10. December 2013, 17:10 11 years ago
    http://s23.postimg.org/z6jc2qigb/anims01.jpg
    Please look at the scene example on the top. Around the path, there are some threes, plants, grass, flowers and stuff. Let say they are all moving in the wind, I'm talking about 10 frames of repeating animation here. My question is what is a better approach in matter of performance, RAM, VRAM, memory keeping and stuff like that:

    A) upload to Visionaire individual little images of each object (each one is a single PNG/TGA file with alpha mask)
    http://s23.postimg.org/f7yvmm8dn/anims02.jpg

    or

    B) use ONE BIG image (remember, 10 frames of animation) where is a lot of blank space (=alpha mask space)
    http://s23.postimg.org/otx1gnox7/anims03.jpg

    So question is really simple: Should I cutting my graphics and animations on little piecies or should I using less files which are bigger?

    Forum Fan

    159 Posts


  • #2, by gustyTuesday, 10. December 2013, 17:34 11 years ago
    Well, little less obvious example would be: two trees next to each other, there is 200 pixels space between them. Possible solutions:

    1) one image that covers both of them (please again consider their animation - it is not a standalone image), so there is some blank space (alpha mask) around

    2) two separate images

    I hope you understand what I'm asking for smile. I'm not a programmer at all, I just want to optimize my game as good as I can wink

    Forum Fan

    159 Posts

  • #3, by afrlmeTuesday, 10. December 2013, 18:30 11 years ago
    the larger the image, the larger the file size & the more memory etc that it will require.

    best to split the animations into single objects & if possible you could create them as chunks & if you really, really, really wanted to then you could create multiple versions of the animations that contain more or less frames which could play based on some option the player has chosen like: low/medium/high background or something. this would make the file size of your whole game bigger but would probably allow people on not so powerful machines to play your game ok too.

    Also another method for keeping consumption low, is for animations such as fog, rain, snow etc or animations that are quite far back in the background & do not matter if they look a little blurred... is to create the animations at half the size that they need to be & then scale them up to 200% with a simple line of lua script whenever the animation is called.

    Imperator

    7285 Posts

  • #4, by gustyWednesday, 11. December 2013, 19:48 11 years ago
    Thank you! So splitting the animations it is!


    Well I would like to ask you a question about the rain. I want rain in my game. Not fog or snow, just a rain. I briefly tried VS particles and I don't like it at all. I would rather use an ordinary object and its animation. The thing is I don't want some "background blurry rain" but I want raindrops in front of everything - characters, objects, background, everything. And I'm using 1920x1080 resolution. So what would you suggest? It is a fact that raindrops falls kind of quickly so there is no point to use 1920x1080 size image. But what about the frames count? Please share some thoughts on that.

    Forum Fan

    159 Posts

  • #5, by afrlmeThursday, 12. December 2013, 01:59 11 years ago
    I'm not very savvy on the particle system myself as I've not looked into much (yet) but David has added an in depth guide for the particle system to the new wiki @ http://wiki.visionaire-tracker.net

    I'm not really sure how you would go about sorting it out with animations as I think it would require a load of work on your part in drawing the animations in the first place & it would probably require a fair bit of juice (so to speak) to actually run as I reckon you would probably need to create multiple animations assigned to different z-depths to make it look good rather than the rain just floating in front of the camera.

    I would recommend creating the animations in small chunks though & then using an action to set the next chunk playing after the current one ends. One of the good things about using animation chunks is that you can randomize the order in which they play with a bit of lua or value trickery - if the order the animations play is not important, of course.

    The blurry thing is a matter of opinion but you have to think in terms of how cameras work too (or our eyes) - things close to the camera often tend to lose focus & things too far away are often dark, hazy, etc, but that's all just a matter of perspective.

    Imperator

    7285 Posts