• 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!

Programmers wanted

bcube

Member
Joined
Sep 8, 2010
Messages
340
Hi,

as you may know, java applets of the Rubik´s cube 3x3x3 used to be great on webpages but are not nowadays.

There is a wonderful JS-based applet but unfortunetely the author of it currently does not have a time to finish it so that it could work as the old java applets.

What is missing for 3x3x3 cube:
- parsers for cube notations and cube scripts
- player for cube scripts

Would any of you programmers be willing to help programming that JS-based applet in order to release an equivalent for java-based applet that could be put on the webpage?


P.S. for various reasons, I do not find this applet and this applet as good as java applets used to be...
 
Joined
Apr 22, 2006
Messages
54
Location
Oranjestad, Aruba
WCA
2003BLON01
YouTube
Visit Channel
I think I understand your various reasons, but let me state my own for thinking exactly the same thing.
1. alg.garron.us is nice for his website, but not for embedding (it doesn't offer tools for embedding)
2. Roofpig by Lars Petrus is awesome, but the cube doesn't look as good as the applet by Werner Randelshofer (now defunct java applet). Configuration is so powerful it's a bit too much, not simple enough.

There is a WebGL applet by Randelshofer as well that looks great, but I couldn't get it to work. :-(
I have started working on my own, based on an old project of a 3D model by Tiffany Wang (not a speedcuber, it was a graphics assignment for her course).

https://github.com/blonkm/rubiks-cube

Check the development branch. I think it looks nice, but I am having trouble implementing the graphics part and the algorithm part (esp. slice moves). I don't have a demo online yet.

Update: I have a demo online at http://rubikscubealgorithms.com/scripts/. Slice moves are working, as are algorithms. Warning: beta, you may encounter bugs. I am hoping to get testers.
 
Last edited:

Lucas Garron

Administrator
Joined
Jul 6, 2007
Messages
3,718
Location
California
WCA
2006GARR01
YouTube
Visit Channel
Any reason you couldn't help out with any of the existing efforts to make it meet your needs?
I've found that asking for people to do it won't work. You need to go and make it happen.

I have this functionality planned for twisty.js (which powers alg.cubing.net), but currently I don't have time to work on it.
 

molarmanful

Member
Joined
Dec 13, 2014
Messages
393
Location
Smerbia
WCA
2015PANG02
YouTube
Visit Channel
I started working on my own cube visualizer API a while back. The Github is here: https://github.com/molarmanful/gCube

Naturally, the API started turning up errors. As of the time of this post, the OLL stages do not work properly :(

Perhaps some ideas can be gleaned from my API? It is powered by ThreeJS, jQuery, and Google Chrome Cube Lab code. It is supported in all browsers except IE (but who cares? IE's going away soon!)

Oh yeah, and yes, I'd be interested in helping code the aforementioned applet.
 
Last edited:

bcube

Member
Joined
Sep 8, 2010
Messages
340
Expand up "for various reasons."

Generally inability for me as a non-programmer to modify it so that it could meet my needs (see my numbered list below).

There is a WebGL applet by Randelshofer as well that looks great, but I couldn't get it to work. :-(

Could you be more specific why you could not get it to work? Perharps other programmers would help you to get it to work if they knew where your trouble is.

Any reason you couldn't help out with any of the existing efforts to make it meet your needs?

One and only: I am not able to make a piece of programm in any language. In the past I was fiddling only with pascal and matlab (but successfully forgot most of it). Of course you can respond "time to learn it!" and can still be right.

I've found that asking for people to do it won't work. You need to go and make it happen.

Agreed, that would be best for me. But even if you have driving licence, prooving that you can drive a car and having some theoretical skills for how to repair some broken parts, in case of broken engine you would probably look for an expert to fix it (i.e. you would not do it by yourself). Of course this example is absurd, but I think you get my point.

but currently I don't have time to work on it.

Not to mention, it is not a priority for you.

I started working on my own cube visualizer API a while back.

It is nice to see other programmers are trying to make JS applet. My initial intention was "to help" Werner with his wonderful applet. Since I can not make a programm, asking programmers for help is the best I can do :-(. Since Werner has the plans to make not only a 3x3x3 cube but also other puzzles like 5x5x5 or Octagon etc., and I can imagine after writing parsers for cube notations and cube scripts + player for cube scripts it will be much easier for him to continue creating such puzzles, I am begging all of you to get his 3x3x3 applet finished first. After all, you can always implement some parts of the code into your applet afterwards.

-----------------------------------------------------

If I could pick, these features would be ideal for me (related to Josef´s java applet):

1.) no border around the applet (white or tranpared border are ok)

2.) adjustable size of applet - would it be possible to enter only one value (e.g. height) and the other would be automatically calculated, meaning that height/width ratio would be always optimal?

3.) bgcolor parameter - white or transparent

4.) speed parameter - Werner´s java applets allow to adjust this parameter by the end user but I like Josef´s solution (i.e. adjustable be me) slightly better

5.) buttonbar parameter - useful for me/the end user are values 0 and 1

6.) edit parameter - for my purposes (making a web tutorial) is necessary only value zero (default in Lucas´ applet, not default in Werner´s JS applet)

7.) movetext parameter - VERY IMPORTANT feature for the end user, needed value 0 - through additional text I can describe what is really happening on the applet in the moves no. 64 - 72 for example (this was the main reason I chose Josef´s java applet for 3x3x3 instead of Werner´s one back in 2004)

8.) move parameter - please make standard notation, Lars´ is awful for me to define

9.) facelets parameter - please make something standard (see Josef´s or Werner´s java applet), Lars´ is awful for me to define

10.) control buttons should be large enough for mobile users

11.) to rotate the cube, a solution shown by Josef´s java applet would be best for the end user - the cube can be rotated as the user wants it to be (in conjunction with no. 6, no "space around the cube" is needed for making a rotation - the rotation could be made by clicking on the cube and moving the mouse or tapping and moving the finger in case of mobile users)
 
Last edited:
Joined
Apr 22, 2006
Messages
54
Location
Oranjestad, Aruba
WCA
2003BLON01
YouTube
Visit Channel
Why don't you go on my github page and make all these new issues, so we can think about them. I would love to have you as a beta tester, even though my cube program is not nearly as far developed as others. I think visually it's the best I've seen around, unless anybody has a better one. Randelshofer has a perfect one, sublime I have to say as far as looks go, but it's more complicated. I don't have the stamina to work on his codebase. My own codebase is fairly small. I would like it if other WebGL able-programmers would look at it. I am working with the original programmer now and she has done a great job modeling the cube in Maya.

http://rubikscubealgorithms.com/scripts/
 

bcube

Member
Joined
Sep 8, 2010
Messages
340
Michiel van der Blonk

First off, very nice job!

Why don't you go on my github page and make all these new issues, so we can think about them.

Honestly, I do not understand that page. Every time I try to look for something (wca regulations for instance), I do not find it easily there. Maybe it is caused by the fact that if possible, I try to avoid github at general, so I do not have enough experience with that page. Nevertheless, I am more than willing to write my observations here in this thread.

Randelshofer has a perfect one, sublime I have to say as far as looks go, but it's more complicated. I don't have the stamina to work on his codebase.
I see. Well, let´s hope other brilliant programmers/coders will look at it (Josef, I am looking at you, even though I believe you do not have a time right now) sometimes later. Except for molarmanful, I already know about one more experienced programmer who is interested in it (and he managed to get it work as well :) ).


At the first sight, the model looks very nice. It does not appear on mobile phone, though. The cube is over-lubricated, meaning that left click and drag is not kind of controllable (for me it does not matter, because my purposes are different than playing with it). Someone could expect (me, for example) that when one layer is selected, such selected layer will always be rotated when moving a mouse. Right click and drag works better, even though it rotates rather quickly for me (but I think I could get used to it). I have a feeling that it rotates somehow different than I wanted to rotate, therefore second "alignment" is often necessary (on the other hand, it can get better after some "playing time"). The view at the cube is little bit odd - by that view, it is not clear what is R, L or F for beginners...

The buttons "R", "L" and others at the end of the page do not work properly after the cube is scrambled.. But since I will not use that, it does not bother me ;-)

If I may ask, when do you plan to add buttons like "one move forward", "play", "stop", "skip to the end of sequence" etc.?
 
Last edited:
Joined
Apr 22, 2006
Messages
54
Location
Oranjestad, Aruba
WCA
2003BLON01
YouTube
Visit Channel
@bcube

I'm sorry you're having a hard time with GitHub, I can understand why, it's quite technical. But I purposely made a link for you to follow, so you could instantly click on 'new issue' and report issues. Perhaps you missed it. I assure you this is easier for me, than making my own issues.

Here it is again: https://github.com/blonkm/rubiks-cube/issues

I think it's interesting for you to watch the progress, and see what is being done. The buttons problem is solved btw.

After the basics are done I will start looking at embedding first, then at algorithms and controls. Right now I am working on a more practical way of doing double layer moves and cube rotations. I am not even doing those, I am combining e.g. E' with U to form u. I am not sure if I will implement WCA notation. I am quite fond of Harris' notation, which really stood the test of time, but was impractical for large cubes. For a regular 3x3 an algorithm like y R2 u R' U R' U' R u' R2 F' U F is really nice and short.

I am testing in several browsers and on slow and fast computers. Right now I am sitting at an old PC with IE at work, and the cube works fine. I don't want it to be too slow on older computers or browsers, so perhaps it looks too fast on faster machines. An adjustable speed would help.

I notice anti-aliasing is a problem in WebGL, so I wonder how Randelshofer was able to make such good graphics. Keep looking at the page, I upload new versions almost daily now.

I agree the rolling during drag with right mouse is annoying, and unnatural.
 
Joined
Apr 22, 2006
Messages
54
Location
Oranjestad, Aruba
WCA
2003BLON01
YouTube
Visit Channel
Also, when did anti-aliasing stop being a thing?

