Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » Lag when list isn't visible
- amgames
- New to Scratch
100+ posts
Lag when list isn't visible
I've been working on my Misdirection project for a while now and noticed a pretty big problem…the game lags a bunch when an arrow key is held in…this doesn't, however, happen when a list that the script uses is visible.
In my code, I make excessive use of blocks without screen refresh.
My main loop appears to do a few iterations very slowly, then around 20 or 30 faster than it should (there's a wait block in it). The “days since 2000” block also seems to be affected by the lag (?!?!).
Currently I cannot share the project, however I'm attempting to isolate it on my other account, @astro-mechanic.
In my code, I make excessive use of blocks without screen refresh.
My main loop appears to do a few iterations very slowly, then around 20 or 30 faster than it should (there's a wait block in it). The “days since 2000” block also seems to be affected by the lag (?!?!).
Currently I cannot share the project, however I'm attempting to isolate it on my other account, @astro-mechanic.
amgames
programmer ~ artist in training ~ pianist
programmer ~ artist in training ~ pianist
- astro-mechanic
- Scratcher
500+ posts
Lag when list isn't visible
I've managed to get it semi-isolated here, though now showing the list doesn't actually fix it either.
sign here
emperor of shiny things
emperor of shiny things
- amgames
- New to Scratch
100+ posts
Lag when list isn't visible
Bump!
amgames
programmer ~ artist in training ~ pianist
programmer ~ artist in training ~ pianist
- TheLogFather
- Scratcher
1000+ posts
Lag when list isn't visible
Are you using Chrome, by any chance? Have you tried other browsers? (Try Firefox, for example.)
Also, see how it behaves if you run it embedded: http://scratch.mit.edu/projects/embed/24432169/
If it's what I think, then you might find it interesting/relevant/helpful to read through the following topics/posts…
http://scratch.mit.edu/discuss/topic/2135/
http://scratch.mit.edu/discuss/post/101816/
http://scratch.mit.edu/discuss/post/22566/
http://scratch.mit.edu/discuss/post/322998/ (towards end of post)
http://scratch.mit.edu/discuss/post/117899/
http://scratch.mit.edu/discuss/topic/2424/
http://scratch.mit.edu/discuss/topic/43667/
http://scratch.mit.edu/discuss/topic/4817/
http://scratch.mit.edu/discuss/topic/4201/
http://scratch.mit.edu/discuss/topic/20706/
http://scratch.mit.edu/discuss/topic/7761/
Hope that's not information overload! - But they may help to give you a decent sense of what I think you're experiencing, as well as showing you're not alone, and some possible ways to tackle it…
Forgot to add… here's a lag test project that's mentioned in some of above, but may help you to check behaviour in different situations (browsers, keyboard events, mouse events, etc.):
http://scratch.mit.edu/projects/10125047/
Also, see how it behaves if you run it embedded: http://scratch.mit.edu/projects/embed/24432169/
If it's what I think, then you might find it interesting/relevant/helpful to read through the following topics/posts…
http://scratch.mit.edu/discuss/topic/2135/
http://scratch.mit.edu/discuss/post/101816/
http://scratch.mit.edu/discuss/post/22566/
http://scratch.mit.edu/discuss/post/322998/ (towards end of post)
http://scratch.mit.edu/discuss/post/117899/
http://scratch.mit.edu/discuss/topic/2424/
http://scratch.mit.edu/discuss/topic/43667/
http://scratch.mit.edu/discuss/topic/4817/
http://scratch.mit.edu/discuss/topic/4201/
http://scratch.mit.edu/discuss/topic/20706/
http://scratch.mit.edu/discuss/topic/7761/
Hope that's not information overload! - But they may help to give you a decent sense of what I think you're experiencing, as well as showing you're not alone, and some possible ways to tackle it…
Forgot to add… here's a lag test project that's mentioned in some of above, but may help you to check behaviour in different situations (browsers, keyboard events, mouse events, etc.):
http://scratch.mit.edu/projects/10125047/
Last edited by TheLogFather (July 8, 2014 09:25:50)
Siggy the Kumquat slayer:
Main account: DadOfMrLog –– Frameworks for basic pen-rendered 3D in scratch (see studio). Examples:
- - - - 3D Text - - - - - - Simple shapes - - - Controllable structures - - - On the ground - - - - - - In space - - - -
- - - - 3D Text - - - - - - Simple shapes - - - Controllable structures - - - On the ground - - - - - - In space - - - -
- amgames
- New to Scratch
100+ posts
Lag when list isn't visible
Thanks! I've checked out the links, and I am indeed using Chrome…yeesh, first it doesn't fix @media position types correctly, now it won't handle input events properly Luckily I've got a copy of Firefox waiting for just such a time (unfortunately most people don't). I've played with your project a bit, and, I'm a bit shocked at how it doesn't lag compared to Chrome in Firefox. Embedded version runs fine in both browsers. Are you using Chrome, by any chance? Have you tried other browsers? (Try Firefox, for example.)
Also, see how it behaves if you run it embedded: http://scratch.mit.edu/projects/embed/24432169/
If it's what I think, then you might find it interesting/relevant/helpful to read through the following topics/posts…
http://scratch.mit.edu/discuss/topic/2135/
http://scratch.mit.edu/discuss/post/101816/
http://scratch.mit.edu/discuss/post/22566/
http://scratch.mit.edu/discuss/post/322998/ (towards end of post)
http://scratch.mit.edu/discuss/post/117899/
http://scratch.mit.edu/discuss/topic/2424/
http://scratch.mit.edu/discuss/topic/43667/
http://scratch.mit.edu/discuss/topic/4817/
http://scratch.mit.edu/discuss/topic/4201/
http://scratch.mit.edu/discuss/topic/20706/
http://scratch.mit.edu/discuss/topic/7761/
Hope that's not information overload! - But they may help to give you a decent sense of what I think you're experiencing, as well as showing you're not alone, and some possible ways to tackle it…
Forgot to add… here's a lag test project that's mentioned in some of above, but may help you to check behaviour in different situations (browsers, keyboard events, mouse events, etc.):
http://scratch.mit.edu/projects/10125047/
(The way I'm making sure my scrolling boxes don't stick to the edge is by scaling them larger before placing them, then setting them back to 100% before stamping…I should probably just make a larger costume for that.)
amgames
programmer ~ artist in training ~ pianist
programmer ~ artist in training ~ pianist
- Discussion Forums
- » Bugs and Glitches
- » Lag when list isn't visible