Why is my project so laggy?

I had a pretty cool idea for a game where you had to think about color mixing in order to win. You have to delete the clone sprites, but whenever I spawn one in the game gets super slow and laggy until the clone is deleted.

Press space to make a new clone. Turn it into the color it is naming to delete it, or wait 25 seconds. Holding x while moving left and right lets you turn the wheel.

edit: I fixed the problems mentioned, is there anything else I can do?

The Dungeon Crawler Attempt script pic block is much slower than Dungeon Crawler Attempt script pic (1). It usually helps if you can make sprites that hold the colors you want to match. (I’m not sure exactly how you’d do that in this particular game, which I didn’t study in enough detail, sorry.)

By the way, you can say
Dungeon Crawler Attempt script pic (2)
using the pulldown arrow in that input slot.

Thanks! What do you mean by sprites that hold colors I want to match, though?

I think it’s a sprite that’s costume is wherever the color you want to check for appears. For example, if you had a maze with red and green walls, and you want to (more performantly) check for touching red walls, you could put the red walls in a different sprite and check if something is touching that sprite rather than the color red.

Clones can become heavy on performance if too many are active at the same time. It often helps to limit how many are created per frame or recycle existing ones instead of constantly generating new clones.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.