Huge lag problem in a certain map.

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
665
Reaction score
232
First Language
English
Primarily Uses
N/A
Hi guys,

I am having a huge lagging problem with this map.



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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
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.
 

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
665
Reaction score
232
First Language
English
Primarily Uses
N/A
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.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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).
 

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
665
Reaction score
232
First Language
English
Primarily Uses
N/A
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?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
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).
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top