How do I improve the frame rate performance when creating objects in my level?

How do I improve the frame rate performance when creating objects in my level?

What is the expected result

When starting a level, I use the Create object action to generate all the blank cells and associated word objects. I expect the game to run smoothly at 60fps regardless of the number of objects created, both in the app’s preview and in the browser.

What is the actual result

When I do not create the white boxes and character objects, my game runs at 60fps. However, once I create these objects, the frame rate drops to around 30fps. In levels where I create even more white boxes, the performance further decreases to approximately 15fps. Notably, while the app preview consistently shows 60fps, previewing the game in a browser results in the described lag.

Related screenshots

Performance Display: A screenshot showing the frame rate drop when the objects are created.

Project files (optional)

Can you screen shot the events that create the white boxes and character objects?

Do you create the objects in an event that only get actioned once, or does it get run repeatedly?

I use Javascript Code to create that. And I’m sure it only runs once

If you preview the game with the debugger, does the number of white boxes and character objects increase or stay the same when you refresh the game preview inspectors in the debugger?

This is happening because probably an event is triggering multiple times. I made a level editor and experienced the same issue.

It turned out some event was triggering multiple times. Creating numerous duplicate.