Talk animation occasionally stops when there is a random loop in the scene (possible bug?) [Edit: FIXED]

  • #10, by fulviovWednesday, 15. July 2015, 01:33 9 years ago
    I think I have found a solution, I am posting it here in case anybody will stumble onto this kind of problem someday.

    To fix it, I have placed all cars at the beginning of the scene at the starting position (which is hidden), preloading all of them. Doing this, the talking animation works just fine when they randomly get moved.

    My guess is that the problem isn't the random number generator, but having a character suddenly instantiated on the scene while the character is talking can stop the talking animation, for some reason.
    When I previously tested with all cars (as suggested by AFRLme), it worked fine because they all got instantiated at once when the scene started, but once I started calling them individually at random the issue appeared again.

    Forum Fan

    119 Posts


  • #11, by afrlmeWednesday, 15. July 2015, 13:59 9 years ago
    I was going to suggest having the cars all at the start oint from the beginning & having them jump back to the start point when done.

    In regards to animations. If they haven't been preloaded & they aren't in the cache then they get loaded frame by frame. I think only the current character (playable character) get automatically loaded into the cache (well the default character animations such as talk, walk & idle. Not sure about manually started character animations). For rest of animations & characters I believe as I mentioned that unless preloaded, that they will load frame by frame.

    Anyway... It's nice that you managed to sort it out yourself! wink

    Imperator

    7278 Posts

  • #12, by LebosteinSunday, 19. July 2015, 06:35 9 years ago
    That auto loading frame by frame method is very nice and comfortable for small animations and single images. But for huge animations with many frames it produces stuttering and destroy the smooth play. It would be nice to have an option to preload specific animations before they start to play.

    Key Killer

    621 Posts

  • #13, by afrlmeSunday, 19. July 2015, 11:32 9 years ago
    The preload animation option was re-introduced back into VS in the last update (current public release - according to the changelog).

    http://www.visionaire-studio.net/news/article/visionaire-stu...

    enabled picture preloader for faster loading of images.


    Also from build 1180 on the team wiki changelog: improvement: re-enable preloader.

    Imperator

    7278 Posts

  • #14, by LebosteinSunday, 19. July 2015, 13:29 9 years ago
    OK, that sounds god. But I have two questions:

    1. "Preload/Unload character" means all animations of the selected character?

    2. If I preload an animation, I have to unload the same animation after leaving the scene? Or these preloaded animations are removed automatically if they are not needed for a long time (like the auto pre-/unloader)

    Key Killer

    621 Posts

  • #15, by afrlmeSunday, 19. July 2015, 13:43 9 years ago
    Manually preloaded animations need to be manually unloaded. Animations regularly loaded will get added to the cache until they are removed at end of scene or get pushed aside to make space for newer animations, I think.

    As for character animations: I believe that the standard animations (idle, talk & walk) for your playable character (not sure about npc characters) are stored in the cache indefinitely. If your character has tons of character animations, I don't really think it's a good idea to preload the character as it will store animations from all outfits associated with that character to the cache (according to the action parts page of the wiki manual - I wrote the page, but I think I mostly rewrote in my own words what it said on the old 2d wiki).

    The case in question in this thread will more likely than not have been lag caused by too many animations on the screen (playing / loading) at the same time. If the system lags then it will still cause slow-down in animations currently on the screen & you will probably experience the mouse cursor moving / jerking slowly across the screen if you try moving it while lag is occurring. All in all it's all down to optimizing your game, to the best of your, or your teams ability, whether that's by scaling down animation sprites, reducing the amount of frames in certain animations, converting images / animations to webp or removing certain non-important animations, images & openGL shader effects entirely, is up to you to figure out what works best for your game. It is after all, all about compromise. Is this specific feature vital to your game? or can it work without it?

    Imperator

    7278 Posts