I have a game with 3 screens holding 5k blocks total. The game is a cookie clicker rip off and after buying a couple of upgrades the game becomes almost unplayable with how laggy it is. How can I remove this lag or what could be the cause of it?
5,000 blocks over 3 screens is a lot but it doesn’t necessarily mean it will cause lag. Lag is caused by how efficiently you program your code. It’s possible to create lag with 4 blocks so it’s not really tied to how many blocks you use.
You can post some screenshots of blocks that might be causing lag (e.g. where you have loops, stored variables, data source calls, etc.) and maybe someone will have a suggestion for what’s causing it.
ah, I think I have an idea. My code contains a bunch of infinite loops, do you think setting the loops to repeat every couple of seconds rather than just repeating would help fix it?
works a lot better, thank you for the help!