<?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: Nitin</title>
    <description>The latest articles on DEV Community by Nitin (@nitin_8d767ad88637719caf8).</description>
    <link>https://dev.to/nitin_8d767ad88637719caf8</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%2F1884307%2Ffad9d2d8-07f6-4760-a076-727458cd9898.jpg</url>
      <title>DEV Community: Nitin</title>
      <link>https://dev.to/nitin_8d767ad88637719caf8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nitin_8d767ad88637719caf8"/>
    <language>en</language>
    <item>
      <title>Juneteenth: 1865 — Sail. Decode. Reunite.</title>
      <dc:creator>Nitin</dc:creator>
      <pubDate>Sat, 20 Jun 2026 19:21:50 +0000</pubDate>
      <link>https://dev.to/nitin_8d767ad88637719caf8/juneteenth-1865-sail-decode-reunite-159h</link>
      <guid>https://dev.to/nitin_8d767ad88637719caf8/juneteenth-1865-sail-decode-reunite-159h</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/june-game-jam-2026-06-03"&gt;June Solstice Game Jam&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Juneteenth: 1865&lt;/strong&gt; — an interactive browser story game set across three chapters, spanning the historic days around June 19, 1865, the day freedom finally arrived in Texas.&lt;/p&gt;

&lt;p&gt;🎮 &lt;strong&gt;&lt;a href="https://juneteenth1865.netlify.app/" rel="noopener noreferrer"&gt;Play the Game → juneteenth1865.netlify.app&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The game follows two parallel journeys:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;General Gordon Granger&lt;/strong&gt; sailing into Galveston Bay to deliver the long-overdue proclamation of freedom&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;June&lt;/strong&gt;, a young boy decoding his father's hidden letters to find his family after years of separation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The game is kept &lt;strong&gt;short and completable by design&lt;/strong&gt; — every puzzle has guidance so any player can reach the ending, regardless of experience.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Three Chapters
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Chapter 1 — The Galveston Tide&lt;/strong&gt; &lt;em&gt;(June 18, 1865)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A side-scrolling ship runner on the HTML5 Canvas. General Granger and his Captain navigate Confederate wreckage to reach Galveston Bay. Collect lighthouse beacons to light the way through the night. A pre-game dialogue between the General and Captain sets the historical scene before sailing begins.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Chapter 2 — A Voice Across the Regions&lt;/strong&gt; &lt;em&gt;(June 19, 1865)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Three connected moments:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pull the rope&lt;/strong&gt; — drag the curtain handle to raise a red theatre curtain and reveal General Order No. 3, the proclamation that freed over 250,000 enslaved people in Texas. Read it. Let it land.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Bell Puzzle&lt;/strong&gt; — inspired by the LinkedIn Queens game. An 8×8 grid divided into 8 coloured districts. Place one freedom bell in each district so that no two bells share the same row, column, or touch each other diagonally. Every bell placed means another district hears the message. Spread the word to all eight corners of the city.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Chapter 3 — June's Horizon&lt;/strong&gt; &lt;em&gt;(June 20, 1865)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Three cryptographic puzzles woven into June's search for her father:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cipher 1 — The Shifting Dial:&lt;/strong&gt; A positional shift cipher where each letter is shifted forward by its position number. An A–Z reference grid helps players decode. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cipher 2 — The Rail Fence:&lt;/strong&gt; A 3-rail zigzag cipher with 6 randomised encoded locations, computed dynamically each session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cipher 3 — The Mirror Lock:&lt;/strong&gt; A 4-digit mirror transformation (add 5 mod 10, reverse the sequence). Fully randomised every session — no two playthroughs are the same.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each cipher has a &lt;strong&gt;Gemini AI Companion&lt;/strong&gt; with a sequential hint flow: &lt;strong&gt;Hint → Example → Solve for me&lt;/strong&gt;. Quota errors trigger built-in fallback hints automatically.&lt;/p&gt;




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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/L_xiLhG66C4"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/NitinPSingh" rel="noopener noreferrer"&gt;
        NitinPSingh
      &lt;/a&gt; / &lt;a href="https://github.com/NitinPSingh/JUNETEENTH" rel="noopener noreferrer"&gt;
        JUNETEENTH
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;🔗 &lt;strong&gt;&lt;a href="https://github.com/NitinPSingh/JUNETEENTH" rel="noopener noreferrer"&gt;github.com/NitinPSingh/JUNETEENTH&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pure vanilla HTML, CSS, and JavaScript — no frameworks, no build tools.&lt;/strong&gt; Everything runs directly in the browser from a single folder.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architecture
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;3 standalone chapters, each a self-contained &lt;code&gt;index.html&lt;/code&gt; + &lt;code&gt;game.js&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A root landing page handles the Google API key and navigates into Chapter 1&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;localStorage&lt;/code&gt; persists the key across all chapters seamlessly&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Chapter 1 — Canvas Game Engine
&lt;/h3&gt;

