¿Es esta la primera vez que visitas el foro? Si es así te recomendamos que te registres para tener completo acceso a todas las áreas y secciones del foro, así también podrás participar activamente en la comunidad. Si ya tienes una cuenta, conéctate cuanto antes. Iniciar SesiónRegistrarme
Pues eso que nose si alguien me podría pasar un script anti lag pero bueno porque la gran mayoria que me he descargado y los he puesto en mi proyecto ni quitan nada el lagg. Quiero uno que por lo menos funcione porque en mapas pequeños no me pasa nada pero en mapas grandes puff se laggea todo.
La verdad es que no se si habrá uno mejor, pero te dejó este :
Nombre: GameBaker Anti-Event Lag Autor: sandgolem Versión: 1
Spoiler:
Código:
#========================================================================== # ** GameBaker Anti-Event Lag #========================================================================== # Por sandgolem # Basado en el script para RMXP de Near Fantastica # # Versión 1 [VX] # 28 de Enero de 2008 #==========================================================================
#========================================================================== # # Para comprobar actualizaciones o encontar más scripts: # http://www.gamebaker.com/rmvx/scripts/ # Nuestros scripts para RMXP: http://www.gamebaker.com/rmxp/scripts/ # # Instrucciones: http://www.gamebaker.com/rmvx/scripts/e/anti-event-lag.php # Discusión/Help: http://forums.gamebaker.com/showthread.php?t=1242 # #==========================================================================
class Game_CommonEvent alias gamebaker_antilag_commonrefresh refresh def refresh gamebaker_antilag_commonrefresh #if self.trigger == 1 # gamebaker_antilag_add if $game_switches[common_event.switch_id] # gamebaker_antilag_remove if !$game_switches[common_event.switch_id] #else gamebaker_antilag_add if @interpreter gamebaker_antilag_remove if !@interpreter #end end
def gamebaker_antilag_remove return if !$game_map.gb_antilagcommons.include?(@common_event_id) $game_map.gb_antilagcommons -= [@common_event_id] end
def gamebaker_antilag_add return if $game_map.gb_antilagcommons.include?(@common_event_id) $game_map.gb_antilagcommons += [@common_event_id] end end
class Game_Event alias gamebaker_antilag_evrefresh refresh def refresh gamebaker_antilag_evrefresh if @trigger == 3 or @trigger == 4 if !$game_map.gb_antilagevents.include?(@id) $game_map.gb_antilagevents += [@id] end else if $game_map.gb_antilagevents.include?(@id) $game_map.gb_antilagevents -= [@id] end end end end
class Game_Map attr_accessor :gb_antilagcommons, :gb_antilagevents
def gamebaker_antilag?(sg) return false if sg.real_x < @gb_antilagscreen_x or sg.real_x > @gb_antilagscreen_width or sg.real_y < @gb_antilagscreen_y or sg.real_y > @gb_antilagscreen_height return true end
def gamebaker_antilag2?(sg) return @gb_antilagevents.include?(sg.id) end
alias gamebaker_antilag_setupev setup_events def setup_events gamebaker_antilag_getscreen @gb_antilagevents = [] @gb_antilagcommons = [] if !@gb_updatecommons gamebaker_antilag_setupev end
alias gamebaker_antilag_ue update_events def update_events return gamebaker_antilag_ue if $game_switches[GameBaker::AntiLagDisable] gamebaker_antilag_getscreen for i in @events.values i.update if gamebaker_antilag?(i) or @gb_antilagevents.include?(i.id) end for i in 0...@gb_antilagcommons.size @common_events[@gb_antilagcommons[i]].update end end end
class Spriteset_Map alias gamebaker_antilag_uc update_characters def update_characters return gamebaker_antilag_uc if $game_switches[GameBaker::AntiLagDisable] for sprite in @character_sprites if $game_map.gamebaker_antilag?(sprite.character) or $game_map.gamebaker_antilag2?(sprite.character) sprite.update end end end end
#========================================================================== # End #==========================================================================
Bueno pruebo y te aviso, pero solo con ponerlo encima de main ya funciona? Es que yo he probado la mayoria pero vi uno que explicaba algo, que si se te quedaba muy lagg un mapa llamabas una script desde el evento y hacia que fuese menos lagg. Nose si este tambien se podra hacer esto.