I was making a game where you would bake a cake... But it's so laggy and I only finished 3/5 of it


#1

I only did the mixing and putting ingredients in part, and it's so laggy! Is there a way to fix it? And how do other people make almost the same parts and have it not lag?


#2

Can I see it, maybe I can help


#3

This post was flagged by the community and is temporarily hidden.


#4

Here: https://c.gethopscotch.com/p/xojjrdpyv


#5

This post was flagged by the community and is temporarily hidden.


#6

But wouldn't making more objects make it lag anyway?


#7

Well, clones are laggier
I'm not sure though...


#8

Yes it would,but think of it this way: C= number of clones, O=number of objects,the lag value for both numbers is 1: now if you don't use clones the lag value is 1 if you use both objects and clone the lag value is 2 now I am sure I don't need to tell you that 2 is bigger than 1! Of course then lag values are very approximate and anyway you would need a lot of objects to get as laggy as clones. I hope this helps!


#9

@GysvANDRegulus just try to take the clones out and it should get less laggy. You can put the code that you would have had your clones do into an ability and make a bunch of objects. That wat you don't have to repeatedly code the same code.


#10

Arghh! I am warning you of something VERY IMPORTANT.

Don't make too much code! It's a good project, but it's going to make things VERY LAGGY. Take "World of life" by Yummy Muffin (who is gone :cry: ) it had lots of code, and it crashes every two times you open the project. If it's already too much code, you can make two projects, split them, like "Bake a cake part 1
And bake a cake part 2"
It will make it so much easier!


#11

I think it's because it's constantly using "Check once" or "check if else". No clones, I think it's just that tons of things are checking at once. :wink: