Sign in to follow this  
Followers 0
Sampi

Anti-Event lag

14 posts in this topic

Crear clase nueva arriba de Main y pegar dentro esto

[spoiler]
CODE
#==============================================================================
# ** Anti Event Lag Script
#==============================================================================
# Near Fantastica
# Version 3
# 29.11.05
#==============================================================================
# The Anti Event Lag Script reduces the Lag in RMXP cause by events dramatically
# It dose this by limiting process updating and graphic updating for events
# outside the view of the screen. Events that are parallel process or auto-start
# are not effected by this script.
#==============================================================================

class Game_Map
#--------------------------------------------------------------------------
def in_range?(object)
screne_x = $game_map.display_x
screne_x -= 256
screne_y = $game_map.display_y
screne_y -= 256
screne_width = $game_map.display_x
screne_width += 2816
screne_height = $game_map.display_y
screne_height += 2176
return false if object.real_x <= screne_x
return false if object.real_x >= screne_width
return false if object.real_y <= screne_y
return false if object.real_y >= screne_height
return true
end
#--------------------------------------------------------------------------
def update_events
for event in @events.values
if in_range?(event) or event.trigger == 3 or event.trigger == 4
event.update
end
end
end
end

#============================================================================
# ** Spriteset_Map
#============================================================================

class Spriteset_Map
#--------------------------------------------------------------------------
def in_range?(object)
screne_x = $game_map.display_x
screne_x -= 256
screne_y = $game_map.display_y
screne_y -= 256
screne_width = $game_map.display_x
screne_width += 2816
screne_height = $game_map.display_y
screne_height += 2176
return false if object.real_x <= screne_x
return false if object.real_x >= screne_width
return false if object.real_y <= screne_y
return false if object.real_y >= screne_height
return true
end
#--------------------------------------------------------------------------
def update_character_sprites
for sprite in @character_sprites
if sprite.character.is_a?(Game_Event)
if in_range?(sprite.character) or sprite.character.trigger == 3 or sprite.character.trigger == 4
sprite.update
end
else
sprite.update
end
end
end
end
[/spoiler] Edited by xXDarkDragonXx
0

Share this post


Link to post
Share on other sites
Casi siempre pasa esto al Copiar y Pegar directamente (salen carácteres desconocidos y da miles de errores). Si me permites edito tu mensaje con una versión mejor del script. :y: Edited by xXDarkDragonXx
0

Share this post


Link to post
Share on other sites
¿Versión mejor? ¿Qué tiene de nuevo?
0

Share this post


Link to post
Share on other sites
Bueno, tengo 200 eventos con acciones (se mueven y demás) y cero lag. Es increíble. Más ese mapa tiene neblina la cual neblinca ocasiona algo de lag. Y siempre va fluído con este script. auxilio.gif
0

Share this post


Link to post
Share on other sites
impresionado.gif impresionado.gif ¡Haberlo dicho antes! xD.png
La verdad es que es increíble...
0

Share this post


Link to post
Share on other sites
mm ya lo habia puesto xD.png
0

Share this post


Link to post
Share on other sites
Me parece que tú lo pusiste más tarde. De todas formas, ya está.
Alguno se habrá arrodillado cuando haya visto este script...
0

Share this post


Link to post
Share on other sites
Bueno, borre el tema tuyo Soramaro ya que Sampi lo puso primero.
0

Share this post


Link to post
Share on other sites
yo siempre pongo este script pero nunca hace la gran cosa= S es cierto q mejora un poco pero no se ilucionen demaciado
0

Share this post


Link to post
Share on other sites
Bueno es cierto ya que no afecta Procesos paralelos ni Inicios automáticos. Pero por lo demás bueno. Siempre tengo 0 lag.
0

Share this post


Link to post
Share on other sites
no afecta eventos paralelos ni inicios automaticos? no sabia eso =S con rason no me hace casi nada xD.png
0

Share this post


Link to post
Share on other sites
que es un anti event lag?
0

Share this post


Link to post
Share on other sites
Lo que dice, hace que no haya lag en el juego, causado por los eventos
Lag es cuando todo se vuelve lento(el juego)
0

Share this post


Link to post
Share on other sites
yap gracias icon13.gif icon13.gif icon13.gif icon13.gif
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0