Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » How do I reduce editor lag?
- JNewbold
- Scratcher
13 posts
How do I reduce editor lag?
When I scroll around in the Scratch editor it's very laggy, and it's become frustrating to edit my project. I've tried using the offline editor but it still lags. Here is a picture of how many scripts I have: http://imgur.com/YLEqFQh
Is there anything I can do about this?
Is there anything I can do about this?
- MineLox92Videos
- Scratcher
100+ posts
How do I reduce editor lag?
http://imgur.com/YLEqFQhYou must have a bajillion scripts in the project (I mean quite a lot). Scratch has to run all of them, so it lags. When I scroll around in the Scratch editor it's very laggy, and it's become frustrating to edit my project. I've tried using the offline editor but it still lags. Here is a picture of how many scripts I have:
Is there anything I can do about this?
- JNewbold
- Scratcher
13 posts
How do I reduce editor lag?
There's a picture there; is that a lot?http://imgur.com/YLEqFQhYou must have a bajillion scripts in the project (I mean quite a lot). Scratch has to run all of them, so it lags. When I scroll around in the Scratch editor it's very laggy, and it's become frustrating to edit my project. I've tried using the offline editor but it still lags. Here is a picture of how many scripts I have:
Is there anything I can do about this?
It shouldn't have to run them (my project runs fine). I'm just worried about editor lag. Is there anything I can do about it?
- footsocktoe
- Scratcher
1000+ posts
How do I reduce editor lag?
There's a picture there; is that a lot?http://imgur.com/YLEqFQhYou must have a bajillion scripts in the project (I mean quite a lot). Scratch has to run all of them, so it lags. When I scroll around in the Scratch editor it's very laggy, and it's become frustrating to edit my project. I've tried using the offline editor but it still lags. Here is a picture of how many scripts I have:
Is there anything I can do about this?
It shouldn't have to run them (my project runs fine). I'm just worried about editor lag. Is there anything I can do about it?
First create a simple project with just one script or two. Does it lag in the editor?
Yes? You have a computer problem.
No? Now look at how much working memory your computer has. If it is only 2 Gig you have a problem. 3 is better. 4 should be plenty UNLESS you are trying to run a lot of other programs at same time as Scratch
So, close everything except Scratch, including other browser tabs, and see if it still lags.
SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!
- JNewbold
- Scratcher
13 posts
How do I reduce editor lag?
I don't have a computer problem. Simple scripts are fine, and I have 8GB RAM. Still lags with Scratch as the only open program.There's a picture there; is that a lot?http://imgur.com/YLEqFQhYou must have a bajillion scripts in the project (I mean quite a lot). Scratch has to run all of them, so it lags. When I scroll around in the Scratch editor it's very laggy, and it's become frustrating to edit my project. I've tried using the offline editor but it still lags. Here is a picture of how many scripts I have:
Is there anything I can do about this?
It shouldn't have to run them (my project runs fine). I'm just worried about editor lag. Is there anything I can do about it?
First create a simple project with just one script or two. Does it lag in the editor?
Yes? You have a computer problem.
No? Now look at how much working memory your computer has. If it is only 2 Gig you have a problem. 3 is better. 4 should be plenty UNLESS you are trying to run a lot of other programs at same time as Scratch
So, close everything except Scratch, including other browser tabs, and see if it still lags.
- MineLox92Videos
- Scratcher
100+ posts
How do I reduce editor lag?
Dude, I just checked the photo, no kidding it lags, my computer has 8GB as well, and I can see why it lags.There's a picture there; is that a lot?http://imgur.com/YLEqFQhYou must have a bajillion scripts in the project (I mean quite a lot). Scratch has to run all of them, so it lags. When I scroll around in the Scratch editor it's very laggy, and it's become frustrating to edit my project. I've tried using the offline editor but it still lags. Here is a picture of how many scripts I have:
Is there anything I can do about this?
It shouldn't have to run them (my project runs fine). I'm just worried about editor lag. Is there anything I can do about it?
Here's something that might help, spacing the scripts further away from each other, so there's more blank space that doesn't overwhelm, the processor. Yes, it might take up workspace, but it'll lag less.
Hope this helps!
- JNewbold
- Scratcher
13 posts
How do I reduce editor lag?
Thanks, I tried the “clean up code” option. It does seem better, but I still have a lot of scripts left to add, so hopefully it doesn't become unusable again haha. I feel like there should be a simple fix to this (have an option to only load the sprites you can see). Am I not supposed to make a project this big?Dude, I just checked the photo, no kidding it lags, my computer has 8GB as well, and I can see why it lags.There's a picture there; is that a lot?http://imgur.com/YLEqFQhYou must have a bajillion scripts in the project (I mean quite a lot). Scratch has to run all of them, so it lags. When I scroll around in the Scratch editor it's very laggy, and it's become frustrating to edit my project. I've tried using the offline editor but it still lags. Here is a picture of how many scripts I have:
Is there anything I can do about this?
It shouldn't have to run them (my project runs fine). I'm just worried about editor lag. Is there anything I can do about it?
Here's something that might help, spacing the scripts further away from each other, so there's more blank space that doesn't overwhelm, the processor. Yes, it might take up workspace, but it'll lag less.
Hope this helps!
- KingOfAwesome58219
- Scratcher
1000+ posts
How do I reduce editor lag?
It shouldn't be as laggy if you use the offline editor for the project. Also, try not to work as the project is running.Thanks, I tried the “clean up code” option. It does seem better, but I still have a lot of scripts left to add, so hopefully it doesn't become unusable again haha. I feel like there should be a simple fix to this (have an option to only load the sprites you can see). Am I not supposed to make a project this big?Dude, I just checked the photo, no kidding it lags, my computer has 8GB as well, and I can see why it lags.There's a picture there; is that a lot?http://imgur.com/YLEqFQhYou must have a bajillion scripts in the project (I mean quite a lot). Scratch has to run all of them, so it lags. When I scroll around in the Scratch editor it's very laggy, and it's become frustrating to edit my project. I've tried using the offline editor but it still lags. Here is a picture of how many scripts I have:
Is there anything I can do about this?
It shouldn't have to run them (my project runs fine). I'm just worried about editor lag. Is there anything I can do about it?
Here's something that might help, spacing the scripts further away from each other, so there's more blank space that doesn't overwhelm, the processor. Yes, it might take up workspace, but it'll lag less.
Hope this helps!
- iamunknown2
- Scratcher
1000+ posts
How do I reduce editor lag?
might help, spacing the scripts further away from each other, so there's more blank space that doesn't overwhelm, the processor. Yes, it might take up workspace, but it'll lag less.Yeah, and everyone knows that using more monitors will increase performance, as the windows will spread out and reduce lag (somehow)! Here's something that
Anyway, maybe using tosh might be better?
Last edited by iamunknown2 (Aug. 5, 2017 09:02:44)
| My website | Using Geany | A Christian | Running Ubuntu MATE 14.04 with Flash 18.0 (release 0) | Search this with quotation marks on Google to view my posts: “ellipsepostpianolizard” (some posts may not show up) |
Moving on from Scratch? Learn Python/a scripting language (e.g Perl, JavaScript), then move on to a C derivative
Moving on from Scratch? Learn Python/a scripting language (e.g Perl, JavaScript), then move on to a C derivative
- footsocktoe
- Scratcher
1000+ posts
How do I reduce editor lag?
Thanks, I tried the “clean up code” option. It does seem better, but I still have a lot of scripts left to add, so hopefully it doesn't become unusable again haha. I feel like there should be a simple fix to this (have an option to only load the sprites you can see). Am I not supposed to make a project this big?Dude, I just checked the photo, no kidding it lags, my computer has 8GB as well, and I can see why it lags.There's a picture there; is that a lot?http://imgur.com/YLEqFQhYou must have a bajillion scripts in the project (I mean quite a lot). Scratch has to run all of them, so it lags. When I scroll around in the Scratch editor it's very laggy, and it's become frustrating to edit my project. I've tried using the offline editor but it still lags. Here is a picture of how many scripts I have:
Is there anything I can do about this?
It shouldn't have to run them (my project runs fine). I'm just worried about editor lag. Is there anything I can do about it?
Here's something that might help, spacing the scripts further away from each other, so there's more blank space that doesn't overwhelm, the processor. Yes, it might take up workspace, but it'll lag less.
Hope this helps!
There is a simple solution. It's the one I use. Don't put more scripts in a sprite than you can see without scrolling. Sometimes I have to stretch that a little, but I've seen projects with so many scripts in one sprite that it's ridiculous. It's very easy to duplicate a sprite and put half the scripts in one and half in the other. Of course, it has to be a sprite that appears at least twice in the project so you can easily switch it out.
SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!
- footsocktoe
- Scratcher
1000+ posts
How do I reduce editor lag?
Another tip is never use wide scripts. You know the kind, where the Booleans have calculations inside of them and you have to scroll across two pages of editor to see the whole line.
Instead, create temp variables. Make the temps equal to the calculations, then put the temps in the Boolean. Result: Nice short lines and narrow scripts.
It's also the length of a script that matters as well as the width. Define blocks can help there.
Instead, create temp variables. Make the temps equal to the calculations, then put the temps in the Boolean. Result: Nice short lines and narrow scripts.
It's also the length of a script that matters as well as the width. Define blocks can help there.
SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!
- JNewbold
- Scratcher
13 posts
How do I reduce editor lag?
Anyway, maybe using tosh might be better?Oh this could be huge, thanks a lot.
There is a simple solution. It's the one I use. Don't put more scripts in a sprite than you can see without scrolling. Sometimes I have to stretch that a little, but I've seen projects with so many scripts in one sprite that it's ridiculous. It's very easy to duplicate a sprite and put half the scripts in one and half in the other. Of course, it has to be a sprite that appears at least twice in the project so you can easily switch it out.I don't think this is possible for my project because I would have to duplicate most of my scripts if I duplicated my sprite (there are a lot of rules for my character's movement).
Another tip is never use wide scripts. You know the kind, where the Booleans have calculations inside of them and you have to scroll across two pages of editor to see the whole line.Noted. I'll try to reduce the size of my if statements, but wouldn't that increase the total number of blocks overall?
Instead, create temp variables. Make the temps equal to the calculations, then put the temps in the Boolean. Result: Nice short lines and narrow scripts.
It's also the length of a script that matters as well as the width. Define blocks can help there.
- footsocktoe
- Scratcher
1000+ posts
How do I reduce editor lag?
1. I don't think this is possible for my project because I would have to duplicate most of my scripts if I duplicated my sprite (there are a lot of rules for my character's movement).
2. I'll try to reduce the size of my if statements, but wouldn't that increase the total number of blocks overall?
1. When you duplicate a sprite, EVERYTHING is duplicated, including all the scripts in the sprite, so no, you don't have to rewrite any scripts, just delete some from one sprite and some from the duplicate.
2. I'm no expert, but from what I read in the forum from the experts, it's the width and length of a script that matters, not how many blocks are in it, although obviously the longer the script then the more blocks will be in it. I think it has something to do with “yield points” for the length, but I'm over my head. I'm just repeating what I think I've read from experts (like the LogFather) saying width matters. My memory could be faulty.
I know one thing, narrow scripts are a lot easier to read and edit. I would do them that way myself regardless.
Here is what the WIKI says about lag in the project (not in the editor)
There are a multitude of ways to lower the lag in the Scratch program, such as:
•using vector graphics
•avoiding the use of cloning
•using fewer sprites
•spreading out scripts across other sprites
•limiting the amount of objects visible at one time
•using custom blocks to fit long and similar scripts
SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!
- JNewbold
- Scratcher
13 posts
How do I reduce editor lag?
That's good to know, but it's not rewriting I'm concerned about. If I have to duplicate most of my scripts anyway, the lag won't be reduced.1. I don't think this is possible for my project because I would have to duplicate most of my scripts if I duplicated my sprite (there are a lot of rules for my character's movement).
2. I'll try to reduce the size of my if statements, but wouldn't that increase the total number of blocks overall?
1. When you duplicate a sprite, EVERYTHING is duplicated, including all the scripts in the sprite, so no, you don't have to rewrite any scripts, just delete some from one sprite and some from the duplicate.
- footsocktoe
- Scratcher
1000+ posts
How do I reduce editor lag?
That's good to know, but it's not rewriting I'm concerned about. If I have to duplicate most of my scripts anyway, the lag won't be reduced.1. I don't think this is possible for my project because I would have to duplicate most of my scripts if I duplicated my sprite (there are a lot of rules for my character's movement).
2. I'll try to reduce the size of my if statements, but wouldn't that increase the total number of blocks overall?
1. When you duplicate a sprite, EVERYTHING is duplicated, including all the scripts in the sprite, so no, you don't have to rewrite any scripts, just delete some from one sprite and some from the duplicate.
Not sure what you mean by that. The idea is just to break one huge amount of script into two smaller parts by using two sprites instead of only one. Same general principle as define blocks.
SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!
- JNewbold
- Scratcher
13 posts
How do I reduce editor lag?
Without going into too much detail about my project, I don't think there's a good way to break my sprite into two smaller sprites.That's good to know, but it's not rewriting I'm concerned about. If I have to duplicate most of my scripts anyway, the lag won't be reduced.1. I don't think this is possible for my project because I would have to duplicate most of my scripts if I duplicated my sprite (there are a lot of rules for my character's movement).
2. I'll try to reduce the size of my if statements, but wouldn't that increase the total number of blocks overall?
1. When you duplicate a sprite, EVERYTHING is duplicated, including all the scripts in the sprite, so no, you don't have to rewrite any scripts, just delete some from one sprite and some from the duplicate.
Not sure what you mean by that. The idea is just to break one huge amount of script into two smaller parts by using two sprites instead of only one. Same general principle as define blocks.
- footsocktoe
- Scratcher
1000+ posts
How do I reduce editor lag?
The easy way is during a period when the sprite is hidden.
Sometimes you have to change some local variables to global variables.
As an example, I have done a pen drawing recording project where the recording script was not in the same sprite as the pen doing the drawing, but it meant switching the variables I was using for color, shade, and size from local to global.
Sometimes you have to change some local variables to global variables.
As an example, I have done a pen drawing recording project where the recording script was not in the same sprite as the pen doing the drawing, but it meant switching the variables I was using for color, shade, and size from local to global.
SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!
- JNewbold
- Scratcher
13 posts
How do I reduce editor lag?
My sprite is a game character that has a LOT of scripts to control its movement (see picture), which are needed at every stage of the game (so I would still need most of the scripts if I changed my sprite in between levels). The only way I could do it is if I somehow swapped sprites as the game was running, which would be clunky and probably wouldn't work anyway. :-/
- footsocktoe
- Scratcher
1000+ posts
How do I reduce editor lag?
My sprite is a game character that has a LOT of scripts to control its movement (see picture), which are needed at every stage of the game (so I would still need most of the scripts if I changed my sprite in between levels). The only way I could do it is if I somehow swapped sprites as the game was running, which would be clunky and probably wouldn't work anyway. :-/
(I can't look at picture. I never click on unknown links.)
If you need a LOT of scripts to control movement, then that is a good probable source of lag. After all, the sprite can only move in 4 directions. How many scripts could you need? Most people have one script for the arrow keys which you can break down into 4 define blocks, one for each key, to handle not only the movement but the animation that goes with it and maybe some detection. If you are trying to detect everything with the player sprite, consider switching the detection over to the thing you were detecting instead.
For example, if the player was detecting whether a bullet hit him, then switch it so the bullet detects whether it hit the player.
If you have a lot of parallel scripts running, try to consolidate them into one script.
Last edited by footsocktoe (Aug. 7, 2017 08:17:13)
SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!
- asivi
- Scratcher
1000+ posts
How do I reduce editor lag?
http://imgur.com/YLEqFQhWhen I scroll around in the Scratch editor it's very laggy, and it's become frustrating to edit my project. I've tried using the offline editor but it still lags. Here is a picture of how many scripts I have:
Is there anything I can do about this?
Share the project.
- Discussion Forums
- » Questions about Scratch
- » How do I reduce editor lag?