Theo - Insane Anti Lag (Version 1.1 added page check enhancer!)

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by TheoAllen, Dec 5, 2014.

  1. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,385
    Likes Received:
    4,956
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Apparently, yes :)

    I changed how default script handle the events.

    Good to know that it wasnt hard to solve.
     
    #41
  2. lexietanium

    lexietanium Veteran Veteran

    Messages:
    98
    Likes Received:
    19
    Location:
    Under yo beds o.o
    First Language:
    Tagalog :P
    Hi, just wanted to clarify, so this works like effectus? And im a lil confused about the 250 thing. Does it mean if it's less than 250 in a map it won't turn on the anti lag? Also, im using mostly parallax mapping, would that help with the lag coz im using the .dll that enhances resolution
     
    #42
  3. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,385
    Likes Received:
    4,956
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    I have two algorithms to optimize the antilag. One that works better in less than 250 events. And one that works better in more than 250 events. Parallax wont be the problem. However, it might not work well with higher resolutions as I already said. Buy Effectus if you want more supports.
     
    #43
  4. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,320
    Likes Received:
    2,945
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    My experience with it:

    Added the script to the game, replacing Victor's Anti lag.

    Loaded the game on a giant map (118 x 71) and it was waaay smoother than before.

    Then I switched to another map (60 x 51) where I didn't have lag before even though it has hundreds of events. And the FPS dropped to 11.

    I tried to reduce the "Table_Limit_Search" value to 100, to see if the insane method would work, but it raised an exception on line 500 when I loaded the game (I think this is just an incompatibility with one of my scripts, I'll take a better look later).

    I then switched Dispose_Sprite to false and ran the game again. The FPS was still on the same level, but the player walked faster. Did you do some kind of frameskip on the movement?

    Then I went back to the giant map and it wasn't smooth anymore. The player could still walk fast, but the map would scroll slowly behind him, making it kind of weird.
     
    #44
  5. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,385
    Likes Received:
    4,956
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    By switched to another map do you mean transfer player? Or do you start with different starting location?

    How about disable completely the insane optimization by put the Table Limit Search to nil? The algorithm is still experimental actually. 

    The exception on the line 500 could be my fault.

    I can try to check your project if you dont mind.
     
    #45
  6. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,320
    Likes Received:
    2,945
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Transfering the player.

    Disabling the insane optimization I got results similar to Victor's Anti Lag, maybe a little better. The FPS stays at 10~20 on the giant map and 20~30 on the map full of events, but it doesn't slow down anything except for the map scroll.
     
    #46
  7. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,385
    Likes Received:
    4,956
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Do you use standard resolution or use high resolution using custom .dll?
     
    #47
  8. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,320
    Likes Received:
    2,945
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    640x360.

    I accidentally had the custom DLL on the project instead of the default. Switched it back and it improved one situation: When I'm on the smaller map, but away from the one hundred events. 

    Re-enabled the insane optimization and everything got better.

    So it was just me, using the wrong DLL, Sorry!

    Your script is awesome :)
     
    #48
    TheoAllen likes this.
  9. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,385
    Likes Received:
    4,956
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    [​IMG]

    Update the script to version 1.0c

    • Compatibility with Shaz's Mouse Script. def events_xy now should always return array.
    • Avoid error 'undefined method delete_sprite for nilClass'
     
    #49
  10. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,385
    Likes Received:
    4,956
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Update to version 1.1!

    Now added page check enhancer to work with parallel process [​IMG]
     
    #50
    Hudell likes this.
  11. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,320
    Likes Received:
    2,945
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    A question: does the script consider the "Set Event Location" command?

    I've ran into an issue:

    When I enter the map, I use "Set event location" to decide where the event should be, based on the current time on my time system. The problem is that the event is not appearing there until I go near the position were the event originally was.

    Edit: I noticed that the events that had a move route were updated, so I just added an empty move route to all events as a workaround and it worked.
     
    Last edited by a moderator: Mar 1, 2015
    #51
  12. Bex

    Bex Veteran Veteran

    Messages:
    1,264
    Likes Received:
    296
    First Language:
    German
    Primarily Uses:
    RMMV
    Strange if have nearly same Pc specs and i can have 400x400 map with about 300 Events on 60FPS without Antilag Script :) .

    But i will test i soon, because i need some performance reserves for other stuff but also want to go to as much as posible.
     
    #52
  13. Mireneye

    Mireneye High Chromancer Veteran

    Messages:
    143
    Likes Received:
    19
    I'm getting an " undefined method 'move_animation' for #<Sprite_Character: " error. I can only find one mention of "move_animation" in any script and that is line 616 in this script. Not certain yet if and how this script will help. But if I can get it to run in my heavily scripted environment, that would be a testament to it's compability ^-^ commenting out line 616: "move_animation(@sx - x, @sy - y)" and it runs. Not sure if it works in all conditions yet. A lot of things to try out. 

    That aside the script seems really useful! Thanks ^-^
     
    #53
  14. Allerka

    Allerka Veteran Veteran

    Messages:
    289
    Likes Received:
    71
    First Language:
    English
    I plugged this into my project, and it definitely works a lot better than the other one I was using. I'm glad it's still being worked on! Without it, I'm getting about 38-44 FPS on my laptop of questionable quality, but with it I've got about 45-56 FPS. A definite improvement!

    The only issue I've run into is with Napoleon's Event Text script (which lets you display text above an event), the same issue I ran into with the other anti-lag script. If I walk away from an event with text displayed, once it hits the edge of the screen, the text gets "dragged" along with me on the edge of the screen, but if I walk back to the event, once it's on screen again the text pops back into place.

    If I turn "Optimize Sprite" off, then the issue goes away, thankfully, though of course I don't enjoy the maximum benefit of this.
     
    #54
  15. AllyJamy

    AllyJamy Veteran Veteran

    Messages:
    48
    Likes Received:
    25
    First Language:
    English
    Primarily Uses:
    RMVXA
    Really effective anti lag script!

    Only thing is, is it possible to turn this script on and off with a script command? This script is perfect for city scenes, but in dungeons areas with puzzles it causes a few issues.

    I tried
    Code:
    ($imported ||= {})[:Theo_AntiLag] = false
    it doesn't crash or anything, but it doesn't turn it off either. Is there a on/off switch on this script?
     
    #55
  16. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,385
    Likes Received:
    4,956
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    @AllyJamy
    There isn't a turn off function in this script because it's essentially change how default script behavior.
    Mind to explain what is your problem with your puzzle used together with this script? off screen event not updating? or something else?
     
    #56
  17. AllyJamy

    AllyJamy Veteran Veteran

    Messages:
    48
    Likes Received:
    25
    First Language:
    English
    Primarily Uses:
    RMVXA
    @TheoAllen

    Ah I see. Well it was more of a problem with another script. But essentially, the player would pick up a weight and place it on two pressure plates. One of the plates was far away from the original weight event was positions and while holding the weight it would start flickering while the player moved, sometimes randomly disappearing the further away you got. But I tweaked the settings a bit and it runs fine now.

    Thanks for the reply.
     
    #57
    TheoAllen likes this.
  18. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    12,093
    Likes Received:
    12,271
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    I hit a bug with this. If you move your mouse cursor from off screen (or outside the window) to on screen while Shaz's mouse script is installed you'll get the following error:

    Line 245: No Method Error. Undefined method [] for nil:Nilclass

    I can reproduce this by moving the mouse from off screen to on screen and then moving it around a little while a textbox is drawing at the start of the game, and it happens every time.
     
    #58
  19. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,385
    Likes Received:
    4,956
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    That, some strange error you found there. I haven't retry this with mouse script yet, but will this do? Replace the line 245 (it's a foolproof or some sort)
    Code:
    @table[x][y] rescue []
     
    #59
  20. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    12,093
    Likes Received:
    12,271
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    That seems to have fixed it. I gave the game a huge dummy line of text to display right when it started and kept moving the mouse on and off the screen, no error was reported. Thanks!
     
    #60

Share This Page