[ACE] Increasing performance on a big map.

Discussion in 'RGSSx Script Support' started by Sophism, Aug 24, 2014.

  1. Sophism

    Sophism Veteran Veteran

    Messages:
    36
    Likes Received:
    6
    First Language:
    English
    I'm looking for some help with a performance issue. My game takes place entirely within a mansion's grounds, and as such, the main hub that interconnects the manor, servant's house, garden, parking lot, family crypt, hedge maze (And the greenhouse, which I haven't finished yet.) needed to be fairly big. (The exterior map is 180 x 120.)

    I'm about 80% done with mapping and implementing the common events required for all iterations of the map, such as doors, lighting, (I'm using Zeus' Lights & Shadows script.) monologue triggers for points of interest and whatnot. The "fanciest" events I'm currently using are images fixed in place to simulate things I couldn't do with tiles without wasting too much set real estate, (I use pretty much every tile for all 9 tilesets, but thankfully Modern Algebra's Fix Picture to Map script helps me circumvent this.) such as creating masks so that characters can walk behind buildings.

    I have a global event for night time which will appropriately tint the screen, switch tiles around to say have a window be lit up at night and whatnot, and light up the various lamp posts spread across the grounds. (I went through the map several times, reducing the number of light sources as much as possible without making everything look way too dark near points of interest.)

    So here's the pickle. I've hit a threshold where the lights are tanking the framerate. I have currently 60 lights or so, and I imagine I'll add anywhere between 10 to 20 of them by the time I'm finished. These are mostly spread out pretty well across the entire map, with the biggest concentration of them being a garden/picnic area. But while a small drop in FPS is acceptable, I apparently reached a point where it tanked the FPS from the low 50s to 8-12.

    I attempted using a Vlue's Proximity Events script to only turn them on when on-screen, and while that does work, it requires them to be parallel processes to function, and needless to say, 60+ parallel processes checking for the player actor didn't really help. (In fact, it seemed to have kept the FPS exactly the same when trading one issue for the other.)

    I tried reducing the file size of the lightmaps, but that didn't seem to accomplish anything, nor did merging lights close to one another into a single lightmap.

    I'm currently trying out Hime's Connected Maps, breaking my original map apart into four chunks, (Top left, top right, bottom left and bottom right.) and it keeps the FPS in the high 50s even in the map chunk with the highest amount of light sources. I only have two problems:

    First, the script seems to require the starting position in the map to be at the top left chunk, or the connections simply don't work. This creates a huge issue, since it breaks every transition in the other three chunks entirely. Even a startup event sending the player to the desired starting point in the other chunks doesn't work, as now you're stuck in a disconnected fourth of the whole.

    And second, it seems to completely break Hime's Tile Swap script, which I currently use quite a bit of for certain night effects such as making sure an open door will show the interior light at night, seamlessly switching to a darkened interior when day time comes, as well as changing the appearance of some ruins after a certain task is finished.

    Basically, I'm looking for a way to make the Connected Maps script work in tandem with Tile Swap and allow me to use starting/transition points in chunks other than the top left... or better yet, for a way to keep the engine from slowing down so much when I have ~10 light sources in the vicinity, so that I can keep my original big single map.

    P.S.: (I am using Mog's Simple Anti Lag and Anti Animation Lag scripts, and they don't seem to do anything to the light sources sadly.)

    I'd love some help with this, as I can't finish my hub map until this is resolved.
     
    Last edited by a moderator: Sep 2, 2014
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,819
    Likes Received:
    11,525
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I've moved this thread to RGSSx Script Support (since most of your problem seems to be the numerous scripts or the way you're using them). Please be sure to post your threads in the correct forum next time. Thank you.


    Choose an antilag script and stick with it, and get rid of the other. Having multiple scripts that are meant to do the same thing can easily INCREASE processing required (since you're now using two levels of aliasing instead of just one), and often clash with each other. A crash is obviously the worst result when this happens, but not necessarily the only one.
     
    #2
  3. Sophism

    Sophism Veteran Veteran

    Messages:
    36
    Likes Received:
    6
    First Language:
    English
    Thanks for moving the thread to the appropriate sub-forum!

    As for the anti lag scripts, they do work in tandem and have slightly different uses. In fact, turning off either one of them in my project cuts the framerate in half even during daytime, (When none of the light sources are active.) and yield no performance gain at night.
     
    #3
  4. Sophism

    Sophism Veteran Veteran

    Messages:
    36
    Likes Received:
    6
    First Language:
    English
    I'm at my wit's end here. I've given up on trying to get Hime's Connected Maps to connect both ways and for it to work with her Tile Swap. I've gone through the entire map several times since my last post, simplifying everything as much as I could, even going as far as retooling my "special cases" tiles so I could reduce the number of empty events that create invisible walls. I went from 300-something to 200-something events, and there was literally zero improvement in framerate.

    Is Zeus' Lights & Shadows script known to be particularly bad at handling a high number of light sources per map, even when they're not on screen? Does anyone have experience in managing a relatively high number of lights without reducing performance to a crawl? At this point I'm willing to use a different script, as long as it can handle different lightmap shapes like these:

    [​IMG]
     
    #4

Share This Page