You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! First off, I just want to say thank you to Becky and Josh for their help.
So, someone kindly showed me a Tetris game from RosettaCode.org, and sent me some code to use it in my experiments. This task works great for when you want to use it one time. However, for some reason, the speed at which the shapes fall speeds up every time you revisit the game. I tried to figure out why it does this, but I'm not having any success.
I am wondering if someone could help with this. I suppose that this could be done by making the shapes fall at a constant speed, or by somehow terminating the script, or something like that (if this the correct expression). I mention this latter solution because, if you refresh the webpage or lose, the shapes fall at the original speed.
I tried messing with the animate function (see below). Changing the delay variable did not seem to do anything, and although changing the lastFrameTime variable did affect the speed, I couldn't change it to solve the problem.
Below is the code for the file tet.html, which can be called using the external-html plugin as such:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi! First off, I just want to say thank you to Becky and Josh for their help.
So, someone kindly showed me a Tetris game from RosettaCode.org, and sent me some code to use it in my experiments. This task works great for when you want to use it one time. However, for some reason, the speed at which the shapes fall speeds up every time you revisit the game. I tried to figure out why it does this, but I'm not having any success.
I am wondering if someone could help with this. I suppose that this could be done by making the shapes fall at a constant speed, or by somehow terminating the script, or something like that (if this the correct expression). I mention this latter solution because, if you refresh the webpage or lose, the shapes fall at the original speed.
I tried messing with the animate function (see below). Changing the delay variable did not seem to do anything, and although changing the lastFrameTime variable did affect the speed, I couldn't change it to solve the problem.
Below is the code for the file tet.html, which can be called using the external-html plugin as such:
Here is the code for tet.html:
Beta Was this translation helpful? Give feedback.
All reactions