UTimer released!

United Thought

Regular
Joined
Apr 21, 2015
Messages
144
Location
UK
This is a very compact, very basic timer website written in JS. I want this to be an exercise firstly for me to improve my skills in web programming, and secondly where, starting with a basic shell of a timer, the community requests what features they would like, the end product being a timer with no superfluous functionality.

Please could anyone knowledgeable on the subject provide me with advice/explanations on certain features and how I could improve my code more generally.

UTimer v1.1.0:

link to site: http://www.utimer.site40.net/main.html
link to source: [main.html]
---------------: [main.js]
size: 7.17KB

Implemented features:

-Scramble generation (333 only).
-Scramble generation now prevents consecutive moves on the same axis.
-PBs and Averages just for the current session + time display and reset function.
-Solve timer.

Partly implemented features:

-Inspection time(runs infinitely atm).

Features in progress:

-None

Requested features:

-Account system/time log + comparison with other users.

All help/advice/critiscism is greatly appreciated!
 
Last edited:
Scramble generated with your code: R U D' D' B' D D2 L U U' B F2 F L2 B2 U' B2 R U' R2 B D2 L2 B B2

If this is a programming exercise for yourself the scrambling code needs a lot of improving, if you care more about the actual result I'd suggest using https://github.com/cubing/jsss for scrambles.
 
Scramble generated with your code: R U D' D' B' D D2 L U U' B F2 F L2 B2 U' B2 R U' R2 B D2 L2 B B2

If this is a programming exercise for yourself the scrambling code needs a lot of improving, if you care more about the actual result I'd suggest using https://github.com/cubing/jsss for scrambles.

Thanks! Yeah, the original code was useless.
The new code now prevents consecutive moves. Yes, this is an exercise for myself so any further tips would be greatly appreciated!
 
In my opinion, if you're not doing random state scrambles, you should also prevent or concatenate sequences like U D' U2. I believe there are many ways to do this.
 
In my opinion, if you're not doing random state scrambles, you should also prevent or concatenate sequences like U D' U2. I believe there are many ways to do this.

Good news! The website is now live and functional at http://www.utimer.site40.net/main.html!

Agreed. I just got this scramble:

U2 D2 F' D' F2 R2 L2 D' L' U' R2 U2 R' F2 L2 F' D2 L2 D2 L2 D2 U2 D2 U2 D2

If the current random turn is on the same axis as the previous turn, than the next turn cannot be from that axis. Something like that.
 
In my opinion, if you're not doing random state scrambles, you should also prevent or concatenate sequences like U D' U2. I believe there are many ways to do this.

Agreed. I just got this scramble:

U2 D2 F' D' F2 R2 L2 D' L' U' R2 U2 R' F2 L2 F' D2 L2 D2 L2 D2 U2 D2 U2 D2

Ok, I will start working on preventing these trivial cancellations.

E: The scrambler code has now been changed to prevent consecutive moves on the same axis.
 
Last edited:
averages (5/12/100)? PBs (1/5/12/100)?

if this is just an exercise for web-programming, you could also make a way for users (with accounts) to save their times and compare with others (if your host allows PHP, etc...). That would be pretty cool and really simple to code.

in my opinion, let us know if you need guidance
 
averages (5/12/100)? PBs (1/5/12/100)?

I will start working on this.

averages (5/12/100)? PBs (1/5/12/100)?

if this is just an exercise for web-programming, you could also make a way for users (with accounts) to save their times and compare with others (if your host allows PHP, etc...). That would be pretty cool and really simple to code.

in my opinion, let us know if you need guidance

I think the host does allow PHP, but that's about it. (That's what you get with a free host)

I have never used PHP for anything before, so I will have a lot to learn but I think I will leave implementing this feature until later. Thanks for the offer of advice as well! I will tell you if I have any major issues.
 
I will start working on this.



I think the host does allow PHP, but that's about it. (That's what you get with a free host)

I have never used PHP for anything before, so I will have a lot to learn but I think I will leave implementing this feature until later. Thanks for the offer of advice as well! I will tell you if I have any major issues.
Bump. You can use localStorage or (not recommended) cookies to store times, if you want to stick with JS.
 
Back
Top