Inspiration

The inspiration for the game comes from the Tetris Cube, which is a 3D block puzzle. The goal of the puzzle is the create a full cube with all of the pieces.

What it does

The game offers a fun way to challenge your spatial reasoning. The player can view the puzzle pieces from any angle and they must figure out how the pieces fit together to make a cube.

How I built it

Using THREE.js I created a blank scene with a camera, lights, and a renderer. After setting the scene I created the polycube shapes by merging box geometries and translating them. I colored each polycube uniquely, and placed them scattered on the scene. Finally I added controls to move the camera and drag the blocks.

Challenges I ran into

I had a hard time figuring out how to merge box geometries to create polycubes. I spent a lot of time researching how to merge geometries. It turns out I was missing a part of the library that I needed, and I needed the updated module. I also tried to implement physics with ammo.js but I realized I needed more time if I was going to get the physics implemented, so I left it out.

Accomplishments that we're proud of

I am proud that I was able to create all of the puzzle pieces and render them in 3D space. Having no previous experience in THREE.js I did more than I thought I could.

What I learned

I learned a lot of introductory information about how to use THREE.js to create objects in 3D space with lighting and interactive movement.

What's next for Tetris Cube

I want to implement collision physics for the blocks to not overlap. I created this game as a 3x3x3 cube but the original physical game is 4x4x4. I want to create a 4x4x4 version or even bigger.

Share this project:

Updates