Discuss Scratch

turkey3
Scratcher
1000+ posts

Why does Scratch lag when powerful 3D PC games don't?

Just curious, because if my PC can run 3-dimensional games with hundreds of sprites and clones running at once without lag, why would Scratch, which is 2D lag? Does it have to do with flash instead of like C++?

PS: Scratch doesn't lag too much for me

I always pondered over this.

drmcw
Scratcher
1000+ posts

Why does Scratch lag when powerful 3D PC games don't?

1) It's running in a browser and so won't have access to hardware acceleration.
2) It's interpreted and not compiled
3) It's made to be simple to use not for performace
4) You have some responsibility in writing your program correctly.

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
DadOfMrLog
Scratcher
1000+ posts

Why does Scratch lag when powerful 3D PC games don't?

You said you don't find ‘too much’ lag, but when you do notice it, is it particularly when you're holding down keys, and not there at all when not touching keys?

Have you tried out the lag test project I put together, to see which events make it particularly bad?
(e.g. pressing keys/clicking mouse button/dragging mouse/etc.)
Read its notes/instructions to find out what it's doing and what's expected. And see some of its commments to get an idea what other people have found under different systems/browsers/etc.

If you're seeing lag mainly when holding down keys, you can usually deal with that quite effectively by switching off (or minimising) key repeat rate (in control panels/system prefs/whatever).


Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

LeDerpy123
Scratcher
1000+ posts

Why does Scratch lag when powerful 3D PC games don't?

I noticed this too. My budget Windows laptop with a terrible graphics card ran one of my projects better than one of the 2011 iMacs ran it.

My specs: Windows 8.1.2 - 3 GB RAM - Intel Core2 Quad - IE11

Powered by DjangoBB