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
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.
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.
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.
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.
Do you use standard resolution or use high resolution using custom .dll?
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 🙂
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.
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.
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 ^-^
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.
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.
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!