scratchfoundation / scratch-vm

Virtual Machine used to represent, run, and maintain the state of programs for Scratch 3.0
http://scratchfoundation.github.io/scratch-vm/
BSD 3-Clause "New" or "Revised" License
1.2k stars 1.49k forks source link

Lag noticed in Cat Platformer game #1765

Open Mr-Dave2 opened 5 years ago

Mr-Dave2 commented 5 years ago

Expected Behavior

Game playing should have the same rate of motion as when played under Scratch 2

Actual Behavior

The game lags much more frequently when run under Scratch 3

Steps to Reproduce

Play this game through level 10. Since the amount of noticible lag in a game is subjective I’ve added some measurements that, for me at least, quantified what I felt as I played the game.

Scratch 3 link: https://beta.scratch.mit.edu/#262962679 Scratch 2 link: https://scratch.mit.edu/projects/262962679/

User cs1158230 reported in the forums that the lag in this project when run under Scratch 3 was "kinda bad". Because they only posted a link to a non-shared remix, I don't know who wrote the original project. Here's the post: https://scratch.mit.edu/discuss/topic/321471/

I modified the project by adding a frame rate calculation and a counter to show the number of one second intervals where the frame rate was less than 24. This is arbitrary but the lag in intervals with a frame rate less than 24 felt "kinda bad" to me (your mileage may vary).

I played the game through level 10:

Scratch 2.0 low frame rate count was 8 intervals Scratch 3.0 low frame rate count was 30 intervals

OS and Browser

Windows 10, Firefox 63.0.1 Intel Core T4400, 4GB

thisandagain commented 5 years ago

/cc @mzgoddard @kchadha