• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

Multi-stage Javascript Timer

JL58

Member
Joined
Dec 15, 2008
Messages
127
Conrad, you're my hero! Great job! So many of us have been asking for that. Thanks a lot.
 

Cride5

Premium Member
Joined
Jan 27, 2009
Messages
1,228
Location
Scotland
WCA
2009RIDE01
Support for Random-State scrambles

OK, so I've made a few more improvements to the timer. It now uses cookies to maintain a persistent config and keep track of past times/scrambles.

The main improvement is support for random-state scrambles. However, don't jump for the ceiling just yet.. it has only been tested under Ubuntu and Windows XP with Firefox 3 and the Java 6 plugin. To use random state scrambles it will need to be enabled by going to 'options' and checking the "Use random-state scrambles" checkbox.

Plugin-wise, it is recommended that you use the Sun Java plugin (I've tested with version 6, but it may also work with Java 5 or 1.42). Support with other plugins may be flakey, as many JVM implementations aren't fully standards compliant. I know for a fact that the icedtea Java plugin doesn't work (I think that may actually be the default under Ubuntu), so if you happen to be using Ubuntu, you can change your default plugin by typing: sudo update-alternatives --config java
If you're using firefox, you can check your plugin by typing>
Code:
about:plugins
in your address bar.

As for browsers, I've only tested with Firefox and Internet Explorer. Unfortunately, cTimer doesn't work in IE at all yet, and hadn't planned on really spending much time on it. If you are unable to use Firefox and really want to use cTimer, just let me know and I may look into fixing it..

Finally, platform-wise I'd imagine it should work on Mac if the Sun Java plugin and Firefox is being used. I have no idea if it works under Safari, so If anyone can test this let me know..

If you're using Firefox with the Sun Java 6 plugin and random-state scrambles aren't working could you let me know your: (1) Operating System (2) Firefox Version and (3) Plugin Version
... and I'll look into sorting it out.

Enjoi :)
 
Last edited:

Zarxrax

Member
Joined
Jan 7, 2009
Messages
1,282
Location
North Carolina
Hey, this thing is really useful! I thought that I need to mostly work on improving my F2L, but after using this thing, I'm not so sure anymore. My other stuff is looking pretty slow.

Cross 7.46
F2L 16.96
2L-OLL 5.06
PLL 6.18
Total 35.68
 

miniGOINGS

Member
Joined
Feb 27, 2009
Messages
3,049
Hey, this thing is really useful! I thought that I need to mostly work on improving my F2L, but after using this thing, I'm not so sure anymore. My other stuff is looking pretty slow.

Cross 7.46
F2L 16.96
2L-OLL 5.06
PLL 6.18
Total 35.68

I would go for your cross right now, just try and do it without looking. Also, if your using full PLL, that looks a little slow. Everything could be worked on, but I would stick with those for now.
 

Cride5

Premium Member
Joined
Jan 27, 2009
Messages
1,228
Location
Scotland
WCA
2009RIDE01
I've updated the app again. It now has:
* Random-state scrambles for 2x2 (thanks to Jaap's js solver)
* Scrambles for cube dimensions up to 7x7x7
* Saving of time breakdowns in cookies

Available in the usual place @ cube.crider.co.uk/ctimer.html

... any more bugs or feature requests just let me know.
 

Cride5

Premium Member
Joined
Jan 27, 2009
Messages
1,228
Location
Scotland
WCA
2009RIDE01
... it should now work in IE if that's your cup of tea :p

Currently it's only tested on IE6, so if you find any problems using it on other versions of IE (or any other browser) reply below and I'll look into it..

EDIT: Also works with Google Chrome.
 
Last edited:

Cride5

Premium Member
Joined
Jan 27, 2009
Messages
1,228
Location
Scotland
WCA
2009RIDE01
New updates for 2010

The app now resides at a new domain www.ctimer.co.uk

It now supports scrambles for:
* Pyraminx (random-state)
* Square-1
* Megaminx

I've also updated logging code to make it more efficient/scalable, meaning it should be possible to do avgs of 1000 without any significant performance overheads.

Details on averages of 5, 12 50 etc including the scrambles used are now accessible through the stats tab. Just click twice on the average and a popup will show the gory details.

Any bugs/feature requests post below..

Cheers.
 

Cride5

Premium Member
Joined
Jan 27, 2009
Messages
1,228
Location
Scotland
WCA
2009RIDE01
Jeremy Fleischman has recently created a new Java-based scrambler library, which makes use of Herbert Kociemba's open source two-phase solver implementation, and some of the code from my java/javascript scrambler applet.

The crucial improvement he made was to save and compress the lookup tables so that they are packaged up with the jar. It means initial use of the scrambler involves a 2.6 MB download, but all subsequant reloads of the scrambler are almost instantaneous provided the scrambler jar is cached locally. With Jeremy's permission I've now added this into the cTimer app, so random-state scrambles shouldn't cause any significant delay on page reloads.

Just as a final note, I've tested it on the following:
* Firefox 3 on Windows XP
* Google Chrome 4 on Windows XP
* Internet Explorer 6 on Windows XP
* Firefox 3 on Ubuntu Linux
* Google Chrome 5 beta on Ununtu Linux

It works fine on all tested apart from Chrome on Linux. There seems to be a problem with dynamic applet downloads, but I found an easy fix. If you're running Chrome on Linux and you want random-state scrambles, save the app on your local drive as a complete web page and uncomment the applet stuff at the bottom of ctimer.html

If you have any problems with it either post below or PM me and I'll see what I can do...

Finally, a big thanks to Jeremy for the improvements :)
 

Coisox

Member
Joined
Nov 23, 2009
Messages
14
how about implement voice input? allow user to create profile and record sample of voice beep (eg: "Beep","Done","Next", Wacha"). I'm average cuber and i regrip and rotate my cube a lot. So it's difficult to press the spacebar each time since my cube can fall. My average using CubeTimer is 37++ but when using cTimer i got 47-50 secs :(

p/s: I should put my laptop on floor and use my leg to press spacebar ;)
 
Last edited:

Cride5

Premium Member
Joined
Jan 27, 2009
Messages
1,228
Location
Scotland
WCA
2009RIDE01
how about implement voice input? allow user to create profile and record sample of voice beep (eg: "Beep","Done","Next", Wacha"). I'm average cuber and i regrip and rotate my cube a lot. So it's difficult to press the spacebar each time since my cube can fall. My average using CubeTimer is 37++ but when using cTimer i got 47-50 secs :(

I presume you're talking about using the 'multi-stage' feature. Personally, I just hover my hands over the spacebar and press with my pinkie when I'm doing a time breakdown. It probably slows me down a little, but it's good enough to gauge my overall performance breakdown.

Implementing voice activation is most likely beyond what regular Javascript can handle, so would require implementation in java with java-browser communication being used to send signals to the timer. Support for this across the browsers is pretty flakey, and I think the implementation effort involved probably wouldn't be worth it.
 

Coisox

Member
Joined
Nov 23, 2009
Messages
14
for the breakdown function, how about allow user to set "ignore key repeat". Lets say i set "ignore key repeat" to 1 secs, so if i double press the space bar, ur system will only capture once. This is because i always accidentally double press (or not sure whats actually happen) spacebar. And how bout considering all buttons around spacebar (GHJKLBNM<>) as spacebar since we have the "ignore key repeat" so that i can simply slap my keyboard.

This is example of my time:
10.52 15.80 0.06 7.34 33.72

My average is around that (33++) but it's impossible for me to 0.06 for OLL.

As for the voice recognition, i can use ur software together with windows speech recognition and it works just fine (almost consistently lag 2 secs). And maybe you could give option to user to combine with their own speech recognition software. Emm how to tell this...

1. Create hidden input box. Set cursor there when user hit the spacebar.
2. Using timer, check the hidden inputbox whether it changed and contains wording "space", "pace", "spade" or "spat". User can add this entry in the option. If return true, then it is a "spacebar"

The reason why i need to enter several wording is because windows voice recognition is not detecting my voice precisely.
 
Last edited:

peterbat

Member
Joined
Aug 9, 2008
Messages
102
WCA
2009BATT02
Great! This is very helpful. I just did an average of 12, and my cross+f2l has about 4x as much uncertainty as my LL. I did not know that until now. Time to make f2l more consistent...
 
Top