Raizen 109 Posted January 29, 2012 (edited) The Bug: What Happens, when a picture is deleted the RMVXAce scripts keep updating them so for almost all computers there is a constant lag, not perceptible by small number of pictures deleted, but when there is ten or more pictures deleted, which is very common on a RPG Maker game, it starts to be very annoying with the freezes and lags. Correcting: There were 2 members which were trying to fix this, me and JohnBolton, it took some time because there was no error log, but JohnBolton, which has some scripts here found where was the problem. Also special thanks for Gab! which helped us out also, even though it is a very small script, it took some time to find where was the problem. #============================================================================== # Picture Bug Fix #------------------------------------------------------------------------------ # Author : Raizen884 # Credits : JohnBolton, Gab! # Community : www.centrorpgmaker.com # This script corrects a bug in the default scripts in which pictures continued # to be updated even after they were erased, which caused lag. #------------------------------------------------------------------------------ # Place this script above all other scripts in the Materials section. #============================================================================== class Sprite_Picture < Sprite def update super if @picture.name != "" update_bitmap update_origin update_position update_zoom update_other else self.bitmap.dispose if self.bitmap != nil end end end Images: not necessary. Credits: Raizen884, Johnbolton, Gab! Edited March 9, 2012 by Raizen884 9 Share this post Link to post Share on other sites
+ Archeia 160 Posted March 6, 2012 At first I thought this shouldn't be a problem if you do a cache.clear and a gc.start. But after slamming my head out of frustration for 4 straight hours, trying to figure out why the hell is my game dropping by 10 fps whenever we walk, I remembered this scriptlet. It works like awesomely, so thanks guys! I just want to bump this up since this saved my RMing life, literally. Share this post Link to post Share on other sites
Touchfuzzy 237 Posted March 6, 2012 #============================================================================== # Picture Bug Fix #------------------------------------------------------------------------------ # Author : Raizen884 # Credits : JohnBolton, Gab! # Community : www.centrorpgmaker.com # This script corrects a bug in the default scripts in which pictures continued # to be updated even after they were erased, which caused lag. #------------------------------------------------------------------------------ # Place this script above all other scripts in the Materials section. #============================================================================== class Sprite_Picture < Sprite def update super if @picture.name != "" update_bitmap update_origin update_position update_zoom update_other else self.bitmap.dispose if self.bitmap != nil end end end I recognize that English isn't your first language, so I did you the favor of cleaning up the comments a bit. I also cleaned up the indenting that wasn't quite right. The script works great I'm just anal about things like that. I'm going to be bringing it up with Degica in the beta testing reports so that we can maybe get this fixed permanently. Share this post Link to post Share on other sites
Raizen 109 Posted March 9, 2012 thanks Touchuzzy, yeah, it really isn't my first language, I'll change in the main tópic, all my scripts are in portuguese, but since this was a big mistake by Enterbrain on the script, I thought I needed to share with foreign communities Share this post Link to post Share on other sites