This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-02-17 15:14:07

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Lag in scratch makes me stressed while programming :(

Recently when I've been coding with scratch I've been experiencing a lot of lag - with just makes me plain stressed out. I really dislike lag - and it's been getting on my nerves for the past while.

Is scratch 2.0 planned to perform much faster than 1.4 (in project playing and creation)? I believe that with the flash engine some of the strain will be taken off for the graphics processing - but what about block processes?

Thanks,
RHY3756547

Offline

 

#2 2010-02-17 15:28:53

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

Are you making one giant script? The shorter your script is, the less lag.


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#3 2010-02-17 15:30:12

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

More like 1000 giant scripts.

Offline

 

#4 2010-02-17 15:55:00

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

Lag isn't that stressful. Lag, is understandable, you can test it to see what is causing it. What is REALLY stressful is having a bug or script error that prevents your project from running properly the day before you need it finished. This isn't really an issue for scratch but with a lot of languages that kind of problem can pop up.

I am going to guess that the flash version will be faster, but probably not something like 7 times faster. Flash overall isn't that powerful, but compared to scratch's current online player its a powerhouse.

Last edited by archmage (2010-02-17 15:57:21)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#5 2010-02-17 16:25:26

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

archmage wrote:

Lag isn't that stressful. Lag, is understandable, you can test it to see what is causing it. What is REALLY stressful is having a bug or script error that prevents your project from running properly the day before you need it finished. This isn't really an issue for scratch but with a lot of languages that kind of problem can pop up.

I am going to guess that the flash version will be faster, but probably not something like 7 times faster. Flash overall isn't that powerful, but compared to scratch's current online player its a powerhouse.

On scratch you don't really test for lag, because scratch is lag.

Since it is a big milestone (2.0) I hope that they make a really fast revision of the scratch engine so projects can become more complex.

Also - I have never encountered a bug like that. Everything usually works fine.

Offline

 

#6 2010-02-17 16:41:25

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

If everything has always worked fine that you probably never really got into java or similar languages. There are things that will confuse the hell out of novices.

You can test for lag in scratch by removing parts of the program to focus on certain parts that you think may be causing lag.

Last edited by archmage (2010-02-17 16:42:20)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#7 2010-02-17 18:26:50

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

archmage wrote:

If everything has always worked fine that you probably never really got into java or similar languages. There are things that will confuse the hell out of novices.

You can test for lag in scratch by removing parts of the program to focus on certain parts that you think may be causing lag.

Does the whole thing count?

The player does not generate any lag whatsoever. The scrolling does - so it's caused by scratch's slow graphics engine.

Offline

 

#8 2010-02-17 20:19:23

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

Not that this is anything new, but take apart the scripts, and add onto the script which you need to add onto, and then attach it to the main script.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#9 2010-02-17 20:20:26

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

RHY3756547 wrote:

...I really dislike lag...

Who doesn't?  tongue


http://i.imgur.com/WBkM2QQ.png

Offline

 

#10 2010-02-17 20:28:37

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

Yeah, I have to wait 5 minutes to add one block to anything. xD I think they need to make Scratch run faster.


Note: This does not belong in Advanced Topics, this belongs in Troubleshooting or Suggestions.

Offline

 

#11 2010-02-17 21:44:13

urhungry
Scratcher
Registered: 2009-07-03
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

i have troubles with ingame lag, but not builder lag.

Offline

 

#12 2010-02-18 12:43:17

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

urhungry wrote:

i have troubles with ingame lag, but not builder lag.

I have troubles with everything lag.  sad

Offline

 

#13 2010-02-18 13:23:21

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

Me too. xD

Offline

 

#14 2010-02-19 23:26:03

carnack
Scratcher
Registered: 2009-06-30
Posts: 100+

Re: Lag in scratch makes me stressed while programming :(

It's always lag with you, isn't it? XD


http://i853.photobucket.com/albums/ab95/7x9/Carnack.png
Carnack The Bug

Offline

 

#15 2010-02-19 23:57:11

adriangl
Scratcher
Registered: 2007-07-02
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

WOW...you only notice this now  tongue  2.0 will definitely be a bit faster offline, but online, it will still use the stupid Java player  sad


Scratchin' since 2007

Offline

 

#16 2010-02-20 00:02:47

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

No, the entire scratch program will be online in v2, it will also be made entirely in flash. The question is will this change make the program several times faster as Rhy is hoping for.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#17 2010-02-20 00:13:20

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Lag in scratch makes me stressed while programming :(

archmage wrote:

No, the entire scratch program will be online in v2, it will also be made entirely in flash. The question is will this change make the program several times faster as Rhy is hoping for.

Really? Do you mean the development environment too?
What sources lead you to say this?


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#18 2010-02-20 00:18:03

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

Read though the scratch 2.0 thread in the announcements forum, one of the admins say it.

andresmh wrote:

what-the wrote:

Nice artical.Scratch online should be interesting. Will it be some big java application or something?

Our current plan is to make the editor and the player using Flash (like YouTube and ClubPenguin, among others). This is not final though.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#19 2010-02-20 00:47:48

adriangl
Scratcher
Registered: 2007-07-02
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

archmage wrote:

Read though the scratch 2.0 thread in the announcements forum, one of the admins say it.

andresmh wrote:

what-the wrote:

Nice artical.Scratch online should be interesting. Will it be some big java application or something?

Our current plan is to make the editor and the player using Flash (like YouTube and ClubPenguin, among others). This is not final though.

OMG....I hope this makes it better  smile


Scratchin' since 2007

Offline

 

#20 2010-02-21 00:48:16

OoOgAlOoOk
Scratcher
Registered: 2010-02-21
Posts: 2

Re: Lag in scratch makes me stressed while programming :(

I'm having the same problems with lag. I find that the only way in a big program to do any significant scripting is to at least stop the simulation, but also to dissect the script and make several smaller ones. To play larger games (like my upcoming Scroller game), make sure to go to presentation mode. My real problem is that the one project I've uploaded so far is slower than molasses in January. When the sun's taking a vacation. And geothermal activity has utterly ceased. And even hell's frozen, thank you Saints.
How can I get decent run speed with my game?

Offline

 

#21 2010-02-21 01:00:29

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

First off LAG isnt a big issue when scratch provides simplicity while programming and as per lag is considered i think i once asked scratch team to add functionality of adding blocks to scratch IDE , I have seen your most projects and they lag as you make the script humangous by your unobjective programming u write code many times for the same thing (in GALE)try using shorter scripts (that u cant) so make the scripts in fragments and then join them together when compilation .
Second thing
I dunno who told you that Flash is faster then squeak 0.o i tried to program very basic things on squeak (failed manytimes but as i am learning) and same things on flash for experimental purposes.. And yeah how can i forget C++

now here are the results
All resolutions were VGA
Test              || C++             || SQUEAK     || FLASH (actually Actionscript)
FPS(gale 3d)      257 *(blazing) || 200(nice)    || 140(kinda slow)
FPS(textured)    150( Awesom)|| 80(beaten)*|| 60 (again at backfoot)
**count/sec(idle) 1500(stunning)||900(stunner)|| 900 (this time it got it)
i may programm a basic game at three

*I had to copy some scratch code for this
** it counts the max time a do multiplication loop can run in 1 sec

Last edited by fanofcena (2010-02-21 01:03:00)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#22 2010-02-21 04:28:35

filo5
Scratcher
Registered: 2008-01-08
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

archmage wrote:

Lag isn't that stressful. Lag, is understandable, you can test it to see what is causing it. What is REALLY stressful is having a bug or script error that prevents your project from running properly the day before you need it finished. This isn't really an issue for scratch but with a lot of languages that kind of problem can pop up.

I am going to guess that the flash version will be faster, but probably not something like 7 times faster. Flash overall isn't that powerful, but compared to scratch's current online player its a powerhouse.

Actually, it might be just because they're using plain Java and not JavaFX. But yes, Flash engine would be a whole lot cooler. Not mentioning that Flash is also very portable - even newer mobile phones have it (well, most of them). If they manage to re-create Scratch in Flash (and I'm talking the whole application here), the possibilities will be great:
- Vector graphic (3 times faster than bitmap graphic if used properly)
- Engine that is not a VM (thus this would be 2 times faster)
- Flash is optimized for graphics
- Source code written in ActionScript - a programming language that people can understand
- - Now it would be possible to write plug-ins, since you can make an API

Yeah... Cool...


Converting my Scratch projects to Python!

Offline

 

#23 2010-02-21 19:23:15

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

Yes, lag can be annoying. I hope 2.0 is less laggy.


http://i48.tinypic.com/2z5pqad.png

Offline

 

#24 2010-02-22 09:20:45

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

filo5 wrote:

archmage wrote:

Lag isn't that stressful. Lag, is understandable, you can test it to see what is causing it. What is REALLY stressful is having a bug or script error that prevents your project from running properly the day before you need it finished. This isn't really an issue for scratch but with a lot of languages that kind of problem can pop up.

I am going to guess that the flash version will be faster, but probably not something like 7 times faster. Flash overall isn't that powerful, but compared to scratch's current online player its a powerhouse.

Actually, it might be just because they're using plain Java and not JavaFX. But yes, Flash engine would be a whole lot cooler. Not mentioning that Flash is also very portable - even newer mobile phones have it (well, most of them). If they manage to re-create Scratch in Flash (and I'm talking the whole application here), the possibilities will be great:
- Vector graphic (3 times faster than bitmap graphic if used properly)
- Engine that is not a VM (thus this would be 2 times faster)
- Flash is optimized for graphics
- Source code written in ActionScript - a programming language that people can understand
- - Now it would be possible to write plug-ins, since you can make an API

Yeah... Cool...

Have u ever tried using squeak


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#25 2010-02-23 12:22:54

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Lag in scratch makes me stressed while programming :(

fanofcena wrote:

First off LAG isnt a big issue when scratch provides simplicity while programming and as per lag is considered i think i once asked scratch team to add functionality of adding blocks to scratch IDE , I have seen your most projects and they lag as you make the script humangous by your unobjective programming u write code many times for the same thing (in GALE)try using shorter scripts (that u cant) so make the scripts in fragments and then join them together when compilation .
Second thing
I dunno who told you that Flash is faster then squeak 0.o i tried to program very basic things on squeak (failed manytimes but as i am learning) and same things on flash for experimental purposes.. And yeah how can i forget C++

now here are the results
All resolutions were VGA
Test              || C++             || SQUEAK     || FLASH (actually Actionscript)
FPS(gale 3d)      257 *(blazing) || 200(nice)    || 140(kinda slow)
FPS(textured)    150( Awesom)|| 80(beaten)*|| 60 (again at backfoot)
**count/sec(idle) 1500(stunning)||900(stunner)|| 900 (this time it got it)
i may programm a basic game at three

*I had to copy some scratch code for this
** it counts the max time a do multiplication loop can run in 1 sec

For me:

Flash: 38 (so slow)
Squeak: 20947 (best fastest)
Scratch: 940382032495 (better than best fastest)
Staroffice: 134 (stunning slow)

Offline

 

Board footer