Rubik’s Cube

Twist a real 3D Rubik’s Cube in Google’s 2014 doodle: watch it scramble, solve it by drag or keyboard and win a certificate with your moves and time.

A cube in Google’s colours. Click it to start.

Scrambled and ready: the counter starts at zero.

The Solver menu, added by the restoration, can finish the cube for you.

Solved: a certificate with your moves, time and two famous signatures.

Drag across the cube to twist a layer.

The help button explains the two kinds of swipe.

Google’s 2014 chart of the doodle’s keyboard shortcuts, based on the Singmaster notation.

Google’s Rubik’s Cube film, published on May 22, 2014.

Like this game?

At a glance

Released
May 19, 2014 — the Rubik’s Cube’s 40th anniversary year
Made by
Google Doodles with Google Creative Lab
Genre
Puzzle: a 3D Rubik’s Cube you can twist and solve
Players
1
Controls
Mouse or touch drags; keyboard letters F B U D L R, M E S, X Y Z
Goal
Solve the scrambled cube; the certificate shows moves, time and date
Technology
HTML5, CSS 3D and Three.js, on the Cuber cube engine
This version
A restoration of the lost doodle; Restart and the Solver menu were added later

What the Rubik’s Cube doodle is

On May 19, 2014, Google’s home page showed a small Rubik’s Cube instead of the usual letters. Its stickers were coloured in the blue, red, yellow and green of the Google logo. One click and the cube spins, scrambles itself and grows into a big, fully working puzzle that takes over the top of the page.

The date was a joke for puzzle fans. Google’s announcement counted 519 quintillion permutations of the cube, so 5/19 seemed a fine day to mark its 40th birthday. Google called it one of its most technically ambitious doodles so far.

Google no longer hosts the playable doodle, and its page in the Doodles archive is gone. What you play here is a restoration of it, rebuilt from Google’s own code. The cube, the help tips and the certificate are Google’s; the Restart button and the Solver menu next to the move counter were added later by the people who restored it, in place of the original Share button.

How to play

Getting started

  • Click or tap the little cube. It twists itself into a jumble, and after a few seconds a move counter appears bottom left and three buttons bottom right.
  • The ? button shows two tips with pictures: swipe outside the cube to rotate it, swipe on the cube to twist it.

Twisting

  • Drag across the cube to turn one layer. You can grab an outer face or a middle slice.
  • Swipe outside the cube to turn the whole cube a quarter turn and look at another side. The swipe has to be quick or long; a slow, short one springs back.
  • Keyboard: click on the cube once so it listens, then use the standard cube letters: F, B, U, D, L and R for the front, back, up, down, left and right faces, M, E and S for the middle slices, and X, Y and Z to turn the whole cube. In Google’s chart a capital letter turns 90° clockwise and a small letter 90° counter-clockwise.

Counting and finishing

  • The counter goes up by one for every twist of a face or slice. Turning the whole cube is free.
  • When every face is one colour again, the view pulls back and a certificate appears: “Cube Solved”, today’s date, your moves, your time and two signatures. The clock starts when the scrambled cube becomes playable.

The extra buttons

  • ↺ Restart gives you a fresh random scramble straight away.
  • The wand opens the Solver. Auto Solve plays the cube back to the start at high speed; with Single Step ticked you get Next Step and Back Step buttons instead. The solver does not work out a clever solution: it simply undoes every twist made so far, the scramble included, and each of those twists is added to your move count.

Google’s 2014 doodle and this restoration

Google’s own files from 2014, saved by the Internet Archive, show a few differences from the version here.

Google, 2014This restoration
Scramblealways the same 26 twistsa new random 30–40 twists each time
Buttonscounter, Help, Share (e-mail, Facebook, Google+, Twitter)counter, Help, Restart, Solver
Certificatecould show the name of the signed-in Google accountno name
Languagesthe language of your Google home page16 for the buttons and tips; the certificate stays in English, with the date in the local format

The cube itself, its controls, the help pictures, the logo opening and the certificate with its signatures come from Google’s doodle.

Who made it

Google announced the doodle in a post by Richard The, a designer at Google Creative Lab in New York and, by his own description, a child of the ’80s. The same post launched Chrome Cube Lab, a set of browser experiments built with the doodle’s technology.

