Solutions and writeups for Replicube, an open-ended programming puzzle game about writing Lua code to replicate 3D voxel objects.
Every puzzle has two leaderboards: code size and cycles (execution efficiency). Optimizing for one often comes at the expense of the other, which makes the golfing super fun! We go for both (⇀‸↼‶)ᕤ
Puzzles
01 - Replicube Tutorial Projects
| # | Puzzle | Code Size | Leaderboard | Cycles | Leaderboard | Date |
|---|---|---|---|---|---|---|
| 1 | The Very Basics | 2 | 🏆 #1 | 3.000 | 🏆 #1 | 2026-02-23 |
| 2 | Conditions May Apply | 6 | 🏆 #1 | 4.000 | #158 | 2026-02-23 |
| 3 | In Comparison | 11 | #200 | 7.000 | #7812 | 2026-02-23 |
| 4 | Explicit Nothingness | 10 | 🏆 #1 | 5.673 | #8615 | 2026-02-23 |
| 5 | Simple Quadrant | 12 | 🏆 #1 | 9.000 | #11358 | 2026-02-23 |
| 6 | 3x3 Grid | 19 | #21 | 5.992 | #967 | 2026-02-23 |
| 7 | Importance of END | 53 | #35 | 13.251 | #547 | 2026-02-23 |
| 8 | Simple Sushi | 20 | #541 | 9.520 | #1948 | 2026-02-23 |
| 9 | Basic Cup | 19 | #370 | 7.501 | #460 | 2026-02-23 |
| 10 | Quadrants | 21 | #28 | 5.673 | #10665 | 2026-02-23 |
| 11 | Variable Outcomes | 30 | #66 | 15.051 | #1113 | 2026-02-23 |
11 / 100 puzzles solved ꒰ᐢ⸝⸝•༝•⸝⸝ᐢ꒱
02 - Intro Challenges 1
| # | Puzzle | Code Size | Leaderboard | Cycles | Leaderboard | Date |
|---|---|---|---|---|---|---|
| 1 | Staircase | 5 | 🏆 #1 | 5.000 | #7548 | 2026-02-23 |
| 2 | Diagonal Line | 10 | 🏆 #1 | 4.163 | #8158 | 2026-02-23 |
| 3 | Big X | 16 | 🏆 #1 | 9.073 | #1513 | 2026-02-23 |
| 4 | Hello, Modulo | 5 | 🏆 #1 | 4.000 | 🏆 #1 | 2026-02-23 |
| 5 | Checkerboard | 14 | #36 | 4.800 | #7085 | 2026-02-23 |
| 6 | Angled Rainbow | 10 | 🏆 #1 | 4.286 | #8941 | 2026-02-23 |
| 7 | Wooden Table | 21 | #339 | 6.464 | #976 | 2026-02-23 |
18 / 100 puzzles solved ꒰ᐢ⸝⸝•༝•⸝⸝ᐢ꒱
03 - Alice Creations 01
| # | Puzzle | Code Size | Leaderboard | Cycles | Leaderboard | Date |
|---|---|---|---|---|---|---|
| 1 | Strawberry Cake Slice | 29 | #4 | 6.802 | #943 | 2026-02-23 |
| 2 | Basic Hourglass | 10 | 🏆 #1 | 6.395 | #911 | 2026-02-23 |
| 3 | Tiny Duck | 74 | #70 | 12.825 | #3208 | 2026-02-23 |
| 4 | Stairwell | 16 | 🏆 #1 | 11.901 | #8429 | 2026-02-23 |
| 5 | Little Chair | 50 | #263 | 7.160 | #565 | 2026-02-23 |
| 6 | Strawberry | 68 | #166 | 14.688 | #768 | 2026-02-23 |
24 / 100 puzzles solved ꒰ᐢ⸝⸝•༝•⸝⸝ᐢ꒱
04 - Alice Creations 02
| # | Puzzle | Code Size | Leaderboard | Cycles | Leaderboard | Date |
|---|---|---|---|---|---|---|
| 1 | Doggo | 117 | #203 | 17.627 | #2210 | 2026-02-23 |
| 2 | Fancy Hourglass | 29 | #24 | 15.182 | #1597 | 2026-02-23 |
| 3 | Not a Flower :) | 23 | 🥉 #3 | 14.504 | #2287 | 2026-02-23 |
| 4 | Tiled Room | 53 | #97 | 10.774 | #1365 | 2026-02-23 |
| 5 | Brick Wall | 63 | #56 | 9.907 | #2082 | 2026-02-23 |
| 6 | Puzzle Cube | 80 | #653 | 25.336 | #581 | 2026-02-23 |
| 7 | Cute Computer | 72 | #41 | 1.126 | #1126 | 2026-02-23 |
31 / 100 puzzles solved ꒰ᐢ⸝⸝•༝•⸝⸝ᐢ꒱
05 - Alice Creations 03
| # | Puzzle | Code Size | Leaderboard | Cycles | Leaderboard | Date |
|---|---|---|---|---|---|---|
| 1 | Penguin | 84 | #78 | 0.514 | #514 | 2026-02-23 |
| 2 | Tic-Tac-Toe | 49 | #21 | 3.068 | #3068 | 2026-02-23 |
| 3 | Orange Creamsicle | 50 | #76 | 2.702 | #2702 | 2026-02-23 |
| 4 | Building | 44 | #41 | 20.639 | #2571 | 2026-02-23 |
| 5 | Taco | 88 | #138 | 14.452 | #1371 | 2026-02-23 |
| 6 | Camera | 65 | #74 | 14.936 | #1736 | 2026-02-23 |
| 7 | Nostalgic Handheld Game | 115 | #313 | 19.651 | #3052 | 2026-02-23 |
38 / 100 puzzles solved ꒰ᐢ⸝⸝•༝•⸝⸝ᐢ꒱
06 - Sports
| # | Puzzle | Code Size | Leaderboard | Cycles | Leaderboard | Date |
|---|---|---|---|---|---|---|
| 1 | Football | 35 | #57 | 8.214 | #339 | 2026-02-23 |
| 2 | Tennis Ball | 29 | #533 | 8.608 | #255 | 2026-02-23 |
| 3 | Baseball Bat | 23 | #55 | 10.238 | #1261 | 2026-02-23 |
| 4 | Basketball Ball | 35 | #101 | 9.172 | #242 | 2026-02-23 |
| 5 | Tennis Racquet | 55 | #33 | 13.484 | #1516 | 2026-02-23 |
| 6 | Basketball Hoop | 77 | #59 | 17.761 | #2129 | 2026-02-23 |
| 7 | Bowling | 60 | #19 | 11.465 | #391 | 2026-02-24 |
| 8 | 8-Ball | 38 | #14 | 10.397 | #787 | 2026-02-24 |
| 9 | Billiards Table | 90 | #22 | 23.174 | #922 | 2026-02-24 |
47 / 100 puzzles solved ꒰ᐢ⸝⸝•༝•⸝⸝ᐢ꒱
07 - Game Ideas
| # | Puzzle | Code Size | Leaderboard | Cycles | Leaderboard | Date |
|---|---|---|---|---|---|---|
| 1 | Mini Truck | 68 | #44 | 10.656 | #739 | 2026-02-24 |
| 2 | Octopus | 83 | #34 | 20.361 | #823 | 2026-02-24 |
| 3 | Winter Hat | 47 | #52 | 22.698 | #387 | 2026-02-24 |
| 4 | Toy Tank | 56 | #187 | 23.041 | #902 | 2026-02-24 |
| 5 | Power Outlet | 85 | #54 | 21.810 | #1027 | 2026-02-24 |
| 6 | Roll a D6 | 86 | #43 | 21.984 | #986 | 2026-02-24 |
| 7 | First-gen 3D game console | 227 | #294 | 29.679 | #815 | 2026-02-24 |
54 / 100 puzzles solved ꒰ᐢ⸝⸝•༝•⸝⸝ᐢ꒱
08 - Music
| # | Puzzle | Code Size | Leaderboard | Cycles | Leaderboard | Date |
|---|---|---|---|---|---|---|
| 1 | Synthesizer | 88 | #66 | 14.089 | #565 | 2026-02-24 |
| 2 | Guitar | 146 | #65 | 28.617 | #609 | 2026-02-24 |
| 3 | Headphones | 84 | #83 | 15.777 | #415 | 2026-02-24 |
| 4 | Xylophone | 116 | #109 | 17.754 | #494 | 2026-02-24 |
58 / 100 puzzles solved ꒰ᐢ⸝⸝•༝•⸝⸝ᐢ꒱
09 - More Game Ideas
| # | Puzzle | Code Size | Leaderboard | Cycles | Leaderboard | Date |
|---|---|---|---|---|---|---|
| 1 | Improbable Tower | 49 | #148 | 17.558 | #1046 | 2026-02-24 |
| 2 | Clever Disguise | 110 | #143 | 15.860 | #354 | 2026-02-24 |
60 / 100 puzzles solved ꒰ᐢ⸝⸝•༝•⸝⸝ᐢ꒱
How Replicube works
Your code runs as a function evaluated for every voxel in a 3D grid. You get x, y, z coordinates and return a color (1-16) or 0 for empty. That’s it! Simple concept, surprisingly deep rabbit hole.
-- fill the whole cube orange
return ORANGE
-- top half blue, bottom half orange, using bit math
return y+11&-4
About
These solutions are a collaboration between me and Claude ✧⁺⸜(●˙▾˙●)⸝⁺✧
Each puzzle has its own folder with:
solution.luawith the golfed codeREADME.mdwith explanation and breakdownsolution.pngscreenshot from the game’s share feature