Animation Flicker when looping on the map.

Hi folks,

I've recently been trying some new techniques to make map building easier for me (well, new techniques to me, I'm sure this is old news to everyone else).

So I built a windmill, and I wanted to make the blades of the windmill a looping animation. I then created a Parallel Process event that calls the animation in a loop. For the most part, this technique works, and I get a pretty nice looking windmill with turning blades - with one exception.

At the moment the animation loops, there is a split second "flash" where the animation disappears. It then reloads as per the loop's commands and runs again - followed by another split second disappearance. It's jarring, and ruins the effect.

I realize that animations appear to be more for the use of battle effects and not map creation, but I'm trying to think outside of the box here without using any scripting. Does anyone know if there's a way to remove this momentary disappearance?

(Sorry for the lack of pictures, I am not at my home computer.)
why not use a charset of a windmill for your event and simply set movement on ?
I guess that probably would be easier, huh? I'll probably have to go that route.

For the sake of argument though, the original questions still stands. Is there any way to loop an Animation? Or are they strictly used for linear sequences? If the answer is no, that's fine. Clearly there are other ways to solve this problem.
As far as 'I' know, there are some faults with the way that animations are set up. This causes visual bugs when alot / continuous animations are used on screen, such as character movement becoming 'jumpy' at the end of the animation sequence.

There have been scripts to fix this issue, such as the one below...

