<?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: Pruthviraj Phuse</title>
    <description>The latest articles on DEV Community by Pruthviraj Phuse (@pruthviraj_phuse_77fb2b9f).</description>
    <link>https://dev.to/pruthviraj_phuse_77fb2b9f</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3948845%2F8421d4a0-5b7c-4b60-aa03-085e93327da5.png</url>
      <title>DEV Community: Pruthviraj Phuse</title>
      <link>https://dev.to/pruthviraj_phuse_77fb2b9f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pruthviraj_phuse_77fb2b9f"/>
    <language>en</language>
    <item>
      <title>I Finally Finished My 3D Quantum Chess Game (And It Has Wormholes)</title>
      <dc:creator>Pruthviraj Phuse</dc:creator>
      <pubDate>Mon, 01 Jun 2026 07:37:24 +0000</pubDate>
      <link>https://dev.to/pruthviraj_phuse_77fb2b9f/i-finally-finished-my-3d-quantum-chess-game-and-it-has-wormholes-59e4</link>
      <guid>https://dev.to/pruthviraj_phuse_77fb2b9f/i-finally-finished-my-3d-quantum-chess-game-and-it-has-wormholes-59e4</guid>
      <description>&lt;p&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-05-21"&gt;GitHub Finish-Up-A-Thon Challenge&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;3D Quantum Chess&lt;/strong&gt; — a fully playable chess game in the browser that layers &lt;br&gt;
three quantum mechanics on top of standard chess rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quantum Superposition&lt;/strong&gt;: Split any piece into two simultaneous positions. &lt;br&gt;
The ghost copy exists as a wavefunction until attacked — then it collapses, &lt;br&gt;
either disappearing or materializing depending on probability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wormhole Portals&lt;/strong&gt;: Two linked spatial portals are placed randomly on the &lt;br&gt;
board each game. Move a piece onto a wormhole entrance and it teleports &lt;br&gt;
instantly to the exit — changing the entire strategic geometry of the board.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Chronos Drive (Time Reversal)&lt;/strong&gt;: Each player has 3 charges to rewind the &lt;br&gt;
last 3 half-moves. Triggered a blunder? Collapse a superposition at the wrong &lt;br&gt;
moment? Rewind it. The board literally rolls back with a scanline animation.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The entire game renders in WebGL — a floating 3D board in space, rotating &lt;br&gt;
portals with particle effects, glowing ghost pieces, and a starfield background. &lt;br&gt;
Built with React + Three.js + chess.js.&lt;/p&gt;

&lt;p&gt;This project means a lot to me because it started as a "what if chess had &lt;br&gt;
quantum rules" sketch and grew into something I genuinely couldn't stop &lt;br&gt;
building. The intersection of classical game theory and quantum weirdness turns &lt;br&gt;
out to be endlessly fascinating.&lt;/p&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live Demo&lt;/strong&gt;: &lt;a href="https://quantum-chess-seven.vercel.app/" rel="noopener noreferrer"&gt;https://quantum-chess-seven.vercel.app/&lt;/a&gt;&lt;br&gt;
📸 &lt;strong&gt;Screenshots&lt;/strong&gt;:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjxbo947y9jt64x2xamps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjxbo947y9jt64x2xamps.png" alt=" " width="800" height="384"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fphljtgy9v3u02esov3z2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fphljtgy9v3u02esov3z2.png" alt=" " width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🎥 &lt;strong&gt;Walkthrough&lt;/strong&gt;: [link to video if you have one]&lt;/p&gt;




&lt;h2&gt;
  
  
  The Comeback Story
&lt;/h2&gt;

&lt;p&gt;This project sat at roughly 50% completion for weeks. What existed:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ Already done:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full project scaffold (Vite + React + Three.js)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gameConfig.js&lt;/code&gt; — all constants, colors, sizing tokens&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;quantumStore.js&lt;/code&gt; — the entire Zustand state machine&lt;/li&gt;
&lt;li&gt;All 5 engine files: &lt;code&gt;chessEngine.js&lt;/code&gt;, &lt;code&gt;superposition.js&lt;/code&gt;, 
&lt;code&gt;timeReversal.js&lt;/code&gt;, &lt;code&gt;wormhole.js&lt;/code&gt;, &lt;code&gt;aiEngine.js&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;index.css&lt;/code&gt; with glassmorphism styles and Tailwind config&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ What was missing (and what I finished):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The entire 3D rendering layer — &lt;code&gt;Board3D.jsx&lt;/code&gt;, &lt;code&gt;Square3D.jsx&lt;/code&gt;, 
&lt;code&gt;Piece3D.jsx&lt;/code&gt;, &lt;code&gt;Wormhole3D.jsx&lt;/code&gt; — the game had a brain but no body&lt;/li&gt;
&lt;li&gt;All four UI overlays — &lt;code&gt;QuantumHUD.jsx&lt;/code&gt;, &lt;code&gt;TimelineHUD.jsx&lt;/code&gt;, 
&lt;code&gt;GameInfo.jsx&lt;/code&gt;, &lt;code&gt;WinScreen.jsx&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;App.jsx&lt;/code&gt; wiring everything together&lt;/li&gt;
&lt;li&gt;The gap between "logic exists" and "playable game" was enormous&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hardest part of finishing wasn't writing new code — it was understanding &lt;br&gt;
the contract between the store and the 3D components. The store emits state; &lt;br&gt;
the components must react to it precisely. Getting ghost piece click-through, &lt;br&gt;
FEN-to-3D coordinate mapping, and the superposition collapse animations all &lt;br&gt;
synchronized took real debugging effort.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key fixes made during finish-up:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ghost pieces were blocking click events on squares beneath them — fixed 
with raycast visibility toggling&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;useFrame&lt;/code&gt; refs were being accessed before mount — added null checks 
throughout&lt;/li&gt;
&lt;li&gt;The wormhole teleport was modifying FEN incorrectly for edge-rank squares — 
rewrote the coordinate translation in &lt;code&gt;chessEngine.js&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Framer-motion variants were missing &lt;code&gt;initial&lt;/code&gt; states causing flash-of-content 
on the HUD panels&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  My Experience with GitHub Copilot
&lt;/h2&gt;

&lt;p&gt;Copilot was most useful in two specific situations during this finish-up:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Boilerplate acceleration on repetitive 3D geometry&lt;/strong&gt;&lt;br&gt;
Writing &lt;code&gt;Piece3D.jsx&lt;/code&gt; meant defining 6 different piece shapes, each as a &lt;br&gt;
composite of 2-3 Three.js geometries. Copilot autocompleted the geometry &lt;br&gt;
argument patterns (&lt;code&gt;CylinderGeometry&lt;/code&gt;, &lt;code&gt;SphereGeometry&lt;/code&gt; args) consistently &lt;br&gt;
and correctly, saving significant lookup time in the Three.js docs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Catching the store contract&lt;/strong&gt;&lt;br&gt;
When I started writing &lt;code&gt;QuantumHUD.jsx&lt;/code&gt;, Copilot suggested the correct Zustand &lt;br&gt;
selector pattern by inferring it from the already-written store file in context. &lt;br&gt;
It correctly suggested &lt;code&gt;useQuantumStore(state =&amp;gt; state.quantumMoves)&lt;/code&gt; rather &lt;br&gt;
than the whole-store subscription pattern — a meaningful performance difference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where I had to override it:&lt;/strong&gt;&lt;br&gt;
The quantum mechanics are non-standard. Copilot kept trying to simplify the &lt;br&gt;
superposition collapse logic to a coin-flip, when the actual design calls for &lt;br&gt;
deterministic collapse based on attack vectors. I had to be explicit in comments &lt;br&gt;
to keep it on track for those sections.&lt;/p&gt;

&lt;p&gt;Overall: Copilot is a strong finisher. For a project where the architecture is &lt;br&gt;
already defined and you're filling in implementation, it dramatically reduces &lt;br&gt;
the gap between "knowing what to build" and "having it built."&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foqepcr9w0jy5zfpofcw7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foqepcr9w0jy5zfpofcw7.png" alt=" " width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
    </item>
  </channel>
</rss>
