Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Less Lag From Joined Scripts?
- fyromaniac1
- Scratcher
100+ posts
Less Lag From Joined Scripts?
Does joining scripts reduce lag from a project? Here's an example
when flag clickedor does joining blocks reduce lag?:
forever
if <up arrow key pressed> then
change y by (10)
when flag clicked
forever
if <down arrow key pressed> then
change y by (-10)
when flag clicked
forever
if <down arrow pressed> then
change x by (-10)
end
if <up arrow key pressed> then
change y by (10)
- Sonickyle
- Scratcher
1000+ posts
Less Lag From Joined Scripts?
It reduces file size, I know that for sure.
No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
I only check the forums every now and then, but other than that consider me retired.
- Sonickyle
- Scratcher
1000+ posts
Less Lag From Joined Scripts?
It doesn't (or it's barely noticeable). If it reduces file size, you'd think it'd reduce lag
No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
I only check the forums every now and then, but other than that consider me retired.
- drmcw
- Scratcher
1000+ posts
Less Lag From Joined Scripts?
Better but none are really ideal as the forever loops are mainly spinning round doing nothing until a key is pressed. Have too many loops like this and you'll start to notice it.
- drmcw
- Scratcher
1000+ posts
Less Lag From Joined Scripts?
Most games will try and have just one thing running at a time to help performance. Adding a script like that will lag it.
- scubajerry
- Scratcher
1000+ posts
Less Lag From Joined Scripts?
But using event driven scripts are better when you can. Such as So I should join scripts?
when [up-arrow v] clicked
change y by (10)
when [down-arrow v] clicked
change y by (-10)
Last edited by scubajerry (Oct. 11, 2013 00:15:25)
- scubajerry
- Scratcher
1000+ posts
Less Lag From Joined Scripts?
Hmmm - so there is.Not for this case of movement, because try the scripts and there will be a delay after the first movement.But using event driven scripts are better when you can. Such as So I should join scripts?when [up-arrow v] clicked
change y by (10)
when [down-arrow v] clicked
change y by (-10)
- turkey3_test
- Scratcher
1000+ posts
Less Lag From Joined Scripts?
That's probably the #1 mistake people make when trying to make smooth movement usually.Hmmm - so there is.Not for this case of movement, because try the scripts and there will be a delay after the first movement.But using event driven scripts are better when you can. Such as So I should join scripts?when [up-arrow v] clicked
change y by (10)
when [down-arrow v] clicked
change y by (-10)
- Discussion Forums
- » Help with Scripts
- » Less Lag From Joined Scripts?