Skip to content

A 3D Rubik's cube game rendered using OpenGL and C++.

Notifications You must be signed in to change notification settings

RakshaaKamath/RubikCube

Repository files navigation

RubikCube

In this project, we create a 3D Rubik's cube using OpenGL and C++. The cube has six faces, each consisting of nine colored squares. The goal is to scramble the cube and then solve it by restoring each face to a single color.

To achieve this, we implement various features

  • User can rotate the cube along the x, y, and z axes and freely move it with the mouse pointer for different viewing angles.
  • The user can change the rotation speed of the cube's sides.
  • Keyboard controls are provided for users to rotate each side of the cube.
  • There's an option to reshuffle and reset the cube, along with a timer and scoring system. The score decreases as the solving time increases.

Objectives

  • The Rubik’s Cube is a 3D puzzle with six faces of nine colored squares, challenging and captivating for decades.
  • Create a virtual Rubik’s Cube game for users to play on their computers.
  • Allow users to interact with the 3D cube, scramble it, and solve it.
  • Provide a graphical interface for learning and improving solving strategies.

Non-Functional Requirements

Software requirements

  • CodeBlocks IDE or similar with a C/C++ compiler.
  • OpenGL.
  • Compatible Operating System (Windows/Mac/Linux).

Hardware requirements

  • Modern Processor.
  • Minimum 2 GB RAM.
  • Display with at least 800x600 resolution.
  • Keyboard and mouse.
  • Graphics Card.

Implementation includes

  • Difficulty levels.
  • A menu system.
  • Rotation controls for X, Y, and Z axes.
  • Adjustable rotation speed (decrease or increase).
  • User controls for shuffling and resetting the cube.
  • Timer functionality.
  • Scoring system.

Result snapshots

Running the program : Enter the correct difficulty level

1

Running the program : Re-enter the difficulty level if entered wrong

if wrrong

Adjusting Rotational speed

adjust the rotational speed

Shuffle Cube

  • Users can shuffle the cube in order to start solving along with the restart of the timer.
shuffle

Reset Cube

  • Users will be able to reset the cube along with the restart of the timer.
reset

Control Instructions

  • Users are able to check a drop down panel where they can view the set of instructions to control, view, rotate the cube accordingly.
control instructuions

About

A 3D Rubik's cube game rendered using OpenGL and C++.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published