phetsims / friction

"Friction" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/friction
GNU General Public License v3.0
4 stars 6 forks source link

RC Test Friction 1.6.0-rc.1 - Using the Arrow keys or WASD makes the book move really fast #322

Closed Matthew-Moore240 closed 1 year ago

Matthew-Moore240 commented 1 year ago

Test device Firefox 109.0 (64-bit)

Operating System Windows 11

Browser Firefox 109.0 (64-bit)

Problem description The sim seems to be moving at super speed. Using a single press of WASD or Arrow Keys sends the book almost all the way to the top/bottom/left/right

Steps to reproduce

  1. Use the keyboard either WASD or Arrow Keys
  2. Grab the book with space bar
  3. Move the book

Visuals These movements are all done with a single press of a direction.

https://user-images.githubusercontent.com/48224214/214161674-75d44f66-f93f-447a-a86f-562c8c6ccd82.mp4

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Friction‬ URL: https://phet-dev.colorado.edu/html/friction/1.6.0-rc.1/phet/friction_all_phet.html Version: 1.6.0-rc.1 2023-01-17 16:32:22 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0 Language: en-US Window: 2048x1019 Pixel Ratio: 1.25/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 Vendor: Mozilla (ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0)) Vertex: attribs: 16 varying: 30 uniform: 4095 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}

Nancy-Salpepi commented 1 year ago

I see that in https://github.com/phetsims/friction/issues/321 you increased the dragging speed, but it is faster in https://github.com/phetsims/qa/issues/886 than in the published version. I feel like this is affecting Voicing. In the current version, "Jiggling faster, warmer" gets skipped over a lot, when it didn't in 1.6.0-dev.28. Moving the book with shift + arrow, allows me to hear all the alerts nicely.

When using ?printVoicingResponses, "Jiggling faster, warmer" appears in the console, but it is usually skipped over

Screenshot 2023-01-25 at 9 53 02 AM
jessegreenberg commented 1 year ago

Confirmed, I also see it a little faster in master now compared to published. https://github.com/phetsims/friction/commit/446cb774706cdcda9f84b6963be4d7b677f4253d may have been done by inspection, Ill bet this can be fixed by just manually reducing the speed a little bit to match production.

zepumph commented 1 year ago

Yes indeed, it was empirically calculated. I tried to get it close. I wonder if there is another way to ensure it is identical.

zepumph commented 1 year ago

Anyone could work on this by just altering the velocities in FrictionKeyboardDragListener

https://github.com/phetsims/friction/blob/56d8e713ea311670d3fece7c2dc89ca6175f503f/js/friction/view/FrictionKeyboardDragListener.js#L27-L28

zepumph commented 1 year ago

Read up on things https://github.com/phetsims/scenery/blob/b8a6f884e6b5278fa444f40809d1574c869d82c5/js/listeners/KeyboardDragListener.ts#L94-L106

zepumph commented 1 year ago

Original paper trail:

https://github.com/phetsims/friction/issues/321 https://github.com/phetsims/scenery/issues/1437

samreid commented 1 year ago

Test with this URL: http://localhost/main/friction/friction_en.html?brand=phet&ea&debugger&voicingInitiallyEnabled&printVoicingResponses&preferencesStorage

zepumph commented 1 year ago

Over in https://github.com/phetsims/scenery/issues/1530 @samreid and @matthew-blackman and I found that there was a bug that meant that the current friction dragging would be dependent on how fast of a machine you were running.

Here, we can actually side-step that bug and just use dragVelocity, which we should have been doing over in https://github.com/phetsims/friction/issues/321 anyways. Updated above. @Matthew-Moore240 can you please confirm things are working better for you now on master?

zepumph commented 1 year ago

@Nancy-Salpepi it would be good if you wanted to double check on this too, because of your report in https://github.com/phetsims/friction/issues/322#issuecomment-1402018007

Nancy-Salpepi commented 1 year ago

The book is moving at a reasonable speed and Voicing is sounding much better with the change (and others) in master 🥳.

jessegreenberg commented 1 year ago

cherry-picked into 1.6 branch, ready to verify.

Nancy-Salpepi commented 1 year ago

This looks good in rc.3. Closing.