The cube engine came from Creative Lab too. Stewart Smith writes on his own site that he began it as a weekend experiment while working there, called it Cuber, later renamed it ERNO, and that it became the base of Chrome Cube Lab; Google’s 2014 doodle files load a script called cuber.min.js. Mark Lundin, an interaction designer and coder from Bristol, told net magazine that he helped build the doodle, working with Creative Lab in New York and the Doodle team in California. The heavy, rounded lettering on the certificate is Rubik One, a typeface by Philipp Hubert and Sebastian Fischer of Hubert & Fischer, made for the Chrome Cube Lab project and published on Google Fonts; it later grew into the Rubik family.

How it was made

Google said it used some of its favourite web technologies, HTML5 and Three.js among them. The cube is not drawn as a picture: every sticker is a small HTML element, and CSS 3D transforms place it in space, so the browser itself does the turning. Three.js does the maths of positions and rotations, and Tween.js eases each twist.

The opening is a trick. The small cube in the Google colours is a real cube, twisted out of the solved state by a short sequence of moves, with the stickers that are not part of the logo painted white. A flat animation of that cube plays first and is then swapped seamlessly for the live 3D one, which scrambles itself while the space around it grows.

Alongside the doodle, Chrome Cube Lab offered experiments such as 808Cube and SynthCube for making music, ImageCube for a cube of your own photos and GIFs, and Type Cube for scrambled messages. Developers could ask for the code, through Rubik’s Cube Ltd, to build their own. Google’s post added that some of the experiments could be seen in Beyond Rubik’s Cube, a $5 million exhibition that opened at Liberty Science Center in New Jersey on April 26, 2014, with Google as lead creative partner.

Ernő Rubik and his cube

Ernő Rubik was born in Budapest in 1944. He studied architecture and taught interior design at the Academy of Applied Arts and Crafts in Budapest. In 1974 he built the first cube, at first to help his students understand spatial geometry.

He applied for a Hungarian patent in 1975, calling it the Magic Cube, and it went on sale in Hungarian toy shops in 1977. After a toy fair in Nuremberg, the Ideal Toy company took it to the rest of the world under a new name, the Rubik’s Cube, and in the 1980s it became, in Google’s words, “bigger than hairspray and breakdancing combined”.

Fun facts and small secrets

  1. A date chosen by a number

    Google’s 519 quintillion is the number of ways to put the cube’s pieces back together after taking it apart. Only about 43 quintillion of those can be reached by twisting; the rest can never be solved.

  2. Two famous signatures

    The certificate carries two handwritten signatures: Google co-founder Larry Page, printed under it as Lawrence Page, and the cube’s inventor, printed as Erno Rubik.

  3. A keyboard for speedcubers

    Out of respect for speedcubers, Google published a chart of the doodle’s keys. A note on it says the letters follow the Singmaster notation, the standard way of writing cube moves.

  4. A third tip nobody sees

    The doodle’s code holds a third help line, “Keyboard commands work too.”, but the help bubble closes after the second tip, so it never appears.

  5. A blessing from Rubik

    On the Chrome Cube Lab site Ernő Rubik wrote a short welcome: the cube was born in 1974 as a teaching tool, and he looked forward to seeing it re-jigged with new web technology. He signed off with a cheerful Cube on.

More puzzles

If you like puzzles with words rather than colours, try the Doodle Crossword Puzzle, a full crossword Google commissioned for the crossword’s 100th birthday in 2013. John Venn’s 180th Birthday is a gentler logic toy: pick a subject and a trait for two circles and watch what lives where they overlap.

See for yourself

Sources (13)
  1. Google — Bringing the Rubik’s Cube to the next generation of problem solvers (Richard The, May 19, 2014)
  2. Google Chrome Blog — the same post, with the keyboard shortcuts chart
  3. Google Doodles archive page “Rubik's Cube”, May 19, 2014 (Internet Archive)
  4. Google’s doodle code, iframe/scripts/main.js (Internet Archive)
  5. Chrome Cube Lab, June 2014 (Internet Archive)
  6. YouTube (Google) — How time travel will be invented (May 22, 2014)
  7. Stewart Smith — Rubik’s Cube
  8. Internet Archive — Official Google Blog post as of May 19, 2014
  9. Creative Bloq (net magazine) — Google’s interactive doodle is a real puzzler: interview with Mark Lundin (May 2014)
  10. Google Fonts — Rubik One (description and metadata)
  11. Liberty Science Center via PR Newswire — Liberty Science Center debuts major Rubik’s Cube exhibit on world tour (April 23, 2014)
  12. Lemelson-MIT — Ernő Rubik
  13. elgoog — Rubik’s Cube (the restoration this copy comes from)

Comments

No comments yet — be the first!

More Puzzle Games

View All Puzzle Games