Huge lag problem in a certain map.

● ARCHIVED · READ-ONLY
Started by Madam_Detective 7 posts View original ↗
  1. Hi guys,

    I am having a huge lagging problem with this map.

    2z50jra.png

    I've tried all the available anti-lag scripts out there, but they all clashed with another script that I have and cause the game to crash. The game works okay without any anti-lag scripts, but this map lags so bad that I just can't turn a blind eye on.

    Is there any short script that would stop the lag only in this particular map? I don't want to run into compatibility issues.
  2. The lag is obviously because you have so many events.  Why so many?  Do they all move or change direction?

    I'd be considering either adding them to the tileset and making them a part of the map, or if they all turn at the same time, just make a spritesheet where each cell/frame is a whole group of people rather than a single person, which will drastically reduce the number of events you have.

    I really don't know that there's much you can do as far as scripting goes.  With the size of the map, I doubt any anti-lag script would be affecting very many events anyway, as your map is not very much bigger than the screen, and the anti-lag range is usually a few tiles off the screen.
  3. Lag can be caused by two different causes: the number of events on a map, and if you make a number of badly programmed parallel process events.


    (of course it also depends on your computer's CPU power)


    The number of events in that map certainly suggest that they are the cause, like shaz said.


    However, it might also be the way you made them - are those events only empty placeholders on action button or do they have content on parallel process?


    If you gave them their own controls, then it should also be possible to reduce some lag by removing the content from them and create a single controlling parallel process (preferably common event instead of map event) for their behaviour.
  4. No, they are all just empty placeholders and stay in the same position. They are just there to show that there's a huge audience watching. I'm not sure how I can make them part of the tileset.

    I could cut back 4 tiles, it would still lag but it's less obvious. Though, it wouldn't look as well so I want to see if there's another solution.
  5. 4 tiles is not going to make a difference.

    You just need to open one of your B-E tiles (if you don't have all of them, then create the missing one in the same size as the others), in a graphics program that allows transparent backgrounds (so not Paint).  Then open all your characters.  Copy and paste individual sprites from the character images to the tileset image.

    In fact if they're all just going to stand there and not move, you could even play the game, move around a bit to get a single group on the screen, then take a screenshot of it.  Then you can paste THAT into your empty tileset sheet and crop away the unwanted bits (so the individual tiles will have the characters AND the background/floor).
  6. This is odd... While I was starting to do it, I had closed Steam, and now the event doesn't lag anymore. So the map is also being affected by other programs running in your computer?
  7. Mr. Detective said:
    This is odd... While I was starting to do it, I had closed Steam, and now the event doesn't lag anymore. So the map is also being affected by other programs running in your computer?
    Not exactly - every program is affected by every other program running in the background.
    However, this usually doesn't become visible, so I assume Steam had several updates for your programs (or especially if you've got updates to RM's workshop from steam), and that pushed your CPU resources low enough that the map began to lag. As I mentioned above, the exact amount of lag also depends on your CPU power, either permanently (old PC) or temporarely (background activity).