Okay i must see this. :D
EDIT:
I tested Your code and yea it work better but still we have two problems:
1. I signalized you earlier:
Change in Game_Character method update_move to
2. When player reveal fog then fps still drops but it is level up because in my project fps drops only then player move and reveal fog.
Change Class Game_Player < Game_Character to this
EDIT:
I tested Your code and yea it work better but still we have two problems:
1. I signalized you earlier:
Change in Game_Character method update_move to
Code:
def update_move
# Calling the original method
wachunga_fow_gch_update_move
if $game_map.fow
if $game_map.fow_dynamic && (@x != @last_x || @y != @last_y) && self != $game_player
# Let's assume that `$scene` is the scene of `Scene_Map` and `spriteset`
if $scene.is_a?(Scene_Map) && $scene.spriteset
# Checks if a character has entered or left the player's line of sight
$scene.spriteset.update_event_transparency(self)
end
end
end
@last_x = @x
@last_y = @y
end
2. When player reveal fog then fps still drops but it is level up because in my project fps drops only then player move and reveal fog.
Change Class Game_Player < Game_Character to this
Code:
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Frame Update (jump)
#--------------------------------------------------------------------------
def update_jump
# Inherit original method statements from the Game_Character superclass
super
# Update fog of war when jump is completed and FOW is active
if $game_map.fow && @jump_count == 0
$game_map.update_fow_grid(@x, @y, $game_map.fow_player_range)
$scene.spriteset.update_event_transparency if $game_map.fow_dynamic
$scene.spriteset.update_fow_tilemap
end
end
#--------------------------------------------------------------------------
# * Frame Update (move)
#--------------------------------------------------------------------------
def update_move
# Update fog of war if player moved to a new position and is not jumping
if $game_map.fow && (@x != @last_fow_x || @y != @last_fow_y) && !jumping?
$game_map.update_fow_grid(@x, @y, $game_map.fow_player_range)
$scene.spriteset.update_event_transparency if $game_map.fow_dynamic
$scene.spriteset.update_fow_tilemap
end
# Inherit original method statements from the Game_Character superclass
super
# Update last recorded FOW position
@last_fow_x, @last_fow_y = @x, @y
end
end