- Joined
- Jan 13, 2017
- Messages
- 66
- Reaction score
- 9
- First Language
- French
- Primarily Uses
Background:
I'm developing a game since a lot of months. I was previously using Galv Event Spawner when Yanfly did not have its own.
I encountered performances problems after hundred of spawns with the Galv plugin, slowing my developement last year. I switched to YEP Event Spawner when it got released, but with time I'm noticing it suffers the same kind of performances problems.
So far my game uses batches of 6 to 27 spawned events depending on the map, preserved or unpreserved.
I released a JAM game recently where I was first using Yanfly Spawned Events to spawn slots in a slot machine (9 slots). Here too, the game became rapidly unplayable until I ditched Spawned Events.
Detailed Problem:
Tested on MV 1.5.2 / MV 1.6.1
Using Yanfly Event Spawner, I spawn unpreserved events in a specific map.
There is technicaly only 1 reference event spawned. But the first page is a parallel self switch roll, that will put each spawned events on a different page (Page 2, or 3, or 4, etc...).
Once the map entered, you can interact with the events, or just leave. Everytime you leave the map, the events are naturaly despawned.
Re-entering this map spawns a different set of events each times.
If you do that for several minutes, the game starts to take longer to load the items, and once playing on the map, the performances become worse each times. In my main project, a set of 12 items spawned for 60 minutes create a loss of ~40FPS on the concerned map, and this again during normal gameplay, not only during generation.
Also please note that it appears the generated events never get their ID reseted. It starts from 1001 (plugin default), and only goes upward, even after being deleted. Depending on the rate of spawning, many events can also share the same ID.
Saving/Loading the game, or Closing the game, seems to give a bit more performances, but is too insignificant and truly works only 1 cycle of spawning.
Demo of the Problem (Click here to Download) :
In this Demo, I got up to date YEP Core, YEP Message Core (for debug purpose), and YEP Event Spawner
Talking to the NPC can create a parallel event that will do this loop:
Pressing PageUp repetitively will open the option to turn off this loop.
On my machine in editor, there's a loss of ~40FPS after ~40 batches of spawn, so 4000 event spawns. Requires about 80 batches in the game executable version.
This can sounds huge, but if the events are truly "unpreserved" this performance bug should not occur.
4000 spawns in the course of a full RPG should be little, be it for items, NPCs, or others.
May I note that spawning that much items at the same time is only for test purpose, but it would indicate that spawning low amount of items on the long run would have similar negative effects.
Important: it appears doing the demo process in Autorun instead of Parallel does not affect the FPS while the destination map is loaded.
The loading time for teleportation is still unaffected and gradualy longer in both Parallel/Autorun.
Used plugins can be found here:
YEP Core Engine: http://yanfly.moe/2015/10/09/yep-1-core-engine/
YEP Message Core: http://yanfly.moe/2015/10/10/yep-2-message-core/
YEP Event Spawner: http://yanfly.moe/2018/09/14/yep-170-event-spawner-rpg-maker-mv/
Conclusion:
I really hope someone can help to identify/fix this bug, Event Spawners are truly a game changer for RPG Maker, and my code knowledge is far too bad to work this for my main project.
My Machine:
Win 8.1
RPG MV 1.5.2
i5 4690K 3.5Ghz
GTX 970
16Go RAM
HDD 7200rpm
I'm developing a game since a lot of months. I was previously using Galv Event Spawner when Yanfly did not have its own.
I encountered performances problems after hundred of spawns with the Galv plugin, slowing my developement last year. I switched to YEP Event Spawner when it got released, but with time I'm noticing it suffers the same kind of performances problems.
So far my game uses batches of 6 to 27 spawned events depending on the map, preserved or unpreserved.
I released a JAM game recently where I was first using Yanfly Spawned Events to spawn slots in a slot machine (9 slots). Here too, the game became rapidly unplayable until I ditched Spawned Events.
Detailed Problem:
Tested on MV 1.5.2 / MV 1.6.1
Using Yanfly Event Spawner, I spawn unpreserved events in a specific map.
There is technicaly only 1 reference event spawned. But the first page is a parallel self switch roll, that will put each spawned events on a different page (Page 2, or 3, or 4, etc...).
Once the map entered, you can interact with the events, or just leave. Everytime you leave the map, the events are naturaly despawned.
Re-entering this map spawns a different set of events each times.
If you do that for several minutes, the game starts to take longer to load the items, and once playing on the map, the performances become worse each times. In my main project, a set of 12 items spawned for 60 minutes create a loss of ~40FPS on the concerned map, and this again during normal gameplay, not only during generation.
Also please note that it appears the generated events never get their ID reseted. It starts from 1001 (plugin default), and only goes upward, even after being deleted. Depending on the rate of spawning, many events can also share the same ID.
Saving/Loading the game, or Closing the game, seems to give a bit more performances, but is too insignificant and truly works only 1 cycle of spawning.
Demo of the Problem (Click here to Download) :
In this Demo, I got up to date YEP Core, YEP Message Core (for debug purpose), and YEP Event Spawner
Talking to the NPC can create a parallel event that will do this loop:
- teleport the player on the Destination Map
- spawn batches of 100 unpreserved events on Destination Map
- wait some time to monitor FPS
- teleport the player on the Starting Map
Pressing PageUp repetitively will open the option to turn off this loop.
On my machine in editor, there's a loss of ~40FPS after ~40 batches of spawn, so 4000 event spawns. Requires about 80 batches in the game executable version.
This can sounds huge, but if the events are truly "unpreserved" this performance bug should not occur.
4000 spawns in the course of a full RPG should be little, be it for items, NPCs, or others.
May I note that spawning that much items at the same time is only for test purpose, but it would indicate that spawning low amount of items on the long run would have similar negative effects.
Important: it appears doing the demo process in Autorun instead of Parallel does not affect the FPS while the destination map is loaded.
The loading time for teleportation is still unaffected and gradualy longer in both Parallel/Autorun.
Used plugins can be found here:
YEP Core Engine: http://yanfly.moe/2015/10/09/yep-1-core-engine/
YEP Message Core: http://yanfly.moe/2015/10/10/yep-2-message-core/
YEP Event Spawner: http://yanfly.moe/2018/09/14/yep-170-event-spawner-rpg-maker-mv/
Conclusion:
I really hope someone can help to identify/fix this bug, Event Spawners are truly a game changer for RPG Maker, and my code knowledge is far too bad to work this for my main project.
My Machine:
Win 8.1
RPG MV 1.5.2
i5 4690K 3.5Ghz
GTX 970
16Go RAM
HDD 7200rpm
Last edited: