Rubik’s furniture layout generator
My first Unity game designSpring 2024
@Introduction to the Unity Game Engine, 99-358
Implementation tool: Unity
Instructor: Hugh Dyar


Reflection
Initializing the anchor point for rotation: When creating an empty object to set up a prefab, it is important to relocate the anchor point of game object to the origin. I found that if the origin of this object is not (0,0,0), the angles in SpaceWorld will spin weirdly.
Also, making a decision about the slide’s rotating direction was tricky. The rotation of front face should rotate counterclockwisewhen the mouse dragged down, while the left face should rotate clockwise with the same mouse movement. However, because each cube face is labeled with its allocated rotating directions regardless of their positions, -whether they are at the top, left, or front the movement seemed to keep changing. The direction of mouse drag was something I should have been more accustomed to.
Originally, I imagined rotating floor plans in a larger building. Due to inadequate skills and lack of time, I ended up with just furniture arrangement floor layouts (each color representing a different space program). I was not familiar with the C# language and have not mastered the libraries such that I am limited to passively following along with YouTube tutorials that provide great instructions.
Game Description
Like Rubik’s cube or other classic games, you can shuffle and color match cubes on your own, but you can also play by testing combinations of furniture layout in each color. (Disclaimer! It does not have a perfect interface, as the direction you turn the cubeface must be confusing sometimes, due to fixed mouse drag direction according to the cube face.) Hopefully it is fun to play the classic game by rotating it on the web.
How to play
It is cube game is not for matching colors; instead, it allows you to find the optimal arrangement of furniture. Mix them as much as you can until you feel comfortable.
Attributes for ALL used assets
- Furniture
Publisher: ithappy/ Publication date Oct. 11. 23/ Access date: Mar. 22. 24/ Version 1.0/ https://assetstore.unity.com/packages/3d/props/furniture/furniture-free-260522
- Cube scripts
Publisher: Megalomobile(youtuber)/ Feb. 23. 20/ https://youtube.com/playlist?list=PLuq_iMEtykn-ZOJyx2cY_k9WkixAhv11n&feature=shared
Controls
Press ‘space’ to restart
Mouse ‘left’ press and drag on the one
of faces(Up-Left-Front): rotate THE
FACE SIDE you press on.
Mouse ‘right’ press and drag in the
direction of one of edge of equilateral
triangle: rotate the entire cube.
- Furniture
Publisher: ithappy/ Publication date Oct. 11. 23/ Access date: Mar. 22. 24/ Version 1.0/ https://assetstore.unity.com/packages/3d/props/furniture/furniture-free-260522
- Cube scripts
Publisher: Megalomobile(youtuber)/ Feb. 23. 20/ https://youtube.com/playlist?list=PLuq_iMEtykn-ZOJyx2cY_k9WkixAhv11n&feature=shared
Controls
Press ‘space’ to restart
Mouse ‘left’ press and drag on the one
of faces(Up-Left-Front): rotate THE
FACE SIDE you press on.
Mouse ‘right’ press and drag in the
direction of one of edge of equilateral
triangle: rotate the entire cube.