Preload character = preload all character animations?

  • #1, by LebosteinWednesday, 25. February 2015, 08:25 9 years ago
    Is that correct?

    If I preload my character at the beginning of the game and I walk the first time, the engine stutters some seconds. It seems the walking animations are loaded 'on the fly' while the character is walking. But I thought all character animations are loaded already. Or I am wrong?

    Key Killer

    621 Posts


  • #2, by SimonSWednesday, 25. February 2015, 15:23 9 years ago
    Preloading is not active at the time in favour of the optimized loading system in Vis 4. As many guys have been asking about it, I'm currently not sure if I'll be removing it completely or rework it.

    Thread Captain

    1581 Posts

  • #3, by LebosteinWednesday, 25. February 2015, 15:32 9 years ago
    Can anybody explain the "optimized loading system"? It seems that Visionaire loads graphics and sounds in that moment in which they are needed. This always leads to small stutters over and over again. I notice that clearly in case of mouseover graphics (to highlight something if I touch a button for example). Everytime I enter the mouse area, Visionaire seems load the highlighted graphic again - even if only a few seconds between two highlight actions.

    What about preload animation? Is that deactivated in v4 too?

    PS: You should thinking about a fundamental manual or documentation to Visionaire. There are so many things which need to be considered.

    Key Killer

    621 Posts

  • #4, by afrlmeWednesday, 25. February 2015, 16:20 9 years ago
    One of the problems with the documentation is that the engine has changed a fair bit since 3.7.1 to 4.x. Which is one of the reasons I held back on writing too much of it, as I didn't want to have to waste time rewriting it all again.

    The optimized system loads frame by frame. It should retain loaded frames in memory until the cache you set gets filled up. However the problem with this is, that if you have loads of animations playing at the same time & the file-size of each frame is quite large, then it will cause a bit of lag. The idea is to try to optimize your animations as best as you can.

    * don't create them with the same canvas size as the scene resolution. Sure it's only a few kb difference here & there, but it all adds up.

    * consider using webp format for the final images instead of png as the quality is pretty much the same (I can't tell the difference between a png file & a webp file @ quality 10), however the webp file will probably be at least 1/4 to 3/4 the file-size, which will reduce loading time per frame / animation.

    * do not use duplicate frames in your animations to create pauses between frames. Instead use the set pause for individual frames option. Since 4.x, you can now set both a global value (-1) & custom frame delay values.

    * for environment animations & animations that don't need to be super sharp, consider creating them at 1/4 or 1/2 the intended actual size & using Lua script to scale them up to actual size.

    All of the things I've mentioned are great for optimizing your animations / images & speeding up your game.

    Imperator

    7278 Posts

  • #5, by AkcayKaraazmakWednesday, 25. February 2015, 16:55 9 years ago
    Thank you so much Lee. Could you please write the code for scaling the animations with lua? Lets say we have a waterfall animation with the obeject name waterfall. What code and where we should write it?

    Cheers smile

    Great Poster

    440 Posts

  • #6, by afrlmeWednesday, 25. February 2015, 18:49 9 years ago
    To scale an animation, it has to be active. I recommend when scaling animations that you add it into the first frame of your animation inside an execute a script action part, but only if the animation is playing in order rather than random. If random then I recommend adding an execute a script action part directly after starting the animation or in an at begin of scene action if the animation is already playing on scene load.

    ActiveAnimations["animation_name"].AnimationSize = 200 -- scale animation_name to 200%
    


    Quick note: scale value is percentage based. So if you scaled the animation in your graphics program down to 50% of intended size then you would scale it up by 200%. If you scaled down to 25% then you would scale up to 400%.

    Imperator

    7278 Posts

  • #7, by AkcayKaraazmakWednesday, 25. February 2015, 19:04 9 years ago
    Thats great Lee, thank you mate!

    Great Poster

    440 Posts

  • #8, by LebosteinMonday, 09. March 2015, 11:52 9 years ago
    It is possible to mark action parts with "(Vis 3.x only)" that I can see wich action parts with Vis 4 have no effect?

    Key Killer

    621 Posts

  • #9, by afrlmeMonday, 09. March 2015, 12:22 9 years ago
    I don't understand what you are asking.

    Imperator

    7278 Posts

  • #10, by LebosteinMonday, 09. March 2015, 12:28 9 years ago
    For example the "preload character" action part is not active in Vis 4. See second post from SimonS.

    Key Killer

    621 Posts

  • #11, by afrlmeMonday, 09. March 2015, 12:37 9 years ago
    Ah ok. I guess those action parts should probably be removed. Although I guess it was left in case they wanted to reintroduce support for pre-loading again in a future release.

    Imperator

    7278 Posts