QB64.org Forum

Active Forums => Programs => Topic started by: Qwerkey on December 20, 2018, 10:31:56 am

Title: Rubik's Cube (Updated)
Post by: Qwerkey on December 20, 2018, 10:31:56 am
This is an updated version of my Rubik's Cube program which first appeared at the now-defunct [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there].

This program is for your personal use only.

You will need the User Manual.

Cube manipulations are performed by Function Key.  Perhaps manipulation by using the mouse would be easier, though when I first created the program I found this too difficult.  Perhaps such a later version might be easier for the user, although once you get used to the F-keys the program is user-friendly enough, I think.


If I may immodestly say, I believe that this program would have some marketability and would have been a good one for QB64.org to sell.  But Rubik's Cube and any graphical representation of it are copyrighted.  I was only allowed to put this program onto QB64 by agreeing that it will only be used for hobbyists. 

You may not distribute any files or executable.  Personal use is courtesy of  Rubik's Brand Ltd.
Title: Re: Rubik's Cube (Updated)
Post by: bplus on December 21, 2018, 08:53:38 am
Interesting comparing your version to what I did back in May (Just Basic). I did all my turns 90 degrees clockwise with the right hand using an axis(x, y, z) + layer (1, 2, 3 top down, front to back or left to right) key presses signal. And I also solved by recording the moves and "reversing" them by turning each 3 more times clockwise which effectively eliminates the last move made. I too had no Rubik's cube to experiment with and ended making one of paper to help visualize results of moves. It was a very challenging programming problem.

My screen layout looked like this (after 3 moves, 1st layer of each axis):

EDIT: hmm... first snapshot didn't look right so I ran program x1, y1, z1 and got this screen shot.
Title: Re: Rubik's Cube (Updated)
Post by: Qwerkey on December 21, 2018, 10:20:03 am
It was a very challenging programming problem.

Yes, I think so too.  In fact I could not quite work out what I had done in 2015 when I originally wrote the program.
Title: Re: Rubik's Cube (Updated)
Post by: madscijr on November 23, 2021, 05:05:37 pm
This may be a dumb question, but where is the code?
Thanks
Title: Re: Rubik's Cube (Updated)
Post by: bplus on November 23, 2021, 07:07:54 pm
This may be a dumb question, but where is the code?
Thanks

There is a link from the manual:
https://www.dropbox.com/s/weos935r9w66fki/Rubik's%20Cube.zip?dl=0
Title: Re: Rubik's Cube (Updated)
Post by: madscijr on November 23, 2021, 10:59:38 pm
There is a link from the manual:
https://www.dropbox.com/s/weos935r9w66fki/Rubik's%20Cube.zip?dl=0

Aha! Duh, LoL!
Thank You!
Title: Re: Rubik's Cube (Updated)
Post by: madscijr on November 24, 2021, 02:41:37 pm
This is an updated version of my Rubik's Cube program which first appeared at the now-defunct [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there].

This is awesome @Qwerkey - nice job!
Title: Re: Rubik's Cube (Updated)
Post by: Qwerkey on November 25, 2021, 05:24:26 am
This is awesome - nice job!

@madscijr Thank you.  You are too kind.
Title: Re: Rubik's Cube (Updated)
Post by: madscijr on December 21, 2021, 05:06:48 pm
Hey @Qwerkey , any chance of expanding this to also handle 2x2 or other size cubes?
Title: Re: Rubik's Cube (Updated)
Post by: Qwerkey on December 23, 2021, 09:29:11 am
@madscijr I regret that I am unlikely to revisit this project.  It was created rather a long time ago (in a previous version of QB64 which I updated so as to feature it here).  But never say never!

Title: Re: Rubik's Cube (Updated)
Post by: madscijr on December 23, 2021, 09:59:51 am
@madscijr I regret that I am unlikely to revisit this project.  It was created rather a long time ago (in a previous version of QB64 which I updated so as to feature it here).  But never say never!

No worries... Your program is just so good!
Another idea I think what would be cool to see some day, would be
first, to be able to use QB64 to write programs for VR headsets like the Oculus,
and second, to be able to move your cube in VR with your hands,
just like the real thing!

Have a happy holiday and thanks again for sharing that amazing code!