All Projects → MWRuszczycky → rubiks

MWRuszczycky / rubiks

Licence: BSD-3-Clause license
3D-Rubik's cube simulator written in Haskell using Gloss

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to rubiks

Yave
Yet Another Vulkan Engine
Stars: ✭ 211 (+627.59%)
Mutual labels:  3d-graphics
keikan
An elegant (imo) rendering engine written in Rust.
Stars: ✭ 55 (+89.66%)
Mutual labels:  3d-graphics
OpenGL-3D-Game-Tutorial-Series
C++ OpenGL 3D Game Tutorial Series - Learn to code a Cross-Platform OpenGL 3D Game in C++ from scratch
Stars: ✭ 132 (+355.17%)
Mutual labels:  3d-graphics
Awesome Point Cloud Analysis
A list of papers and datasets about point cloud analysis (processing)
Stars: ✭ 3,104 (+10603.45%)
Mutual labels:  3d-graphics
Berserk
[WIP] High performance 3D graphics game engine
Stars: ✭ 31 (+6.9%)
Mutual labels:  3d-graphics
jrender
Jrender is an efficient differentiable rendering library implemented in jittor.
Stars: ✭ 280 (+865.52%)
Mutual labels:  3d-graphics
Methanekit
🎲 Modern 3D graphics made simple with cross-platform C++17 meta-API on top of DirectX 12 & Metal (Vulkan is coming)
Stars: ✭ 197 (+579.31%)
Mutual labels:  3d-graphics
fly
Flight simulator in OpenGL
Stars: ✭ 76 (+162.07%)
Mutual labels:  3d-graphics
raytracing-go
A simple Go library for 3D ray-tracing rendering, implementing the book Ray Tracing in One Weekend. 📸
Stars: ✭ 53 (+82.76%)
Mutual labels:  3d-graphics
three-fspy-camera-loader
Script for importing fSpy camera data into three.js.
Stars: ✭ 16 (-44.83%)
Mutual labels:  3d-graphics
Arcane Engine
3D C/C++ Game Engine - Created By Brady Jessup
Stars: ✭ 242 (+734.48%)
Mutual labels:  3d-graphics
Plotoptix
Data visualisation in Python based on OptiX 7.2 ray tracing framework.
Stars: ✭ 252 (+768.97%)
Mutual labels:  3d-graphics
fsharp-3d-and-gamedev
Resources on 3D Graphics Programming and Game Development in F#
Stars: ✭ 92 (+217.24%)
Mutual labels:  3d-graphics
Tomviz
Cross platform, open source application for the processing, visualization, and analysis of 3D tomography data
Stars: ✭ 230 (+693.1%)
Mutual labels:  3d-graphics
TermGL
2D & 3D graphics engine in the terminal [C/C++]
Stars: ✭ 219 (+655.17%)
Mutual labels:  3d-graphics
Uranium
A Python framework for building Desktop applications.
Stars: ✭ 210 (+624.14%)
Mutual labels:  3d-graphics
vtkplotlib
Wrap up VTK (python 3D graphics library) into an easy to use 3D equivalent of matplotlib
Stars: ✭ 31 (+6.9%)
Mutual labels:  3d-graphics
HxSTLParser
Basic STL loader for SceneKit
Stars: ✭ 23 (-20.69%)
Mutual labels:  3d-graphics
PhasmaEngine
3D Graphics Engine
Stars: ✭ 39 (+34.48%)
Mutual labels:  3d-graphics
nub
A rendering and interaction Processing library
Stars: ✭ 28 (-3.45%)
Mutual labels:  3d-graphics

rubiks

Overview

This is a 3D-Rubik's cube simulator written entirely in Haskell using Gloss.

rubiks demo

Play

The play is pretty rudimentary (it's just a Rubik's cube), but it seems to work!

  • To quit the game, close the window or press Esc
  • To rotate a layer of the cube, left-click on a cell in the layer and drag it to an adjacent cell in the direction that you want to rotate (see the demo animation above).
  • To rotate the whole cube, left-click adjacent to the cube and drag up-down or left-right.
  • To scale the cube, right-click anywhere and drag up to reduce the size or down to increase the size.
  • To undo your last move, press the space bar.
  • To return the cube to the solved state, press 's'. This clears all previous moves.
  • To add n random moves to the current cube, press n where n is a digit between 0 and 9. Pressing 0 will add 10 random moves. So to add 15 random moves, press 0 then 5. Doing this will clear all previous moves, so you cannot undo it!
  • You can also play with a cube that is colored any way you like using the -c option and a path to a text file containing the six RGB hexcodes you want to use. For example, the demos directory contains a pastel color scheme that you can apply by running rubiks -c demos/pastels.txt.

To display help information (including the above command list), run rubiks --help at the terminal.

Installation and uninstallation

The game uses the Haskell Tool Stack, so to clone and compile the repository, try

git clone https://github.com/MWRuszczycky/rubiks.git
cd rubiks
stack build

To run the game from within the repository after building, try

stack exec rubiks

Alternatively, you can locally install it using

stack install

from within the repository and Stack will tell you where the binary has been placed. You should now be able to run the game from either the command line or the program menu.

To uninstall, delete the repository and the binary installed by stack if you did a local install. There are no other configuration files.

Known issues and to-do

  • The program should run on Windows and Linux. If you are using a tiling window manager (e.g., i3), then you may need to toggle floating mode on the window. I do not have a Mac to test rubiks on; however, an issue has been raised that window resizing can cause warping of the cube when running in this system. Suggestions and pull requests are welcome.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].