Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Miner Cat 4 is to laggy
- Coltroc
-
8 posts
Miner Cat 4 is to laggy
Hello everyone! Currently working on Miner Cat 4 but I've stumbled upon a problem that I can't fix. The game gets really laggy over time. I've tried to remove code, run it on HTML5, turbo warp, and so on but it still gets super laggy. I've had the same issue with miner Cat 3. At the beginning of the game, it's fine but over time it gets unplayable. I have no idea what's causing the lag and it would be super helpful if anybody knows how to optimize projects.
The file size is about 20-30 MB and there are more than 100 clones on the screen at pretty much all times. More than 10,000 blocks of code and hundreds of costumes, also about 20 Sprites. The problem could be that it's a massive project but I don't see why it gets laggy after some time and not all the time.
I know that it's hard to solve this problem since there isn't too much information but I just have no idea how to fix it, this is my last resort pretty much.
The file size is about 20-30 MB and there are more than 100 clones on the screen at pretty much all times. More than 10,000 blocks of code and hundreds of costumes, also about 20 Sprites. The problem could be that it's a massive project but I don't see why it gets laggy after some time and not all the time.
I know that it's hard to solve this problem since there isn't too much information but I just have no idea how to fix it, this is my last resort pretty much.
- Coltroc
-
8 posts
Miner Cat 4 is to laggy
It isn't, but Miner Cat 3 which has the same problem is shared. You can find it on my profile. MC 3 is about 40 MB.
Last edited by Coltroc (Feb. 19, 2021 13:49:37)
- deck26
-
1000+ posts
Miner Cat 4 is to laggy
So is there an easy way to see the problem? I'm not interested in playing the game.
- Coltroc
-
8 posts
Miner Cat 4 is to laggy
There might be, but I don't know. and that's a part of the problem. Do you know any normal problems which cause lag? that could help a lot as well. So is there an easy way to see the problem? I'm not interested in playing the game.
- deck26
-
1000+ posts
Miner Cat 4 is to laggy
Common causes for lag
- touching colour block
- too many forever loops
- deleting and recreating clones instead of reusing them
- custom blocks with no screen refresh that don't finish in short enough time
Try creating a copy and deleting scripts or sprites and testing to see if the lag goes. That can help reduce the number of possible causes.
- touching colour block
- too many forever loops
- deleting and recreating clones instead of reusing them
- custom blocks with no screen refresh that don't finish in short enough time
Try creating a copy and deleting scripts or sprites and testing to see if the lag goes. That can help reduce the number of possible causes.
- deck26
-
1000+ posts
Miner Cat 4 is to laggy
But avoid things like this in Sound
Volume will presumably only change occasionally so you don't need to set it 30 times a second. Wherever the project changes volume just make a broadcast.
Volume will presumably only change occasionally so you don't need to set it 30 times a second. Wherever the project changes volume just make a broadcast.
Last edited by deck26 (Feb. 19, 2021 14:12:12)
- Coltroc
-
8 posts
Miner Cat 4 is to laggy
Thanks a lot for the help! I'll see what I can do. Common causes for lag
- touching colour block
- too many forever loops
- deleting and recreating clones instead of reusing them
- custom blocks with no screen refresh that don't finish in short enough time
Try creating a copy and deleting scripts or sprites and testing to see if the lag goes. That can help reduce the number of possible causes.
- Coltroc
-
8 posts
Miner Cat 4 is to laggy
I'll try that as well. I'm so thankful for your help! But avoid things like this in Sound
Volume will presumably only change occasionally so you don't need to set it 30 times a second. Wherever the project changes volume just make a broadcast.
- awesome-llama
-
1000+ posts
Miner Cat 4 is to laggy
I think I know what it is. You'll have to test it too and see if this is happening for you too.
Your project has a lot of scripts. Being inside the editor has a huge impact on performance as not only does your game have to run, but all the blocks have to be loaded and rendered at the same time. If you were to view it only in the project player (not going in to the editor at all), then there will be no lag. The moment you go in, the lag will start and even trying to go back out of the editor the lag seems to stay.
Your project has a lot of scripts. Being inside the editor has a huge impact on performance as not only does your game have to run, but all the blocks have to be loaded and rendered at the same time. If you were to view it only in the project player (not going in to the editor at all), then there will be no lag. The moment you go in, the lag will start and even trying to go back out of the editor the lag seems to stay.
- WarriorDragonID
-
31 posts
Miner Cat 4 is to laggy
try forkphorus it helps with blocks and lag
if that dosen't work, you might just have to share it, give them a warning that it is very laggy

- Coltroc
-
8 posts
Miner Cat 4 is to laggy
I've noticed this myself and running the game in for example turbo warp seems to solve that problem, it still lags though after playing for some time. thanks for the help! I think I know what it is. You'll have to test it too and see if this is happening for you too.
Your project has a lot of scripts. Being inside the editor has a huge impact on performance as not only does your game have to run, but all the blocks have to be loaded and rendered at the same time. If you were to view it only in the project player (not going in to the editor at all), then there will be no lag. The moment you go in, the lag will start and even trying to go back out of the editor the lag seems to stay.
- Coltroc
-
8 posts
Miner Cat 4 is to laggy
Forkphorus is terrific in making projects run faster, but it makes my game display wrong try forkphorus it helps with blocks and lagif that dosen't work, you might just have to share it, give them a warning that it is very laggy

- danec_qwerty
-
39 posts
Miner Cat 4 is to laggy
i wish it was in scratch so we could make mods
- 098765432154321
-
500+ posts
Miner Cat 4 is to laggy
Please don't necropost, this topic is from February. i wish it was in scratch so we could make mods
- nzishi
-
1 post
Miner Cat 4 is to laggy
Try Adding 1 - 5 Blank Sprites. Also Remember Scratch Does Not Allow 300+ Clones
Don't Do This
Do This
If You Want To Delete Stamps Do This:
Also Try To Use TurboWarp To Remove Clone Limits & To Avoid Lag. Remember To Include That Is Is Laggy In The Instructions!
Please Subscribe To My Youtube Channel & Follow My Scratch Account
Don't Do This
Do This
If You Want To Delete Stamps Do This:
Also Try To Use TurboWarp To Remove Clone Limits & To Avoid Lag. Remember To Include That Is Is Laggy In The Instructions!
Please Subscribe To My Youtube Channel & Follow My Scratch Account
Last edited by nzishi (Jan. 9, 2022 11:29:36)
- EliTheLegoBrick
-
27 posts
Miner Cat 4 is to laggy
If anyone has a problem that no more code fits in the project, contact me on my profile ok?
- 098765432154321
-
500+ posts
Miner Cat 4 is to laggy
If anyone has a problem that no more code fits in the project, contact me on my profile ok?
Please don't necropost, this topic is from February of last year. Try Adding 1 - 5 Blank Sprites. Also Remember Scratch Does Not Allow 300+ Clones
Don't Do This
-snip-
Also Try To Use TurboWarp To Remove Clone Limits & To Avoid Lag. Remember To Include That Is Is Laggy In The Instructions!
Please Subscribe To My Youtube Channel & Follow My Scratch Account
- Me, August 2021
- Discussion Forums
- » Help with Scripts
-
» Miner Cat 4 is to laggy