My First Game for the Playdate - FlatCube

2025-11-19 - [54] 9:4

After picking up the PlayDate about 2 months ago, I wanted to build something for it. Well, my first completed project for it is done! This is my annoying 3x3x3 twisty puzzle game "FlatCube"! Have you ever wanted to solve a Rubik's cube but only wanted to ever be able to look at 1 side? Have you ever wanted to solve a Rubik's cube, but you aren't allowed to turn the back side of the cube? Have you ever thought "I totally wish I couldn't rotate the whole cube"? Have you ever wanted your Rubik's cube to assign a random color scheme after every scramble? Well, FlatCube is here for you!

Screenshot of FlatCube showing the the front 3x3 side of a scrambled puzzle cube along with the button instructions: B-'(prime), A-F, Up-U, Down-D, Right-R, Left-L. The center sticker color is the 3rd lightest sticker color of the 6 sticker colors the cube.

FlatCube is a 3x3x3 twisty puzzle cube with a few changes and restrictions:

Controls

Screenshot of FlatCube in the Playdate menu with the option "scramble" highlighted

The cube can be scrambled by selecting "scramble" in the menu after hitting the Menu button on the Playdate.

Achievements

This game has 4 achievements. The achievements are:

When an achievement unlocks for the first time, the achievement title and a star will appear. A checkmark will also appear if the achievement was met during the current scramble.

Screenshot of FlatCube showing the front 3x3 side of a puzzle cube, where each piece has the same sticker color, along with the button instructions: B-'(prime), A-F, Up-U, Down-D, Right-R, Left-L. The center sticker color is the 3rd darkest sticker color of the 6 sticker colors of the cube. Achievements are also shown titled: "3x3", "3x3x1", "3x3x3?", and "3x3x3". All of the achievements have a star and a checkmark next to them.

When the cube is scrambled, all of the checkmarks for the achievements will disappear.

Screenshot of FlatCube showing the front 3x3 side of a scrambled puzzle cube along with the button instructions: B-'(prime), A-F, Up-U, Down-D, Right-R, Left-L. The center sticker color is the lightest sticker color of the 6 sticker colors of the cube. Achievements are also shown titled: "3x3", "3x3x1", "3x3x3?", and "3x3x3". All of the achievements have a star next to them.

3x3

You probably know someone who could "solve 1 side" of a Rubik's cube. In this case, I mean matching all of the colors on a single side. This achievement unlocks when all 9 stickers of the [F]ront side are the same color.

3x3x1

For a "side" to actually be solved on a Rubik's cube, the corners and edges need to be solved for the entire layer. To unlock this achievement, the entire [F]ront layer needs to be solved.

3x3x3?

There is a parity error on this cube. Because you cannot see the Up, Down, Right, and Left centers, you cannot know for certain by only looking at the [F]ront face whether you solved the cube or not. Once the cube is "solved", there is a 50% chance that the Up, Down, Right, and Left centers will be off by 180 degrees. Getting either of these 2 "solves" unlocks this achievement.

3x3x3

As I mentioned, there is only a 50% chance a solve happened. To guarantee a solve, this achievement requires you to "solve" the cube both ways on a single scramble.

The Future

I hope to make an NES and Game Boy port at some point in the future. I also don't intend to have FlatCube check if a cube scramble is valid or not. If the cube is invalid, using "scramble" in the menu should make the cube valid again.

Source Code / Compiled Game

Screenshot of the "SIDELOADED" menu on the Playdate console with a display card for FlatCube. The display card shows the front 3x3 side of a scrambled puzzle cube along with the words "FlatCube" and "by Vi Grey".

The source code and the compiled game are available over git.

FlatCube Git Repository

You can pull the repository via `git` over git://, http://, or https:// at `git.vigrey.com/flatcube`.

From the root directory of the git repository, the compiled game can be found at `playdate/bin/FlatCube.pdx` and sideloaded onto a Playdate.

Contact/Reply

If you would like to reply to this post, feel free to send me an email.

Email: vi@vigrey.com
PGP Public Key [515F AD67 F931 0A2B 9B93 CE19 814F ECB1 A398 63CE]