• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Having Trouble With Anti-Event Lag Script

Dylanrockin

That guy
276
Posts
12
Years
    • Seen Jun 9, 2016
    I've been experiencing some lag in my game, mostly for the obvious very large maps with a lot of events, mainly Pokemon and Trainers just walking around and lighting effects. So I tried using Zeriabs Anti-Event Lag Script to try and remedy my every few frame lag problem. And I get an error upon using it.

    The Script is here along with the link to his thread: http://forums.rpgmakerweb.com/index.php?/topic/5292-zeriabs-anti-event-lag-system/

    Spoiler:


    I was just wondering if this script is if at all compatible with Pokemon Essentials, because having lag all because of the size and amount of events I have on a map is just ridiculous; and my computer is up to date in terms of specs. I would greatly appreciate some input on this if it can be done.
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • Just posting a personal experience with lag. I found that even with a lot of events and large maps, the game should run smoothly. My PC is crazy powerful but if I have the battery settings set to Power Saving (even when plugged in) it tends to lag. But when it's set to Entertainment mode (doesn't need to be plugged it) it will run smoothly. Just a personal experience.

    I don't have the time to read through the script to see if it's compatible but if the battery thing doesn't work, i'll read through it.
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    Just posting a personal experience with lag. I found that even with a lot of events and large maps, the game should run smoothly. My PC is crazy powerful but if I have the battery settings set to Power Saving (even when plugged in) it tends to lag. But when it's set to Entertainment mode (doesn't need to be plugged it) it will run smoothly. Just a personal experience.

    I don't have the time to read through the script to see if it's compatible but if the battery thing doesn't work, i'll read through it.

    Well the thing is, is that I am using a desktop not a Laptop, so I'm not to sure about that working for me.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen today
    Essentials already has something like this, which prevents off-screen events from updating. Also, Essentials changes so many scripts that anything not designed for it will probably not work and cause errors.
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    Essentials already has something like this, which prevents off-screen events from updating. Also, Essentials changes so many scripts that anything not designed for it will probably not work and cause errors.

    Hmm, well that's good, but is there another way around the lag that is ever present?
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen today
    You're the first person who's mentioned lag in quite a while. It's hard for me to tackle lag because I don't get it (so I can't tell what needs changing and whether the changes work).
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    You're the first person who's mentioned lag in quite a while. It's hard for me to tackle lag because I don't get it (so I can't tell what needs changing and whether the changes work).

    I like to believe that it has something to do with very large 3x 100x70 maps connected on canvas, with a lot of light sources and animating event Pokemon and Trainers. But as stated above, apparently that's not an issue, I haven't really included any kinds of new scripts to the game, so I'm not sure that's a problem.
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • I remember when I first started using essentials and I put about 20 different particle effects on a map about 30x23 and it lagged really bad. You could just break your large maps down and set it in the meta to where it doesn't show the area when you move between them. You just need to be careful about the trees because if half a tree is in one and the other half in the other map, the tips of the trees and your character get a little messed up when walking behind them. It will be extra work for the encounters but it's all worth it to not have lag.
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    I remember when I first started using essentials and I put about 20 different particle effects on a map about 30x23 and it lagged really bad. You could just break your large maps down and set it in the meta to where it doesn't show the area when you move between them. You just need to be careful about the trees because if half a tree is in one and the other half in the other map, the tips of the trees and your character get a little messed up when walking behind them. It will be extra work for the encounters but it's all worth it to not have lag.

    I would take that into consideration if not for the fact that when I warped to one of the example maps, the lag persisted even there; which is much farther away from my currently large canvas with a lot of light sources.
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • Would you be able to post a screenshot of the error you get upon start up with the the anti lag script in effect?
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    Would you be able to post a screenshot of the error you get upon start up with the the anti lag script in effect?

    Interpreter:276:in `pbExecuteScript'
    Interpreter:788:in `command_111'
    Interpreter:320:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:103:in `update'
    Scene_Map:101:in `loop'
    Scene_Map:114:in `update'
    Scene_Map:68:in `main'
    Exception: ArgumentError
    Message: wrong number of arguments(1 for 0)
    Scene_Map:29:in `initialize'
    Scene_Map:29:in `new'
    Scene_Map:29:in `createSpritesets'
    Scene_Map:28:in `each'
    Scene_Map:28:in `createSpritesets'
    Scene_Map:63:in `main'
    Main:37:in `mainFunctionDebug'
    Main:15:in `mainFunction'
    Main:15:in `pbCriticalCode'
    Main:15:in `mainFunction'
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    I was just glancing over the anti lag script and I don't see how it could be compatible in some areas. I was doing research on your error and I found a wiki on the essentials website the talks about lag and various things that it could come from and how to fix it:

    http://pokemonessentials.wikia.com/wiki/Known_bugs/Old_bugs

    Look towards the top, the "Game Lag" section.

    I see, well I knew that the day/night system had something partly to do with it, but I'm not gonna disable it just to fix the lag. But didn't you tell me that I didn't necessarily need to have my maps connected, and that I could use a transfer point between the maps; rather than having them connected to one huge canvas? Because I do have gates that are meant to transfer the player between the maps.
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • I see, well I knew that the day/night system had something partly to do with it, but I'm not gonna disable it just to fix the lag. But didn't you tell me that I didn't necessarily need to have my maps connected, and that I could use a transfer point between the maps; rather than having them connected to one huge canvas? Because I do have gates that are meant to transfer the player between the maps.

    Somewhat yes. You know the Visual Editor in the Editor.exe? How you can set the map connections? You can break the maps down to smaller chunks (ex. 40x25) and have them connected. But when you go into the meta data you can choose whether or not it shows the area when you enter the map boundaries? Keep it to nil or false. This way it acts as a single map rather than a bunch of small ones. If the lag persists, then you could do the gates to transfer.

    I have a cave in my game that is about 80x64 and it lagged just a small amount (maybe slower by about 8 fps) until I broke it into 4 different maps. There were about 40 different events and many of those had an auto run function. (timed events)

    Ever play Legend of Zelda Link to the Past? Remember how the map transfers would work? I have a Zelda project and I could give you a small quick tutorial on how to do that if nothing else works.
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    Somewhat yes. You know the Visual Editor in the Editor.exe? How you can set the map connections? You can break the maps down to smaller chunks (ex. 40x25) and have them connected. But when you go into the meta data you can choose whether or not it shows the area when you enter the map boundaries? Keep it to nil or false. This way it acts as a single map rather than a bunch of small ones. If the lag persists, then you could do the gates to transfer.

    I have a cave in my game that is about 80x64 and it lagged just a small amount (maybe slower by about 8 fps) until I broke it into 4 different maps. There were about 40 different events and many of those had an auto run function. (timed events)

    Ever play Legend of Zelda Link to the Past? Remember how the map transfers would work? I have a Zelda project and I could give you a small quick tutorial on how to do that if nothing else works.

    I'll try out your first idea and if that doesn't work I would be very interested in your tutorial. Also yes I have played Link to the Past it is glorious.
     

    PiaCRT

    Orange Dev
    937
    Posts
    13
    Years
  • Ugh...The headaches of Mint version haunt me again. From my personal experience, having a large world map caused me annoying lag when walking, albeit it was paired with awkward diagonal movement. I'm certain map connections can be a problem, combined with a non-optimized PC.
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • Ugh...The headaches of Mint version haunt me again. From my personal experience, having a large world map caused me annoying lag when walking, albeit it was paired with awkward diagonal movement. I'm certain map connections can be a problem, combined with a non-optimized PC.

    I ran him through on how to break the large maps into smaller ones. As far as I know, the lag has ceased.
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    I ran him through on how to break the large maps into smaller ones. As far as I know, the lag has ceased.

    I did a test with splicing the map into 2 different maps, and the lag isn't as bad with 2, so I will be doing 4 instead.
     
    Back
    Top