What's up, RMers?
Anyone with RMXP wanna give this anti-lag a try?

Part1 - The mostly Custom Code
Part2 - Mainly Game_Map's update edited
Part 3 - Mainly Spriteset_Map's update edited

Just tinkering with it, but I personally get at least a FPS of 38 out of 40 with the 900+ events in the anti-lag demo I cobbled together for the Zeriab posts. Faster than Near Fantastica's or Amaranth's too it seems.

It doesn't have all the bells and whistles (ie defining certain events that are always/never updated, enable/disable antilag).... But its a start, and its pretty much not altering the RMXP game variables.

DO NOTE: It does rewrite the update methods for "Game_Map" and "Spriteset_Map". But I sure as heck identified where the changes are made. And I kept with RMXP SDK names for the methods that cycle through and update the events/characters.



Rather than repeatedly re-acquire the minimum and maximum x/y coordinates where your player character is standing (typical with 'in_range?' like methods), it only grabs the coordinates IF you moved. So instead of it performing a dozen calculations just for the boundaries before even testing if the event(s) are in/outside the area, it runs a test to see if the player's X, Y and/or Map had changed... much less processing if you're not moving at all.

I kept values marginally unique with prefixes of @antilag of al (short for anti-lag) in variable names.



EDIT: Oh, gawd. I added two lines so I could have an RMXP switch to turn on/off anti-lag; one simple line in the config system, and one line for the simple 'if its on' bypass.

Turning the Anti-Lag off in that ridiculous 900+ map dropped the 38Frame rate down to 23!!! Yeah, I know without a DOUBT the anti-lag is working.

EDIT 2: Oof. Well, I added a sort of name tag for events so they can always be active on the map even outside your view when all others are limited by the anti-lag system. It seems to start dropping the FPS when you hit 200 events. Quite confusing to me. But... 200 events being fully active no matter when when everyone else is limited by the anti-lag is still a lot.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply




Users browsing this thread: 18 Guest(s)