Total Miner Forums

Total Miner => Creative Features => Topic started by: # on January 31, 2016, 06:05:45 PM

Title: Rubik's Cube
Post by: # on January 31, 2016, 06:05:45 PM
Hey guys, thought I'd show you something I made the other day. It's fairly simple, but I think it's pretty cool. It's a fully functional Rubik's cube. You control it by "Swiping" the rows/columns. Pretty straight forward so I'ma just jump into it and show you the video. (The poor quality may make it hard to distinguish between the orange and red):

https://youtu.be/6rZI2ZZ3vbA

I didn't do too well explaining the scrabble thing, but basically it just sets it up 15 moves away from being solved. I can change that as well to be any moves away from being solved so it can have varying difficulties. The Rubik's cube is nothing too crazy, but I thought I might as well post something on it :P. It took a bit too make since you can't have consecutive move block/region commands w/o them overwriting each other, so I had to store the face positions before rendering the new colors.

#ErnoRubik2k16
Title: Re: Rubik's Cube
Post by: Dryym on January 31, 2016, 07:06:23 PM
Well, Everything else about this I can understand, And it seems like a bunch if rather simple scripts.

But I have to ask, How did you do the swiping action?

I'd imagine the scramble just makes 15 random turns to the cube itself, And you probably have it set up to a history counter as to easily change the amount of turns done.
Title: Re: Rubik's Cube
Post by: # on January 31, 2016, 07:24:47 PM
Well, Everything else about this I can understand, And it seems like a bunch if rather simple scripts.

But I have to ask, How did you do the swiping action?

I'd imagine the scramble just makes 15 random turns to the cube itself, And you probably have it set up to a history counter as to easily change the amount of turns done.

The swiping is done with script blocks between the colors that store history and activate using Look at Range.

The scramble isn't done that way since it'd be too slow and messes up eventually if done in too fast of succession. You can see that in the video since the cube changes all at once fairly quickly.
Title: Re: Rubik's Cube
Post by: Jesse on February 01, 2016, 12:09:12 AM
Nothing to insane. That is crazy but yet again i get amused by one block moving.
Title: Re: Rubik's Cube
Post by: Gary on February 01, 2016, 12:26:35 AM
Nice script! Really neat work here. Out of curiosity, approx how many lines of scripts did you use?
Title: Re: Rubik's Cube
Post by: Craig on February 01, 2016, 12:51:06 AM
##tagscriptsrock
Title: Re: Rubik's Cube
Post by: # on February 01, 2016, 01:06:44 AM
Nice script! Really neat work here. Out of curiosity, approx how many lines of scripts did you use?

I was pretty lazy with the rendering of the faces and didn't really feel like going with a bunch of conditionals, so I run a lot of copy blocks. I'd say about 40+ scripts with ~ 400 copy blocks (thank you replace text!) spread between them alone. About another 100 for the swiping and resets. Scramble is it's own 50. I bet if I did it right, I could've probably halved the amount needed for the faces.

##tagscriptsrock
8)
Title: Re: Rubik's Cube
Post by: Gary on February 01, 2016, 02:08:07 AM
I was pretty lazy with the rendering of the faces and didn't really feel like going with a bunch of conditionals, so I run a lot of copy blocks. I'd say about 40+ scripts with ~ 400 copy blocks (thank you replace text!) spread between them alone. About another 100 for the swiping and resets. Scramble is it's own 50. I bet if I did it right, I could've probably halved the amount needed for the faces.
 8)

Jesus. That must've taken ages.
Title: Re: Rubik's Cube
Post by: # on February 01, 2016, 02:15:38 AM
Jesus. That must've taken ages.

I probably only wrote around 100 lines by controller. The rest was done with replace text and offset. I think I only have like 30 hours on the world and a good bit of that is me away from my Xbox :P.
Title: Re: Rubik's Cube
Post by: Steve on February 01, 2016, 02:30:12 AM
I probably only wrote around 100 lines by controller. The rest was done with replace text and offset. I think I only have like 30 hours on the world and a good bit of that is me away from my Xbox :P.

Very nice, I've seen some other impressive scripts done by you as well, It's nice people like you are showing others what can be accomplished with scripts. We need more of that. Kudos
Title: Re: Rubik's Cube
Post by: Craig on February 01, 2016, 03:02:20 AM
by controller
Get a keyboard for crying out loud they're like 10 bucks, it'll pay for itself in the first hour.
Title: Re: Rubik's Cube
Post by: # on February 01, 2016, 07:25:39 AM
Get a keyboard for crying out loud they're like 10 bucks, it'll pay for itself in the first hour.

I don't know, ever since that weird enter bug that used to happen when using a keyboard, I just never got back into it :P. Plus, I never really noticed too much of a speed difference to take the time to pull one out anyways. The only thing I can think of that makes a difference is when you gotta navigate through those really long commands like Zone or HUDBar.
Title: Re: Rubik's Cube
Post by: Dryym on February 01, 2016, 07:47:04 AM
I probably only wrote around 100 lines by controller. The rest was done with replace text and offset. I think I only have like 30 hours on the world and a good bit of that is me away from my Xbox :P.

How did you use replace text? As far as I can tell, It only works for the entire script.

Although it would be nice if there were a way to use text replace only on the selected lines... Craig? ;)


Get a keyboard for crying out loud they're like 10 bucks, it'll pay for itself in the first hour.

I personally prefer a Chatpad. It's smaller, Quicker once you get used to it, It doesn't take a USB port, And it doesn't require you to put your controller down.
Title: Re: Rubik's Cube
Post by: # on February 01, 2016, 07:58:27 AM
How did you use replace text? As far as I can tell, It only works for the entire script.
....

I just copied the lines I wanted to replace into a new script quickly, replaced text, and then pasted it back into the original script when I was done.
Title: Re: Rubik's Cube
Post by: Dryym on February 01, 2016, 08:01:54 AM
I just copied the lines I wanted to replace into a new script quickly, replaced text, and then pasted it back into the original script when I was done.

Huh, That works well enough I guess. Although it would still be cool if Craig could make replacing text within the selection a possibility.
Title: Re: Rubik's Cube
Post by: Dark Hydrak on February 01, 2016, 12:04:31 PM
Yet another great game from

#
Great job.
Title: Re: Rubik's Cube
Post by: Stoneart on February 01, 2016, 02:43:19 PM
Very cool idea.
Title: Re: Rubik's Cube
Post by: Lord Leo on February 01, 2016, 05:46:17 PM
i have made this but without the swiping action