Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Rubik's cube.
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Smile Rubik's cube. - 03-04-2010, 06:20 PM

Here is a working rubik's cube.

-It shuffles itself in a way that should always be solveable. (Give it a a few seconds to shuffle)
-It can tell when you have completed it.
-The green sphere is used to turn the cube one side away.
-The red sphere is used to get a good view of all sides of the cube.
-You can click and drag the mouse to turn a row column or the whole cube.
-If you want to simply click. press the space bar to switch to a seperate mode where you click a sticker then a direction.
-I tested this for a while and it should be glitch free. (please report any, if there are any, so i can fix them.)

EDIT: fixed the red sphere niteshifter.
EDIT2: 1.4 added.
Attached Images
File Type: jpg capture00.jpg (12.8 KB, 147 views)
Attached Files
File Type: a2w rubik'_cube1.41.a2w (1.46 MB, 98 views)

Last edited by Veryuhbull; 03-08-2010 at 10:13 PM. Reason: editting description for lazy people
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Talking 03-04-2010, 07:16 PM

I am glad to see you are back veryuhbull!
   
Reply With Quote
Old
Niteshifter
Guest
 
Status:
Posts: n/a
Default 03-04-2010, 07:18 PM

Found something. While the cube is scrambling itself up and you press the red sphere, the cube's pieces will rotate themselves into a jumbled mess.
   
Reply With Quote
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Default 03-04-2010, 07:29 PM

Quote:
Originally Posted by Niteshifter View Post
Found something. While the cube is scrambling itself up and you press the red sphere, the cube's pieces will rotate themselves into a jumbled mess.
I actually knew about this and attemted to fix it but it evidently did not save the first time. reuploaded to fix.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 03-07-2010, 07:53 AM

It never stops mixing up. I could probably solve 3/4ths of it. I can in real life


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
you guys
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Default you guys - 03-07-2010, 10:15 AM

This is the second complaint about the shuffle. So i will attempt to address it. It takes less than a minute to shuffle (on my computer) and then you can go.

Are you really that impatent jediaction? (unless you have a valid bug.) I may attempt at some point to entirely rehaul the whole randomize method to account for impatient people.

The reason it goes that slow is because i use a randomized pick from all cubes. It then calls the turn methods. I tried copying the code into the method to cut out the call time but that changed nothing.

So i am inclined to believe it is the "selected" set value to random item. that causes the slow down. Even when i set the world speed multiplyer on an unreasonablly high number it does little. (maybe shaving off a second or two.)

If this is so painful a problem i might just scrap that method for a psuedo-random one. Any suggestions would be gladly accepted.

EDIT: I scraped the old and created a better faster method that is still random.

Last edited by Veryuhbull; 03-08-2010 at 11:03 PM.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 03-08-2010, 07:43 AM

I sped it up x10 for a minute. It never takes that long


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Default 03-08-2010, 05:20 PM

Actually the speed slider bar does nothing to my world because the program can't be handled in alice. (i think) I currently am slashing my code (removed about 200 lines so far) to simplify everything, hopefully speeding it up.

EDIT so now i can get a light speed shuffle that breaks itself, now searching for what caused the problem.

EDIT2: fixed the break problem. 1.4 is actually now smaller due to coding changing and works better than before.

Last edited by Veryuhbull; 03-08-2010 at 11:05 PM.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 03-08-2010, 06:32 PM

I have finally had the chance to look at the program, and these are the complaints I had:

1. There is really no need to have it shuffle for more than 20 times. Anything more than that is just time-consuming.

2. There is a very small time period between when you click the square and when the row moves which is annoying at first, but I got used to it.


Other than that it is a great program with almost no flaws!! I did notice however as the cube was shufflying, on the last shuffle i clicked a square and the entire cube just fell apart . Other than just, just please reduce the time it takes to shuffle to at the most 15 seconds, and it will be a perfect program.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 03-08-2010, 07:24 PM

Quote:
Originally Posted by Veryuhbull View Post
Actually the speed slider bar does nothing to my world because the program can't be handled in alice. (i think) I currecntly am slashing my code (rmoved about 200 lines so far) to simplify everything, hopefully speeding it up.

EDIT so now i can get a light speed shuffle that breaks itself, now searching for what caused the problem.

I could speed it up


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Reply

Tags
cube, puzzle, rubik, rubik's, rubiks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.