<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Atakan Kartli</title>
    <description>The latest articles on DEV Community by Atakan Kartli (@clovercase_dev).</description>
    <link>https://dev.to/clovercase_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4272731%2F2560058b-8bd6-46b2-9f51-40fcd92b9185.png</url>
      <title>DEV Community: Atakan Kartli</title>
      <link>https://dev.to/clovercase_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/clovercase_dev"/>
    <language>en</language>
    <item>
      <title>How I generate 160 solvable Kanoodle-style puzzles for an iPhone game (Expo + Three.js)</title>
      <dc:creator>Atakan Kartli</dc:creator>
      <pubDate>Sun, 29 Nov 2026 17:35:14 +0000</pubDate>
      <link>https://dev.to/clovercase_dev/how-i-generate-160-solvable-kanoodle-style-puzzles-for-an-iphone-game-expo-threejs-50m5</link>
      <guid>https://dev.to/clovercase_dev/how-i-generate-160-solvable-kanoodle-style-puzzles-for-an-iphone-game-expo-threejs-50m5</guid>
      <description>&lt;p&gt;I grew up with ball-piece packing puzzles: a small case, a dozen plastic pieces made of fused balls, and a card showing which pieces start on the board. Kanoodle is the one most people know. When I looked for a good version on iPhone, the closest match by name was rated about 1.4 stars, and most of its reviews complain about ads. So I built my own: &lt;strong&gt;Clover Case&lt;/strong&gt;, a free Kanoodle-style puzzle game for iPhone.&lt;/p&gt;

&lt;p&gt;Here are the parts that turned out to be more interesting than I expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  The board math is unforgiving (in a good way)
&lt;/h2&gt;

&lt;p&gt;The classic board is 11 × 5 = 55 holes. The piece set is twelve shapes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Piece size&lt;/th&gt;
&lt;th&gt;Count&lt;/th&gt;
&lt;th&gt;Balls&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;3 balls&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4 balls&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5 balls&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;12&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;55&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Exactly 55 balls for 55 holes. There's zero slack: if every piece goes in, the board is full. That's why the last piece always either clicks perfectly or doesn't fit at all, and it's also what makes this a nice exact-cover style problem to generate levels for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generating levels with a known answer
&lt;/h2&gt;

&lt;p&gt;A level is a board with some pieces already locked in place, like the picture cards in the physical game. The generator works backwards:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A solver packs the full board with all twelve pieces.&lt;/li&gt;
&lt;li&gt;Pieces are removed from that solution, leaving a puzzle that is guaranteed to be solvable.&lt;/li&gt;
&lt;li&gt;The fewer pieces you're given, the harder it gets.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That gives four difficulty books of 40 levels each, &lt;strong&gt;160 levels&lt;/strong&gt; in total.&lt;/p&gt;

&lt;p&gt;Each level comes from a fixed seed, so "Medium 7" is the same puzzle on every phone, and two friends can compare notes on the same board.&lt;/p&gt;

&lt;h2&gt;
  
  
  Leaving the rectangle: triangle and hexagon boards
&lt;/h2&gt;

&lt;p&gt;Once the rectangle felt right, I added a &lt;strong&gt;triangle case (51 holes)&lt;/strong&gt; and a &lt;strong&gt;hexagon case (53 holes)&lt;/strong&gt;. The hexagon is by far the nastiest: six corners and no long straight wall to lean on, which breaks the "fill the edges first" habit most players rely on.&lt;/p&gt;

&lt;h2&gt;
  
  
  A daily puzzle for everyone
&lt;/h2&gt;

&lt;p&gt;Every day there's one puzzle, with four starter pieces already placed, that's identical worldwide, with a leaderboard. It rolls over at midnight UTC.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack: Expo + Three.js
&lt;/h2&gt;

&lt;p&gt;The board and pieces are real 3D, rendered with Three.js inside an Expo (React Native) app. The 3D wasn't the hard part, though. Most of the time went into &lt;em&gt;feel&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how a piece lifts when you grab it,&lt;/li&gt;
&lt;li&gt;rotating and flipping with one finger,&lt;/li&gt;
&lt;li&gt;the snap when it lands in the holes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It all sits inside a small pixel-art travel case with a clover on the lid, which is where the name comes from.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monetization without ruining it
&lt;/h2&gt;

&lt;p&gt;Since the competition lost players to ads, I set hard caps: &lt;strong&gt;no ad when the app opens&lt;/strong&gt;, at most one full-screen ad every 3 levels and never more than one every 3 minutes, plus a small banner. A one-time purchase removes ads. It works offline and needs no account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it / tell me what breaks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;App Store: &lt;a href="https://apps.apple.com/app/id6792343237" rel="noopener noreferrer"&gt;https://apps.apple.com/app/id6792343237&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;If you're comparing apps: &lt;a href="https://atakankartli.github.io/clover-case-site/blog/kanoodle-games-app-store.html" rel="noopener noreferrer"&gt;Kanoodle-style games on the App Store, compared&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Longer devlog on the game site: &lt;a href="https://atakankartli.github.io/clover-case-site/blog/building-a-kanoodle-style-puzzle-game.html" rel="noopener noreferrer"&gt;How I built a Kanoodle-style ball puzzle game&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Questions about the level generator or the Three.js-in-Expo setup are welcome in the comments.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;AI disclosure: the game's art is AI-generated, and much of the code was written with help from an AI coding assistant (Claude). Kanoodle is a registered trademark of Educational Insights; Clover Case is independent and not affiliated with it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>ios</category>
      <category>reactnative</category>
      <category>threejs</category>
    </item>
  </channel>
</rss>
