当一个地图事件多的话会很卡 ! 有没有什么脚本可以消除这种状态! 我搜索了一下!但是用上之后都是脚本错误!貌似不兼容还是?
# ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■#■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■# ■ MOG - XAS反延迟 VX (V1.0)#■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■# ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■# 作者 Moghunter# [url]http://www.atelier-rgss.com[/url]#●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●# 开启XAS系统的反延迟。#==============================================================================# 用下面这条指令来开启或关闭反延迟系统。## $game_system.anti_lag = true#==============================================================================#=beginmodule XAS_ANTI_LAG #在屏幕外刷新的范围。 UPDATE_OUT_SCREEN_RANGE = 4end #==============================================================================# ■ Game_System#==============================================================================class Game_System attr_accessor :anti_lag #-------------------------------------------------------------------------- # ● 初始化 #-------------------------------------------------------------------------- alias mog_antilag_initialize initialize def initialize @anti_lag = true mog_antilag_initialize end end #==============================================================================# ■ Game_Character#==============================================================================class Game_Character #-------------------------------------------------------------------------- # ● 检查屏幕上的事件 #-------------------------------------------------------------------------- def update_anti_lag unless $game_system.anti_lag @can_update = true return end anti_lag_event_on_screen end #-------------------------------------------------------------------------- # ● 屏幕上的事件 #-------------------------------------------------------------------------- def anti_lag_event_on_screen @can_update = false if anti_lag_need_update_out_screen? @can_update = true return end out_screen = XAS_ANTI_LAG::UPDATE_OUT_SCREEN_RANGE px = ($game_map.display_x / 256).truncate py = ($game_map.display_y / 256).truncate distance_x = @x - px distance_y = @y - py if distance_x.between?(0 - out_screen, 16 + out_screen) and distance_y.between?(0 - out_screen, 12 + out_screen) @can_update = true end end #-------------------------------------------------------------------------- # ● 屏幕上的事件 #-------------------------------------------------------------------------- def anti_lag_need_update_out_screen? if self.force_update return true end if self.battler != nil if self.battler.sensor_range >= 17 return true end end return false end #-------------------------------------------------------------------------- # ● 屏幕外的事件效果 #-------------------------------------------------------------------------- def execute_effects_out_screen return if erased if self.battler != nil self.erase if self.battler.dead? end if self.tool_id > 0 self.action.duration = 1 $game_system.tools_on_map.delete(self.tool_id) self.erase end end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- alias mog_anti_lag_update update def update unless self.is_a?(Game_Player) update_anti_lag unless @can_update execute_effects_out_screen return end end mog_anti_lag_update endend #==============================================================================# ■ Sprite Character#==============================================================================class Sprite_Character < Sprite_Base #-------------------------------------------------------------------------- # ● 检查是否可以刷新精灵 #-------------------------------------------------------------------------- def check_can_update_sprite if self.visible and @character.can_update == false reset_sprite_effects end self.visible = @character.can_update end #-------------------------------------------------------------------------- # ● 重置精灵效果 #-------------------------------------------------------------------------- def reset_sprite_effects dispose_animation end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- alias mog_anti_lag_update update def update if $game_system.anti_lag check_can_update_sprite return unless self.visible end mog_anti_lag_update end end $mog_rgss2_xas_anti_lag = true#=end
# ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ #■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ # ■ MOG - XAS反延迟 VX (V1.0) #■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ # ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ # 作者 Moghunter # [url]http://www.atelier-rgss.com[/url] #●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● # 开启XAS系统的反延迟。 #============================================================================== # 用下面这条指令来开启或关闭反延迟系统。 # # $game_system.anti_lag = true #============================================================================== #=begin module XAS_ANTI_LAG #在屏幕外刷新的范围。 UPDATE_OUT_SCREEN_RANGE = 4 end #============================================================================== # ■ Game_System #============================================================================== class Game_System attr_accessor :anti_lag #-------------------------------------------------------------------------- # ● 初始化 #-------------------------------------------------------------------------- alias mog_antilag_initialize initialize def initialize @anti_lag = true mog_antilag_initialize end end #============================================================================== # ■ Game_Character #============================================================================== class Game_Character #-------------------------------------------------------------------------- # ● 检查屏幕上的事件 #-------------------------------------------------------------------------- def update_anti_lag unless $game_system.anti_lag @can_update = true return end anti_lag_event_on_screen end #-------------------------------------------------------------------------- # ● 屏幕上的事件 #-------------------------------------------------------------------------- def anti_lag_event_on_screen @can_update = false if anti_lag_need_update_out_screen? @can_update = true return end out_screen = XAS_ANTI_LAG::UPDATE_OUT_SCREEN_RANGE px = ($game_map.display_x / 256).truncate py = ($game_map.display_y / 256).truncate distance_x = @x - px distance_y = @y - py if distance_x.between?(0 - out_screen, 16 + out_screen) and distance_y.between?(0 - out_screen, 12 + out_screen) @can_update = true end end #-------------------------------------------------------------------------- # ● 屏幕上的事件 #-------------------------------------------------------------------------- def anti_lag_need_update_out_screen? if self.force_update return true end if self.battler != nil if self.battler.sensor_range >= 17 return true end end return false end #-------------------------------------------------------------------------- # ● 屏幕外的事件效果 #-------------------------------------------------------------------------- def execute_effects_out_screen return if erased if self.battler != nil self.erase if self.battler.dead? end if self.tool_id > 0 self.action.duration = 1 $game_system.tools_on_map.delete(self.tool_id) self.erase end end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- alias mog_anti_lag_update update def update unless self.is_a?(Game_Player) update_anti_lag unless @can_update execute_effects_out_screen return end end mog_anti_lag_update end end #============================================================================== # ■ Sprite Character #============================================================================== class Sprite_Character < Sprite_Base #-------------------------------------------------------------------------- # ● 检查是否可以刷新精灵 #-------------------------------------------------------------------------- def check_can_update_sprite if self.visible and @character.can_update == false reset_sprite_effects end self.visible = @character.can_update end #-------------------------------------------------------------------------- # ● 重置精灵效果 #-------------------------------------------------------------------------- def reset_sprite_effects dispose_animation end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- alias mog_anti_lag_update update def update if $game_system.anti_lag check_can_update_sprite return unless self.visible end mog_anti_lag_update end end $mog_rgss2_xas_anti_lag = true #=end
#============================================================================# ■ VX_事件图形刷新简化 —— By 诡异の猫#============================================================================# 脚本内容: 只刷新视野内的事件图形,改善大地图事件过多卡机情况.#============================================================================class Sprite_Character < Sprite_Base #-------------------------------------------------------------------------- # ● 判定图形是否再视野内 #-------------------------------------------------------------------------- def in_view? add_x = (self.width-32)*4 + 384#256 add_y = self.height*8 begin_x = $game_map.display_x - add_x begin_y = $game_map.display_y - add_y end_x = $game_map.display_x + 4352 + add_x end_y = $game_map.display_y + 3328 + add_y limit_x = $game_map.width * 256 - 256 + add_x limit_y = $game_map.height * 256 - 256 + add_y char_x = @character.real_x char_y = @character.real_y if end_x <= limit_x return false if char_x < begin_x or char_x > end_x end if end_y <= limit_y return false if char_y < begin_y or char_y > end_y end if end_x > limit_x and end_y > limit_y return false if char_x < begin_x and char_x > end_x - limit_x return false if char_y < begin_y and char_y > end_y - limit_y end return true end #-------------------------------------------------------------------------- # ● 更新画面 #-------------------------------------------------------------------------- def update super if in_view? update_bitmap self.visible = (not @character.transparent) update_src_rect self.x = @character.screen_x self.y = @character.screen_y self.z = @character.screen_z self.opacity = @character.opacity self.blend_type = @character.blend_type self.bush_depth = @character.bush_depth end update_balloon if @character.animation_id != 0 animation = $data_animations[@character.animation_id] start_animation(animation) @character.animation_id = 0 end if @character.balloon_id != 0 @balloon_id = @character.balloon_id start_balloon @character.balloon_id = 0 end endend#============================================================================== #==============================================================================# 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息#==============================================================================
#============================================================================ # ■ VX_事件图形刷新简化 —— By 诡异の猫 #============================================================================ # 脚本内容: 只刷新视野内的事件图形,改善大地图事件过多卡机情况. #============================================================================ class Sprite_Character < Sprite_Base #-------------------------------------------------------------------------- # ● 判定图形是否再视野内 #-------------------------------------------------------------------------- def in_view? add_x = (self.width-32)*4 + 384#256 add_y = self.height*8 begin_x = $game_map.display_x - add_x begin_y = $game_map.display_y - add_y end_x = $game_map.display_x + 4352 + add_x end_y = $game_map.display_y + 3328 + add_y limit_x = $game_map.width * 256 - 256 + add_x limit_y = $game_map.height * 256 - 256 + add_y char_x = @character.real_x char_y = @character.real_y if end_x <= limit_x return false if char_x < begin_x or char_x > end_x end if end_y <= limit_y return false if char_y < begin_y or char_y > end_y end if end_x > limit_x and end_y > limit_y return false if char_x < begin_x and char_x > end_x - limit_x return false if char_y < begin_y and char_y > end_y - limit_y end return true end #-------------------------------------------------------------------------- # ● 更新画面 #-------------------------------------------------------------------------- def update super if in_view? update_bitmap self.visible = (not @character.transparent) update_src_rect self.x = @character.screen_x self.y = @character.screen_y self.z = @character.screen_z self.opacity = @character.opacity self.blend_type = @character.blend_type self.bush_depth = @character.bush_depth end update_balloon if @character.animation_id != 0 animation = $data_animations[@character.animation_id] start_animation(animation) @character.animation_id = 0 end if @character.balloon_id != 0 @balloon_id = @character.balloon_id start_balloon @character.balloon_id = 0 end end end #============================================================================== #============================================================================== # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息 #==============================================================================
#==============================================================================# Módulo AntiLag 超级防卡脚本#============================================================================== module AntiLag SPC = Win32API.new("kernel32", "SetPriorityClass", "pi", "i") @@high_priority = false def self.high_priority ; @@high_priority; end def self.high_priority?; @@high_priority; end def self.high_priority=(valor) return if @@high_priority == valor @@high_priority = valor if @@high_priority SPC.call(-1, 0x80) return end SPC.call(-1, 0x20) end end AntiLag.high_priority = true
#============================================================================== # Módulo AntiLag 超级防卡脚本 #============================================================================== module AntiLag SPC = Win32API.new("kernel32", "SetPriorityClass", "pi", "i") @@high_priority = false def self.high_priority ; @@high_priority; end def self.high_priority?; @@high_priority; end def self.high_priority=(valor) return if @@high_priority == valor @@high_priority = valor if @@high_priority SPC.call(-1, 0x80) return end SPC.call(-1, 0x20) end end AntiLag.high_priority = true
查看全部评分
天秤 发表于 2013-2-17 12:04 http://rpg.blue/forum.php?mod=viewthread&tid=284953&page=1#pid2115444 这个游戏第四关超卡! ...
紫英晓狼1130 发表于 2013-2-13 17:08 事件卡其实没什么办法,试着把事件编少点,或者把地图分成几份。
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-6-18 22:15
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.