Spoiler
if true # Script By Dekita // # http://dekitarpg.wordpress.com# All Rights Reserved..# # $game_system.anti_lag = Boolean# ^- Event anti Lag## $game_system.anti_lag_ani = Boolean# ^- Animation anti Lagmodule Anti_Lag   Event_Update_Range = 3  Event_Anti_Lag_On  = true  Anima_Anti_lag_On  = true end#===============================================================================module SceneManager#===============================================================================  #-----------------------------------------------------------------------------  # Alias List  #-----------------------------------------------------------------------------  class << self    alias :call_antilag  :call    alias :goto_antilag  :goto  end  #-----------------------------------------------------------------------------  # Call Scene  #-----------------------------------------------------------------------------  def self.call(scene_class)    call_antilag(scene_class)    dispose_ani_crap  end    #-----------------------------------------------------------------------------  # Goto Scene  #-----------------------------------------------------------------------------  def self.goto(scene_class)    goto_antilag(scene_class)    dispose_ani_crap  end  #-----------------------------------------------------------------------------  # Dispose Ani Crap  #-----------------------------------------------------------------------------  def self.dispose_ani_crap    return if $game_temp.ani_crap == nil    $game_temp.ani_crap.each do |ani|      ani.dispose    end    $game_temp.ani_crap = nil  endend#===============================================================================class Game_Temp#===============================================================================  #-----------------------------------------------------------------------------  # Alias List  #-----------------------------------------------------------------------------  alias :init_abs_antilag :initialize  #-----------------------------------------------------------------------------  # Pi Variables  #-----------------------------------------------------------------------------  attr_accessor :ani_crap  #-----------------------------------------------------------------------------  # Initialize  #-----------------------------------------------------------------------------  def initialize    @ani_crap = []    init_abs_antilag  end   end#===============================================================================class Game_System#===============================================================================  #-----------------------------------------------------------------------------  # Pi Variables  #-----------------------------------------------------------------------------  attr_accessor :anti_lag  attr_accessor :anti_lag_ani  #-----------------------------------------------------------------------------  # Initialize  #-----------------------------------------------------------------------------  alias :initantilag :initialize  def initialize    @anti_lag     = Anti_Lag::Event_Anti_Lag_On    @anti_lag_ani = Anti_Lag::Anima_Anti_lag_On    initantilag  end   end#===============================================================================class Game_Map#===============================================================================  #-----------------------------------------------------------------------------  # Alias List  #-----------------------------------------------------------------------------  alias :setup_de_antilag :setup  #-----------------------------------------------------------------------------  # Setup  #-----------------------------------------------------------------------------  def setup(map_id)    SceneManager.dispose_ani_crap    setup_de_antilag(map_id)  endend#===============================================================================class Game_Event < Game_Character#===============================================================================  #-----------------------------------------------------------------------------  # Pi Variables  #-----------------------------------------------------------------------------  attr_reader :can_update  #-----------------------------------------------------------------------------  # Alias List  #-----------------------------------------------------------------------------  alias :anti_lag_init_GE :initialize  alias :updt_anti_lag    :update  #-----------------------------------------------------------------------------  # Initialize  #-----------------------------------------------------------------------------  def initialize(map_id, event)    @can_anti_lag = $game_system.anti_lag    @can_update = true    if $game_map.loop_horizontal? or $game_map.loop_vertical?      @can_anti_lag = false    end    anti_lag_init_GE(map_id, event)  end  #-----------------------------------------------------------------------------  # Update  #-----------------------------------------------------------------------------  def update    update_anti_lag    return unless @can_update    updt_anti_lag  end  #-----------------------------------------------------------------------------  # Update Anti Lag  #-----------------------------------------------------------------------------  def update_anti_lag    if @can_anti_lag != $game_system.anti_lag      @can_anti_lag = $game_system.anti_lag      if $game_map.loop_horizontal? or $game_map.loop_vertical?        @can_anti_lag = false      end    end    event_is_on_screen?  end  #-----------------------------------------------------------------------------  # Event Is On Screen ?  #-----------------------------------------------------------------------------  def event_is_on_screen?    return unless @can_anti_lag    w = Graphics.width / 32    h = Graphics.height / 32    @can_update = false    os = Anti_Lag::Event_Update_Range    px = ($game_map.display_x).truncate    py = ($game_map.display_y).truncate    dx = @x - px    dy = @y - py    if dx.between?(0-os,w+os) && dy.between?(0-os,h+os)      @can_update = true    end  end end#===============================================================================class Sprite_Base < Sprite  #===============================================================================  #-----------------------------------------------------------------------------  # Alias List  #-----------------------------------------------------------------------------  alias :dispose_antilagani :dispose_animation  #-----------------------------------------------------------------------------  # Dispose Animation  #-----------------------------------------------------------------------------  def dispose_animation    if $game_system.anti_lag_ani      make_ani_into_crap      return    end      dispose_antilagani  end  #-----------------------------------------------------------------------------  # Make Animation Garbage  #-----------------------------------------------------------------------------  def make_ani_into_crap    $game_temp.ani_crap = [] if $game_temp.ani_crap == nil    if @ani_bitmap1      @@_reference_count[@ani_bitmap1] -= 1      if @@_reference_count[@ani_bitmap1] == 0        $game_temp.ani_crap << @ani_bitmap1      end    end    if @ani_bitmap2      @@_reference_count[@ani_bitmap2] -= 1      if @@_reference_count[@ani_bitmap2] == 0        $game_temp.ani_crap << @ani_bitmap2      end    end    if @ani_sprites      @ani_sprites.each {|sprite| sprite.dispose }      @ani_sprites = nil      @animation = nil    end    @ani_bitmap1 = nil    @ani_bitmap2 = nil  endend#===============================================================================class Sprite_Character < Sprite_Base#===============================================================================  #-----------------------------------------------------------------------------  # Alias List  #-----------------------------------------------------------------------------  alias :anti_lag_update :update  #-----------------------------------------------------------------------------  # Update  #-----------------------------------------------------------------------------  def update    if $game_system.anti_lag and @character.is_a?(Game_Event)      check_can_update_sprite      return unless self.visible    end    anti_lag_update  end  #-----------------------------------------------------------------------------  # Update  #-----------------------------------------------------------------------------  def check_can_update_sprite    if self.visible and [email protected]_update      reset_sprite_animation    end            self.visible = @character.can_update             end  #-----------------------------------------------------------------------------  # Reset Sprite Animation  #-----------------------------------------------------------------------------  def reset_sprite_animation    dispose_animation  end end#===============================================================================class Scene_Base#===============================================================================  #-----------------------------------------------------------------------------  # Alias List  #-----------------------------------------------------------------------------  alias :term_antilag :terminate  #-----------------------------------------------------------------------------  # Terminate  #-----------------------------------------------------------------------------  def terminate    term_antilag    SceneManager.dispose_ani_crap  end endend
If that works, great, if not, then spritesheets are probably your best option.
Thanks for the heads up. I'll probably try it both ways and see what works best. This has certainly been a learning experience. Much appreciated!
if ur gonna use looping animations, try out Shaz' looping animation script... since the default system seems to put a 1 frame delay between playing animations on a sprite
Excellent, I'll look into it! It makes me feel a little better at least to know that the one frame delay is a standard, and not something I was doing wrong. I appreciate all the replies.
it sometimes even stops (but the sound still goes) when you use a lot of that command in succession...

Original thread: https://forums.rpgmakerweb.com/threads/animation-flicker-when-looping-on-the-map.24482/