Can anyone give me some advice on the best way to creak a Rubik’s Cube type object? Each face of the cube will be made up on nine tiles. I would like to create the object so it floats on the screen, and can be turned with touch. Each tile will have a number, and when the user taps it, I need to read the number, and turn the tile a different colour. Is this too complicated for Corona? My aim eventually is to have different objects with different numbers of faces. What ya think, is Corona tough enough???
While this can certainly be done with Corona, it is way beyond something anyone could tell you how to do in ten easy steps.
That said, it will involve:
- 3D math to determine what faces of the cube are visible
- 3D math to calculate the rectPath https://docs.coronalabs.com/api/type/RectPath/index.html of each visible face
- Lua tables and/or tables of tables (depending on your preference) to store the face values.
- …
It is complicated for a first project but not too complicated for Corona. The complication comes from these requirements:
- The developer must understand the underlying data storage and manipulation mechanics. i.e. How is the data represented.
- The developer must be familiar with Corona SDK and its features in order to express the data visually.
- The developer must know Vector math.
This would be a little simpler using a 3D engine, but only marginally as it doesn’t alleviate any of the above requirements.
In point of fact, creating fully interactive Rubik’s Cube that can shuffle the faces correctly and knows when it is solved would an incredibly challenging project in any SDK or engine.
I would suggest you first see if you can solve the data representation, shuffling faces (in data only), and testing for the solved case. i.e. No visual representation, just data and equations/functions.
One thing you would find very hard to do in Corona is to rotate a segment of the cube. However, you didn’t specify that as a interaction. I think you implied instantly changing faces.
Hi Roaminggame - thanks for your reply. It certainly sounds like it’s going to be very challenging. I don’t need to rotate the segments - I only want to select squares on each face. So each face of the cube will have have 4 or 9 squares, and each of those will be individually selected (hopefully!) I’ll have a look at Vector math and see if that puts me off the idea! Thanks again
While this can certainly be done with Corona, it is way beyond something anyone could tell you how to do in ten easy steps.
That said, it will involve:
- 3D math to determine what faces of the cube are visible
- 3D math to calculate the rectPath https://docs.coronalabs.com/api/type/RectPath/index.html of each visible face
- Lua tables and/or tables of tables (depending on your preference) to store the face values.
- …
It is complicated for a first project but not too complicated for Corona. The complication comes from these requirements:
- The developer must understand the underlying data storage and manipulation mechanics. i.e. How is the data represented.
- The developer must be familiar with Corona SDK and its features in order to express the data visually.
- The developer must know Vector math.
This would be a little simpler using a 3D engine, but only marginally as it doesn’t alleviate any of the above requirements.
In point of fact, creating fully interactive Rubik’s Cube that can shuffle the faces correctly and knows when it is solved would an incredibly challenging project in any SDK or engine.
I would suggest you first see if you can solve the data representation, shuffling faces (in data only), and testing for the solved case. i.e. No visual representation, just data and equations/functions.
One thing you would find very hard to do in Corona is to rotate a segment of the cube. However, you didn’t specify that as a interaction. I think you implied instantly changing faces.
Hi Roaminggame - thanks for your reply. It certainly sounds like it’s going to be very challenging. I don’t need to rotate the segments - I only want to select squares on each face. So each face of the cube will have have 4 or 9 squares, and each of those will be individually selected (hopefully!) I’ll have a look at Vector math and see if that puts me off the idea! Thanks again