It seems antialias is off by default, and it's decided by the browser whether to use it or not. Even enabling it in WebGL is only a hint to the browser and no guarantee. I tried enabling and got no visible better effect on Chrome and IE. The only solution is to do your own antialias by resizing the image. It's a technique I used on my ImageCube implementation (an adaptation of Josef's ICube), and there it worked really good.
 
Joined
Apr 22, 2006
Messages
54
Location
Oranjestad, Aruba
WCA
2003BLON01
YouTube
Visit Channel
Implement some parts of the code

After all, you can always implement some parts of the code into your applet afterwards.

Unfortunately this is not usually how code works. It's like saying 'you can use my kitchen design in your house'. It takes a lot of adaptation to make something fit, especially such a big program as the applets by Randelshofer. Writing from scratch is our best bet right now. We can take ideas off of each other's tools though.

The starting point is important. I wanted to start with Google's cube, but at first I couldn't find the code. I think that cube has some downsides as well in terms of usability. I liked this one I took best, even though it was an abandoned project.
 
Joined
Apr 22, 2006
Messages
54
Location
Oranjestad, Aruba
WCA
2003BLON01
YouTube
Visit Channel
Could you be more specific why you could not get it to work? Perharps other programmers would help you to get it to work if they knew where your trouble is.

The problem I think is http://stackoverflow.com/questions/27237696/webgl-detach-and-delete-shaders-after-linking

I will continue to research if I can solve it. Maybe Werner Randelshofer was testing on other browsers or OS, or WebGL has changed over time.

On e.g. http://bbprojx.net/cube/ Randelshofer WebGL cubes are used, but they don't work on my browser either. (BBcube is not you, right?)
 

molarmanful

Member
Joined
Dec 13, 2014
Messages
393
Location
Smerbia
WCA
2015PANG02
YouTube
Visit Channel
I wanted to start with Google's cube, but at first I couldn't find the code. I think that cube has some downsides as well in terms of usability.

gCube is built upon Google Chrome Cube Lab. It can be found here if you need it.

In my personal opinion, the Google Cube library is actually perfect for this kind of stuff, partly because almost every function you need is packed into the library. Also, the cube is rendered with CSS instead of WebGL, which makes the cube easier to modify (for me at least). The library's quite versatile and extendable, and it's easy to learn.
 
Joined
Apr 22, 2006
Messages
54
Location
Oranjestad, Aruba
WCA
2003BLON01
YouTube
Visit Channel
gCube is built upon Google Chrome Cube Lab. It can be found here if you need it.

I know, as I said: at first. Later, when I had already started my project I found it. I've downloaded it and still need to look at it more thoroughly.

In my personal opinion, the Google Cube library is actually perfect for this kind of stuff, partly because almost every function you need is packed into the library. Also, the cube is rendered with CSS instead of WebGL, which makes the cube easier to modify (for me at least). The library's quite versatile and extendable, and it's easy to learn.

I like it, sure. I have seen what you have done with it, and it's quite powerful. Still I am looking for more and nicer looking. I don't know if we can wait for Werner Randelshofer (it's been quite some time).

But, the good news is: I was able to get his WebGL version working, it was a case of missing files, so much easier than I thought. If it's legally possible (it's CC, not GPL) I will make a GitHub project of his code as well.

Here's a demo: http://rubikscubealgorithms.com/scripts/rubikplayer/. It gets slow with a lot of cubes on the page, but with a couple it's really fine, and the graphics are awesome.

I figured out how to make it play custom algorithms, but I need to work on stickers as well. (don't click the play button though, it doesn't work yet).
 

bcube

Member
Joined
Sep 8, 2010
Messages
340
I'm sorry you're having a hard time with GitHub

Do not be, it is not even your fault!

Perhaps you missed it. I assure you this is easier for me

I did indeed. Thank you for giving that link one more time. I will give it a shot then.

I think it's interesting for you to watch the progress

You have no idea how exciting your development is :p

I am quite fond of Harris' notation, which really stood the test of time, but was impractical for large cubes

So you say you are thinking about making also larger cubes? For my purposes I will use only 2x2x2 - 5x5x5 and on 4x4x4 and 5x5x5 you can always use wca notation instead of Harris-ENG, but it is not even necessary - you can perfectly use lower cases (without addition of some numbers before a lower case) up to 5x5x5 cube using SiGN. I agree that for 3x3x3 are lower cases advantage.

Unfortunately this is not usually how code works.

Ah. That sucks :-(

We can take ideas off of each other's tools though.

Yay, that is awesome :)

Maybe Werner Randelshofer was testing on other browsers or OS, or WebGL has changed over time.
On e.g. http://bbprojx.net/cube/ Randelshofer WebGL cubes are used, but they don't work on my browser either. (BBcube is not you, right?)

Werner is aware of this thread, so maybe he will explain it himself. On that linked page the applets do not appear in firefox but interestingly they work on Android. And you got it right, I am not BBcube.

I was able to get his WebGL version working

Congratulations! Very exciting stuff!

The buttons problem is solved btw.

No it is not yet. By "scrambled cube" I meant hand-made scramble, not clicking on scramble button. Regardless of cube orientation, hitting R or L or U or D button makes (sometimes) a slice move. The same effect can be observed if you click on reset button and then to R,L,U or D button again (also it happens sometimes).
 
Last edited:

bcube

Member
Joined
Sep 8, 2010
Messages
340
For those who didn't know, Michiel is doing excellent job.

As he is working on his project, several issues show up. The one I have in mind is that when viewing his site on android (galaxy ace 3), the cubes are not visible.

Could you please test it on your mobiles/tablets and post the results here or to his github mentioned earlier? Any help would be appreciated.

If any of you, by any chance, knows why the cube is not shown on android (or even how to fix this bug), please do not hesitate to tell it.

Thank you in advance.
 
Top