For me, one line (from one side to the other, when it is moving almost through the middle) needs a little bit less than third of a second. (Just counted 60 in 22 seconds.)
@Hippo, that is top speed -- right? Believable. However, in the greenfoot application, it runs SO much quicker (probably 20 to 30 or more times quicker). The visual effect is greatly enhanced..
Yes, it does run faster directly in GF. Unfortunately, even optimizing your code (if it is even possible in any way) won't really make a difference because all uploaded scenarios run slower since the conversion to JS. You can even notice a difference at speed 50 which makes playing games on the site often easier than they are in GF.
@Hippo, I could probably determine the chord length of a completed line and, instead of moving (or drawing) 5 pixels at a time, move (draw) the entire chord length each act step. I would think that would help for the visual on the site.
A new version of this scenario was uploaded on 2019-07-15 00:26:04 UTC
Should be faster now.
2019/6/29
2019/6/29
2019/6/30
2019/7/5
2019/7/6
2019/7/6
2019/7/6
2019/7/6
2019/7/15
2019/7/15
2019/11/17
2019/11/17
2020/1/30