Rubic's cube

I have just recently came to an idea that of a Rubic’s cube as a nice script/ algorithm example. See and comment on my result at http://virtualplayground.d2.pl . I am also going to add some easing to the movement of the cube later on.
I have seen many examples of Rubic’s cube done in Flash Actionscript and other technologies, but none in Unity. This has also prompted me to do that. I have also to sort out whether publishing of it could infringe the rubic’s copyright or how to not infringe the copyright. The script could of course be also applied to forms like pyramid and others.

http://www.starscenesoftware.com/UltimateCube.html

–Eric

Thanks, Eric5h5, and this is just what I needed the stepper for. I am going to add some touch ups to it and make the source available on the web afterwards.

I have just made my cube project available for download from my page

Hi tomekkie, i also trying to make a virtual rubiks cube from unity
this is wat i do so far:
http://dl.dropbox.com/u/14215911/RubiksCube.html
the simulator may not be gd but just to share wit you since we are doing the same thing…:slight_smile:

Thanks for the post, wx91 - I have seen your cube - and it is different from mine, but serves its purpose - the mechanism is working! I would suggest changing the color of button labels to more readable one.

Interesting, what is your webplayer size? mine is 63 kB.

Now I wonder which is easier: scripting the mechanism, or solving the cube - say standard 4x4 cube.?

I remember solving the cube myself about four or five times some 30 years ago when they first appeared and I remember it was hard for me.

tomekkie

my webplayer size is 171 kB.

I am bad at this cube game but i enjoy playing it.

For me,it will be programming it,since i can’t solve it although there are guide in solving it but lazy to learn:)

For me, I think it’s roughly the same, but programming is much more time consuming, because of learnig curve and many options to consider and make the choices.

But the most difficult would be to script the solving of the n-cube in the smallest number of moves. For me - too big challenge to pick.

But me as well as you could consider adding to our cubes a functionality of saving the game by user, possibly - I don’ t know whether it’s a good idea, because I’ve never done it before - by setting a cookie.

you may use unity in-built function to save the game PlayerPref.something… which can be done.

i never script the solving of n-cube cause like you i think it is a too big challenge to take also as it involve a lot of calculation…

but you can play cheat in solving the cube like when the computer is generating the cube, you can record the rotation of the cube and reverse it to solve it.:slight_smile:

programming can play cheat sometimes…

Could do with a way to look around the cube

To be exact, you mean scrambling. But my script does that in random way, so this is not the optimal and to solve scrabled cube there could be a shorter way than just reverse recorded moves…

drag the mouse over the app window; mousescroll to zoom in/ out/.

Possibly I should put a hint for that on GUI.

Pretty nice! I only had two corners left and then messed, so I quit lol.

But anyway it looks like you need a new camera script because man is it hard to think sideways well your solving it lol. Maybe making the cube spin instead of the camera.

I wonder is there a difference between rotating the cube or rotating the camera? Relative rotation matters. Do you mean the camera rotates in wrong direction? or adding a small window for a back camera?

Well I sort of meant that the current camera seems to have polar constants (sure looks like MouseOrbit"). Making it hard to get it at the right rotation. And I just thought it might be easier to rotate the cube rather then the camera. But whatever floats your boat :wink:

Thanks. Possibly I,ve got what you mean. Currently, like you have noticed, I use a ready-made CameraOrbit script, but I have an idea of other way of doing that which could fit your suggestions and I think I could verify that.

I have just added new options for mapping the cube tiles or sides.
Mapping the sides adds to the solving difficulty level.
When the tiles are individually mappped (with arrows in this case) - for the inside tiles - not only the color but also the rotation matters.
When the sides are mappped with picture - for the inside tiles - not only the color and rotation, but also the strict position matters.

I have just added a database script and now can invite anyone to the cube contest.

Also moved the maps outside and now the cube can be mapped with any logo or graphic from external file.