Making a Rubik's Cube

Get help using Construct 2

Post » Fri Jul 06, 2012 5:56 am

So right now i'm trying to build a 2D Rubik's Cube for the game i'm working on. I'm hitting a wall as far as rotating the cube. I've been looking through code examples from Java and C+ to try to figure out what mathematical principle it works on, but none of the stuff i've found has really helped.

Here's a link to my project: http://dl.dropbox.com/u/64045180/Rubiks/rubiks.capx

Right now i'm basically using 6 arrays to store all the information about the cube faces. I numbered each cube face 1-54 in the hopes that i could figure out some kind of mathematical way to make it work. Haven't found one yet, lol

Does anybody have any pointers for me as far where to start? Any books/tutorials that you know of that would be useful to me?
B
18
S
3
G
1
Posts: 35
Reputation: 1,875

Post » Fri Jul 06, 2012 8:35 am

k, so i think i made a mini-breakthrough here.

What was giving me the most trouble before was figuring out how to make the buttons rotate the cube without "losing" one of the sides. I just realized that you can store the side that would otherwise be lost in another array. Still not sure if i'm doing it the most efficient way, but that's ok.

the file: http://dl.dropbox.com/u/64045180/Rubiks/rubiks.capx
B
18
S
3
G
1
Posts: 35
Reputation: 1,875


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests