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,298
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 Posts

Latest Profile Posts

Guys, I made a trailer! And, I also launched the Steam page! If you would like to support the game, please Wishlist it :ahappy: ->
working on some tilesets _ノ乙(、ン、)_

CIBl8xT.png


Oq8WKHX.png
aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v

Forum statistics

Threads
117,284
Messages
1,106,123
Members
153,467
Latest member
Kip_
Top