shockra

Bored Code Guy
Veteran
Joined
Feb 16, 2016
Messages
481
Reaction score
227
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
559
Reaction score
351
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
481
Reaction score
227
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
559
Reaction score
351
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
3,174
Reaction score
2,434
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
559
Reaction score
351
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

Trailer is almost done for the game i can't wait to show it to everyone
I've got good news and bad news. The good news is, there aren't any bad news to report. The bad news is, there aren't any good news to report.

Or as others say, yesterday was uneventful.


I am curious that can you "understand/get the point" about what does this place do generally?
(ARPG game)
If anyone knows any C# programmers, please send them my way.
Chilling at night in a tavern.
ChillingAtTavern.png

After 'multiple breakdowns', it's finally over. 10/10 will do this again.

Forum statistics

Threads
129,851
Messages
1,205,719
Members
171,024
Latest member
eanam
Top