[Solved] Need some help debugging a performance issue with autorun common event

Status
Not open for further replies.
Joined
Dec 23, 2015
Messages
15
Reaction score
3
First Language
English
Primarily Uses
RMMV
Greetings,

So I'm trying to make a custom status menu. It's nothing fancy, it just uses images to display various things based on variables. Since my game has no combat, stats, classes, weapons, parties, enemies, items or anything really resembling an RPG, I've disabled the main menu because it would literally serve no purpose. I've managed to co-opt the menu button to open my status display. I have it set up so that if you press the menu button again while it's up, you'll be asked if you want to quit (to retain the exit functionality of the original menu) or if you press cancel, it closes the status screen and goes back to the game. This is all handled with a parallel event.

◆If:Script:Input.isTriggered('menu') && Check.is_any(13,0)
◆Control Variables:#0013 ACTIVE MENU = 1
◆Common Event:INSPIRATION MENU
◆Exit Event Processing

:End
◆If:Script:Input.isTriggered('menu') && Check.is_any(13,1)
◆Erase Picture:#1
◆Control Variables:#0013 ACTIVE MENU = 0
◆Text:None, Window, Bottom
:Text:Are you sure you want to exit the game? All progress
:Text:since the last time you slept will be lost.
◆Show Choices:Yes, No (Window, Right, #2, #2)
:When Yes
◆Script:SceneManager.exit();

:When No
◆Control Variables:#0013 ACTIVE MENU = 1
◆Common Event:INSPIRATION MENU

:End

:End
◆If:Script:Input.isTriggered('cancel') && Check.is_any(13,1)
◆Erase Picture:#1
◆Control Variables:#0013 ACTIVE MENU = 0
◆Control Switches:#0012 TRANSFERALLOWED = ON
◆Exit Event Processing

:End

This is all fine and dandy. The only problem is that while the status menu is open, the player can move around and even click on other events or even leave the map and go to a new one. I've done searching and I know what you're going to say, "Use an autorun event because the player can't move during an autorun event."

However, I've tried this and while the autorun common event is active, there is a MASSIVE performance hit. The framerate drops from 60fps to sub-30fps while the image is being displayed. This is the code I came up with:

◆If:Script:Input.isTriggered('menu') && Check.false(38)
◆Control Switches:#0038 MENUOPEN = ON

:Else
◆If:Script:Input.isTriggered('menu') && Check.true(38)
◆Erase Picture:#1
◆Control Switches:#0038 MENUOPEN = OFF
◆Text:None, Window, Bottom
:Text:Are you sure you want to exit the game? All progress
:Text:since the last time you slept will be lost.
◆Show Choices:Yes, No (Window, Right, #2, #2)
:When Yes
◆Script:SceneManager.exit();

:When No
◆Control Switches:#0038 MENUOPEN = ON

:End

:End
◆If:Script:Input.isTriggered('cancel') && Check.true(38)
◆Erase Picture:#1
◆Control Switches:#0038 MENUOPEN = OFF

:End

:End

I cannot for the life of me figure out why the performance tanks while this is running. The common event is currently setup to just display the menu background while I try and figure this out, so it's only a single 720x720 image. The event is set to trigger when that switch is on. There is literally nothing else in the event.
 
Last edited:

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
I cannot for the life of me figure out why the performance tanks while this is running
because the engine is updating all the events on the map, plus the triggers for the events, plus the active event, which consists on showing a picture, which triggers the update for the collection of pictures.

if you did this by code, with a proper interface rewrite, you can disable unnecessary updates once the menu has been drawn.
 
Joined
Dec 23, 2015
Messages
15
Reaction score
3
First Language
English
Primarily Uses
RMMV
Edit: I solved this. What I did was add a second page to the parallel event calling the menu. Opening the display switches to the second page, which stops the parallel version of the event running and switches to an autorun version, which displays the graphics and handles the input processing. Closing the display switches back to the parallel event.

Long story short, RPG Maker MV does not like it when you run a parallel event and autorun event at the same time? I really hope the next version of RPG Maker makes serious strides in the way of performance because this is three consecutive versions now (XP, VX/Ace and MV) that have all had major performance issues.
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,222
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top