&lt;p&gt;Built entirely on the HTML5 Canvas API with a custom game loop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lane-based ship movement with keyboard controls&lt;/li&gt;
&lt;li&gt;Procedural obstacle and lighthouse spawning with increasing speed&lt;/li&gt;
&lt;li&gt;Screen shake on collision, HULL with health and progress tracking&lt;/li&gt;
&lt;li&gt;Two-phase structure: dodge phase → lighthouse-collection phase&lt;/li&gt;
&lt;li&gt;Dual character dialogue (General Granger &amp;amp; the Captain) plays before the game begins&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Chapter 2 — Curtain Drag + Bell Puzzle
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Curtain mechanic:&lt;/strong&gt; A draggable rope handle controls a CSS &lt;code&gt;translateY&lt;/code&gt; transform on the curtain cloth. As the handle reaches the bottom, the curtain fully rises and the proclamation is revealed. Works on both mouse and touch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bell Puzzle:&lt;/strong&gt; An 8×8 grid puzzle inspired by the LinkedIn Queens game, reskinned to fit the story:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;8 coloured regions represent the 8 districts of Galveston&lt;/li&gt;
&lt;li&gt;Players place freedom bells — one per district&lt;/li&gt;
&lt;li&gt;Rules: no two bells in the same row, no two in the same column, no two touching diagonally&lt;/li&gt;
&lt;li&gt;Validation runs on every placement — conflicting cells shake and highlight&lt;/li&gt;
&lt;li&gt;A progress bar tracks how many districts have heard the message&lt;/li&gt;
&lt;li&gt;Solving the puzzle unlocks the path to Chapter 3&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Chapter 3 — Cipher Engine
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Shifting Dial&lt;/strong&gt; — picks one of 6 location variants at page load, renders per-letter tiles with shift numbers, and provides an A–Z reference grid so players can decode without counting manually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rail Fence&lt;/strong&gt; — computes all three rails at runtime using period-4 zigzag logic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;rail&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 0→1→2→1→0→1→2…&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All 6 variants encode dynamically — the modal, Gemini context, and solve message always match the picked variant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mirror Lock&lt;/strong&gt; — generates 4 random digits each session and derives the answer as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;OUTSIDE_CODE&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MIRROR_ANSWER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;OUTSIDE_CODE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;reverse&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The dialogue, lock display, act description, Gemini hints, and solve message all reference the live random values via template literals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gemini 2.5 Flash&lt;/strong&gt; is called with &lt;code&gt;thinkingBudget: 0&lt;/code&gt; to suppress reasoning tokens. A &lt;code&gt;parts.find(p =&amp;gt; !p.thought)&lt;/code&gt; filter ensures only the actual response text is shown. HTTP 429 quota errors fall back to hand-written cipher-specific hints automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prize Category
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Best Google AI Usage
&lt;/h3&gt;

&lt;p&gt;Gemini 2.5 Flash powers an in-game AI companion across all three cipher puzzles. The integration goes beyond a simple chatbot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Context-aware prompts&lt;/strong&gt; — each cipher's prompt includes the specific encoded text, rails, or outside code for that session's random values, so hints are always relevant to the exact puzzle the player is solving&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sequential reveal system&lt;/strong&gt; — Hint → Example → Solve for me, one button visible at a time, preventing accidental spoilers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graceful degradation&lt;/strong&gt; — HTTP 429 quota errors trigger hand-written fallback hints per cipher, so the game is fully playable without API access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key overlay UX&lt;/strong&gt; — a frosted overlay physically blocks all AI buttons until a Google API key is entered&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Best Ode to Alan Turing
&lt;/h3&gt;

&lt;p&gt;Alan Turing spent his life &lt;strong&gt;breaking codes to free the world from tyranny&lt;/strong&gt;. Juneteenth: 1865 honours that legacy by weaving cipher-breaking into a story about another kind of freedom — the freedom of enslaved people in Texas.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Shifting Dial, Rail Fence, and Mirror Lock puzzles are inspired by real cipher families that Turing's era of cryptography studied and broke&lt;/li&gt;
&lt;li&gt;The Rail Fence cipher mirrors the mechanical transposition techniques Turing encountered at Bletchley Park&lt;/li&gt;
&lt;li&gt;The Mirror Lock's &lt;code&gt;(digit + 5) mod 10&lt;/code&gt; transformation echoes the modular arithmetic at the heart of Enigma-era cryptanalysis&lt;/li&gt;
&lt;li&gt;The Bell Puzzle's placement logic — one per row, one per column, no adjacency — echoes the constraint-satisfaction problems that underpinned Turing's computational thinking&lt;/li&gt;
&lt;li&gt;Just as Turing's work required patience, pattern recognition, and the right key — so does June's search for his father&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Freedom. Codes. The belief that the truth, once decoded, changes everything.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built for the June Solstice Game Jam 2026 — a tribute to Juneteenth and to Alan Turing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gamechallenge</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
