shockra

Bored Code Guy
Veteran
Joined
Feb 16, 2016
Messages
472
Reaction score
219
First Language
English
Primarily Uses
RMMZ
I feel like we're missing something very obvious, because I feel like we've considered every viable option at this point. All I can suggest now is to remove everything, then re-add them back in one at a time, testing everything individually.
 

peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
527
Reaction score
315
First Language
Portuguese(BR)
Primarily Uses
RMMV
I feel like we're missing something very obvious, because I feel like we've considered every viable option at this point. All I can suggest now is to remove everything, then re-add them back in one at a time, testing everything individually.
Again... I've done that. I removed ALL scripts from the arrows(except the self despawn), and ALL scripts from the tower(except the spawning) and the result was that picture in the first post.
 

shockra

Bored Code Guy
Veteran
Joined
Feb 16, 2016
Messages
472
Reaction score
219
First Language
English
Primarily Uses
RMMZ
Then we have to consider the possibility that the arrows and tower aren't the problem. Are there other scripts or events in that map?
 

peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
527
Reaction score
315
First Language
Portuguese(BR)
Primarily Uses
RMMV
Then we have to consider the possibility that the arrows and tower aren't the problem. Are there other scripts or events in that map?
yes, but without spawning a few thousand arrows, the game won't lag(it takes about...2ms to draw each frame?).

I'm pretty sure its a core MV issue. And although I know MV wasn't designed to handle thousands of events, since it doesnt come with a spawn event function by default, I really need to find where in the core files the issues are coming from
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,297
Reaction score
1,792
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi there!

After reading the conversation, I have two observations to make:

1 - You activated the setInterval on event 28, then switch to page 2. Do you know that the setInterval function "needs" to be cleared out to stop working, right?
If you don't need whatever the setInterval is doing, you can call clearInterval(Interval_Id)

2 - Another thing is, a long time ago, when I was making an MV game, I had problems with both Galv and Yanfly event spawners plugins about performance and an error when deployed games to a single .exe file. So I switched to Triacontane one, and both problems were solved.
So maybe it's worth a try?
 

peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
527
Reaction score
315
First Language
Portuguese(BR)
Primarily Uses
RMMV
Hi there!

After reading the conversation, I have two observations to make:

1 - You activated the setInterval on event 28, then switch to page 2. Do you know that the setInterval function "needs" to be cleared out to stop working, right?
If you don't need whatever the setInterval is doing, you can call clearInterval(Interval_Id)

2 - Another thing is, a long time ago, when I was making an MV game, I had problems with both Galv and Yanfly event spawners plugins about performance and an error when deployed games to a single .exe file. So I switched to Triacontane one, and both problems were solved.
So maybe it's worth a try?
1- I know about that, but I built those events there as mere ways to make testing easier. I'll assign them to a variable then clear interval once needed.

2-I THINK I've solved the issue. I found the part of the core scripts which had a problem: Just like I suspected, the Tilemap children were not cleared when the event a sprite was assigned to was erased, resulting in it trying to update sprites that weren't in use. I've made the following change and now theres rarely a spike in FPS

Code:
Tilemap.prototype._sortChildren = function() {
    var currentchildren
    for(var i=this.children.length-1;i--;){
        currentchildren=this.children[i]._character
        if(currentchildren && currentchildren._eventId && currentchildren._erased==true) this.children.splice(i,1)
    }
    this.children.sort(this._compareChildOrder.bind(this));
};
 

Latest Threads

Latest Profile Posts

Where would you go if you're looking to hire someone on here? I'm in need of a writer to take my story concept and turn it into npcs/dialog in my game.
Evening humans! How goes the game make?
The anime characters we saw 20 years ago,
still have the same age when we see them now.
Somehow it's strange but also beautiful.
It's like no matter how much we change,
there's certain part of ourselves we can reconnect to when we see them again.
Took a long, long time, way longer than it should to be honest...but I've finally finished the big content update to my demo!

Forum statistics

Threads
117,256
Messages
1,105,892
Members
153,423
Latest member
sreshtiyer
Top