When I boot any RMXP or RMVX executable file, I get a lengthy black screen before I get any content.
At first I thought it was because the game was 'loading a lot of data', but I've done a little experiment to test that.
I stripped the program down to the bare components needed to pull up a the title screen (I'm not that good at scripting, so there was probably an easier way of just loading a bitmap in the window):
I wasn't sure how to code the Scene_Base from scratch, so I just copy/pasted it from the original script list.
WHY is there so much lag? Guild Wars, GunZ, Half Life 2, Emulators, or any software really, loads instantly for me. Is there a way around this?
Also note that I get approximately the same speed when compiling the data in the editor, when running the .exe, and when running it from an "encrypted archive".
At first I thought it was because the game was 'loading a lot of data', but I've done a little experiment to test that.
I stripped the program down to the bare components needed to pull up a the title screen (I'm not that good at scripting, so there was probably an easier way of just loading a bitmap in the window):
Code:
module Cache
def self.system(filename)
load_bitmap("Graphics/System/", filename)
end
def self.load_bitmap(folder_name, filename, hue = 0)
@cache = {} if @cache == nil
path = folder_name + filename
if not @cache.include?(path) or @cache[path].disposed?
if filename.empty?
@cache[path] = Bitmap.new(32, 32)
else
@cache[path] = Bitmap.new(path)
end
end
if hue == 0
return @cache[path]
else
key = [path, hue]
if not @cache.include?(key) or @cache[key].disposed?
@cache[key] = @cache[path].clone
@cache[key].hue_change(hue)
end
return @cache[key]
end
end
end
Code:
class Scene_Base
def main
start
perform_transition
post_start
Input.update
loop do
Graphics.update
Input.update
update
break if $scene != self
end
Graphics.update
pre_terminate
Graphics.freeze
terminate
end
def start
end
def perform_transition
Graphics.transition(10)
end
def post_start
end
def update
end
def pre_terminate
end
def terminate
end
def snapshot_for_background
$game_temp.background_bitmap.dispose
$game_temp.background_bitmap = Graphics.snap_to_bitmap
$game_temp.background_bitmap.blur
end
def create_menu_background
@menuback_sprite = Sprite.new
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)
update_menu_background
end
def dispose_menu_background
@menuback_sprite.dispose
end
def update_menu_background
end
end
Code:
class Scene_Title < Scene_Base
def start
super
load_database
create_title_graphic
end
def perform_transition
Graphics.transition(20)
end
def load_database
$data_system = load_data("Data/System.rvdata")
end
def create_title_graphic
@sprite = Sprite.new
@sprite.bitmap = Cache.system("Title")
end
end
Code:
begin
Graphics.freeze
$scene = Scene_Title.new
$scene.main while $scene != nil
Graphics.transition(30)
end
I wasn't sure how to code the Scene_Base from scratch, so I just copy/pasted it from the original script list.
WHY is there so much lag? Guild Wars, GunZ, Half Life 2, Emulators, or any software really, loads instantly for me. Is there a way around this?
Also note that I get approximately the same speed when compiling the data in the editor, when running the .exe, and when running it from an "encrypted archive".