| 赞 | 0  | 
 
| VIP | 0 | 
 
| 好人卡 | 110 | 
 
| 积分 | 1 | 
 
| 经验 | 24791 | 
 
| 最后登录 | 2013-6-25 | 
 
| 在线时间 | 687 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 50 
 
        - 在线时间
 - 687 小时
 
        - 注册时间
 - 2012-10-29
 
        - 帖子
 - 1543
 
 
 
 | 
	
 本帖最后由 j433463 于 2012-12-9 18:56 编辑  
 
我有使用两个脚本,觉得行走卡的情况比较减轻,一个是在 6R 这儿看到的防 lag 脚本, 
一个是在国外 RGSS3 论坛上看到的 Mithran Picture Bug Fix 脚本,用来清除 Bitmap 的癈弃图片, 
不妨试试吧: 
 
防lag脚本 --Mithran Picture Bug Fix -- 
 
- #==============================================================================
 
 - # ▼ Mithran Picture Bug Fix
 
 - # -- Created: 3/12/2012
 
 - #==============================================================================
 
 - # The problem is caused when a picture is erased it holds an assoicated "picture"
 
 - # object in memory as long as you stay on the same scene. Every time that picture
 
 - # object comes up, it creates a NEW blank bitmap, every frame, basically if you 
 
 - # want it to lag, create a lot of blank pictures when they get garbage collected,
 
 - # it lags. 
 
  
- # Each erased picture creates a single 32x32 blank bitmap to associate 
 
 - # itself with, every frame, same with any picture shown as (none). Since the lag 
 
 - # is caused by garbage collection, which is basically uncontrollabe with Ruby.
 
 - #
 
 - # The reason why it constantly creates new blank pictures is because the base 
 
 - # scripts check for the picture name. And if it's "" (aka no picture name), 
 
 - # it keeps creating. When a picture is erased, it sets to ""
 
 - #
 
 - # This script fixes that. 
 
 - #==============================================================================
 
  
- class Sprite_Picture
 
 -   def update_bitmap
 
 -     if @picture.name != @pic_name
 
 -       self.bitmap = Cache.picture(@picture.name)
 
 -     end
 
 -     @pic_name = @picture.name
 
 -   end
 
 -   
 
 - end
 
  
 
- class Spriteset_Map
 
 -   
 
 -   def update_pictures
 
 -     $game_map.screen.pictures.each do |pic|
 
 -       @picture_sprites[pic.number] ||= Sprite_Picture.new(@viewport2, pic)
 
 -       @picture_sprites[pic.number].update
 
 -       if pic.name == ""
 
 -         $game_map.screen.pictures.remove(pic.number)
 
 -         @picture_sprites[pic.number].dispose
 
 -         @picture_sprites[pic.number] = nil
 
 -       end
 
 -     end
 
 -   end
 
  
- end
 
  
- class Game_Pictures
 
 -   
 
 -   def remove(index)
 
 -     @data[index] = nil
 
 -   end
 
 -   
 
 - end
 
  
  复制代码 |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |