Discuss Scratch

fyromaniac1
Scratcher
100+ posts

Less Lag From Joined Scripts?

Does joining scripts reduce lag from a project? Here's an example
when flag clicked
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)
or does joining blocks reduce lag?:
when flag clicked
forever
if <down arrow pressed> then
change x by (-10)
end
if <up arrow key pressed> then
change y by (10)

Check out some of the best games made by me!
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.
fyromaniac1
Scratcher
100+ posts

Less Lag From Joined Scripts?

If it reduces file size, you'd think it'd reduce lag

Check out some of the best games made by me!
Sonickyle
Scratcher
1000+ posts

Less Lag From Joined Scripts?

fyromaniac1 wrote:

If it reduces file size, you'd think it'd reduce lag
It doesn't (or it's barely noticeable).

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.
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.

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
fyromaniac1
Scratcher
100+ posts

Less Lag From Joined Scripts?

Oh, ok, so would
when flag clicked
forever
do nothing
lag your game?

Check out some of the best games made by me!
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.

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
fyromaniac1
Scratcher
100+ posts

Less Lag From Joined Scripts?

So I should join scripts?

Check out some of the best games made by me!
turkey3_test
Scratcher
1000+ posts

Less Lag From Joined Scripts?

You should join them. I think it reduces lag, but don't mark my word for it, but lag or not, I prefer to because it makes it more clean, I guess, and organized. I consider it more “professional”, not that I'm near that, but I think that's how the pros do it.

fyromaniac1
Scratcher
100+ posts

Less Lag From Joined Scripts?

Yep, that's what I thought. And since other games made by those pros are barely lagging, You and I are probably right.

Check out some of the best games made by me!
scubajerry
Scratcher
1000+ posts

Less Lag From Joined Scripts?

fyromaniac1 wrote:

So I should join scripts?
But using event driven scripts are better when you can. Such as

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)

turkey3_test
Scratcher
1000+ posts

Less Lag From Joined Scripts?

scubajerry wrote:

fyromaniac1 wrote:

So I should join scripts?
But using event driven scripts are better when you can. Such as

when [up-arrow v] clicked
change y by (10)

when [down-arrow v] clicked
change y by (-10)


Not for this case of movement, because try the scripts and there will be a delay after the first movement.

scubajerry
Scratcher
1000+ posts

Less Lag From Joined Scripts?

turkey3_test wrote:

scubajerry wrote:

fyromaniac1 wrote:

So I should join scripts?
But using event driven scripts are better when you can. Such as

when [up-arrow v] clicked
change y by (10)

when [down-arrow v] clicked
change y by (-10)


Not for this case of movement, because try the scripts and there will be a delay after the first movement.
Hmmm - so there is.
turkey3_test
Scratcher
1000+ posts

Less Lag From Joined Scripts?

scubajerry wrote:

turkey3_test wrote:

scubajerry wrote:

fyromaniac1 wrote:

So I should join scripts?
But using event driven scripts are better when you can. Such as

when [up-arrow v] clicked
change y by (10)

when [down-arrow v] clicked
change y by (-10)


Not for this case of movement, because try the scripts and there will be a delay after the first movement.
Hmmm - so there is.
That's probably the #1 mistake people make when trying to make smooth movement usually.

fyromaniac1
Scratcher
100+ posts

Less Lag From Joined Scripts?

Yeah, I used to do that, but I found out why to use forever scripts to perform movement. Also, using a forever script allows diagonal movement.

Check out some of the best games made by me!

Powered by DjangoBB