<?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: Weird Codes</title>
    <description>The latest articles on DEV Community by Weird Codes (@weirdcodesofficial).</description>
    <link>https://dev.to/weirdcodesofficial</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%2F4042905%2F2e1a1cad-299d-4f29-9935-8b5ffdd96b99.png</url>
      <title>DEV Community: Weird Codes</title>
      <link>https://dev.to/weirdcodesofficial</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/weirdcodesofficial"/>
    <language>en</language>
    <item>
      <title>My First Dev challenge submission</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Tue, 18 Aug 2026 15:40:36 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/dog-bone-jump-3gf4</link>
      <guid>https://dev.to/weirdcodesofficial/dog-bone-jump-3gf4</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is my submission for &lt;a href="https://dev.to/deved/build-apps-with-google-ai-studio"&gt;DEV Education Track: Build Apps with Google AI Studio&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;I built A delightful 1920x1080 desktop landscape dog jumping game where players tap to guide their dog to catch bones.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;Bone Collector Dog&lt;/strong&gt; arcade game leveraged Google AI Studio to turn a more than 12-step architectural blueprint into a fully functional, event-driven game complete with a score tracker, sound effects, and clean state management.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Preplanned Instructions
&lt;/h2&gt;

&lt;p&gt;To generate the core logic of the application, I provided Google AI Studio with a highly specific, 12-step foundational prompt:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make a 1080x1920 canvas.&lt;/li&gt;
&lt;li&gt;Spawn Dog emoji as player at bottom.&lt;/li&gt;
&lt;li&gt;Spawn bone at randon place at screen.&lt;/li&gt;
&lt;li&gt;Add touch screen for user to jump dog to the position of bone.&lt;/li&gt;
&lt;li&gt;Store the score how many bones the dog has got.&lt;/li&gt;
&lt;li&gt;Show the score at the top of screen on left side.&lt;/li&gt;
&lt;li&gt;Show the score with bone emoji (example: score 3 will show 3 bones at top left screen.)&lt;/li&gt;
&lt;li&gt;Make start Screen to start the game&lt;/li&gt;
&lt;li&gt;Add start game button on start screen.&lt;/li&gt;
&lt;li&gt;Add exit game button on top right corner at screen on gameplay.&lt;/li&gt;
&lt;li&gt;Add Exit button at top right at screen at start screen to exit the game.&lt;/li&gt;
&lt;li&gt;Add audio in game from audio/ folder using mp3 files.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjy4w9aipqaaomio7o5sr.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjy4w9aipqaaomio7o5sr.png" alt="Game's cover image" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="//dog-bone-jump-game.ai.studio"&gt;Play&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Experience
&lt;/h2&gt;

&lt;p&gt;For this i'm using Gemini 3.7 Flash&lt;/p&gt;

&lt;h3&gt;
  
  
  First Prompt
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Make a 1080x1920 canvas.&lt;/li&gt;
&lt;li&gt;Spawn Dog emoji as player at bottom.&lt;/li&gt;
&lt;li&gt;Spawn bone at randon place at screen.&lt;/li&gt;
&lt;li&gt;Add touch screen for user to jump dog to the position of bone.&lt;/li&gt;
&lt;li&gt;Store the score how many bones the dog has got.&lt;/li&gt;
&lt;li&gt;Show the score at the top of screen on left side.&lt;/li&gt;
&lt;li&gt;Show the score with bone emoji (example: score 3 will show 3 bones at top left screen.)&lt;/li&gt;
&lt;li&gt;Make start Screen to start the game&lt;/li&gt;
&lt;li&gt;Add start game button on start screen.&lt;/li&gt;
&lt;li&gt;Add exit game button on top right corner at screen on gameplay.&lt;/li&gt;
&lt;li&gt;Add Exit button at top right at screen at start screen to exit the game.&lt;/li&gt;
&lt;li&gt;Add audio in game from audio/ folder using mp3 files.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  1. It suggested me 2 more instructions:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Ensure the audio loops during gameplay for a seamless experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement sound effects for each bone collection interaction.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It suggested me few tampletes to choose for my game UI. I chose the last one.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It stopped after doing UI, Didnt follow all the instructions and steps to make finished game.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It did the change but i could not see it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt to make screen size 1920x1080 for desktop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I had to refresh the entire screen then i it has followed all the instructions already.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I tested the game.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I gave another new prompt "after 10 bones +1 achivement and reset bone collection stack for the next 10 bones for next achievement."&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;9.It updated the game and did auto refresh this time and gave prompt notification got 2 errors.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I clicked 'Fix' button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It fixed the errors and explained it in prompt window and updated the game with auto refresh again.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkgl6wglqhcjldzqj1gty.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkgl6wglqhcjldzqj1gty.png" alt="Added Achievements" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I gave a new prompt "dog should jump at the user's screen click/tap position".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It updated the game again with auto refresh and stored last score on screen shown.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;First time it got a glitch that i hid start game but it gone back to start screen back once. This glitch happend 2nd time here coz it happened before at an update too.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "keep the dog on ground, so remove the gap between dog and shadow."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It updated the game again in 58 seconds.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "keep the dog on ground, so remove the gap between dog and shadow."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It centered the dog on shadhow horizontal only.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;I manually updated&lt;/em&gt; the code myself by clicking &lt;em&gt;**&lt;/em&gt;"Vew changes"&lt;em&gt;**&lt;/em&gt; button in prompt that redirected me to the updated code showing me diff.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;            &lt;span class="nx"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`translate(-50%, -85%) scaleX(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;dogPos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scaleX&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;) rotate(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;dogPos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rotation&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;deg)`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nx"&gt;transformOrigin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;50% 85%&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to&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="nx"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`translate(-50%, -100%) scaleX(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;dogPos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scaleX&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;) rotate(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;dogPos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rotation&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;deg)`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nx"&gt;transformOrigin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;50% 100%&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Game updated and got auto refresh but this time no glitch on start game.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This time game just ran without glitch and i realized "that glitch was there before coz i started game before it was fully ready in prompt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I could not see it is not fully ready coz there was not progress indication in progress bar for that. It looked like it's ready. &lt;strong&gt;Here is the possiblity to improve it for Google AI Studio, if i understood it correctly.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I gave a new prompt "change the dog avatar to new random dog image at each achievement."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I ran for 172 seconds and updated the game as i wanted without that glitch this time coz i knew when to hit the "Start Button" this time.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb907vcx0m34wx3wpqmu8.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb907vcx0m34wx3wpqmu8.png" alt="New Avatar" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;On the prompt it shows Checkpoint "Vew changes" window after that it's ready.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next prompt i gave "make shodow size and position update according to the dog position on the screen. (Example: if dog not on ground then shadow size decrease, if dog changing x position shadow also changes it to keep it always beneath the dog."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Again Gemini updated the game in 65 seconds but i got a bug or i would say an enhancement posibility in game logic.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Bug 1. It resets the dog image back to the very first image if clicks "Start Button" but keep the new dog if press .&lt;/p&gt;

&lt;p&gt;Bug 2. It gives dog foot prints as the dog avatar image at achievement.&lt;/p&gt;

&lt;p&gt;Bug 3. It repeats the old dog image at achievement.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "Store the last updated avatar image of the dog."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemini updated the game in 110 seconds. Bug fixed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "do not repeate the old avatar new achievement."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemini updated game in 153 seconds. Bug fixed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "dog avatar at new achievement must be a full body dog image."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemini updated the game in 157 seconds and fixed the bug.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv7bbm7fiyqvksu2x82rw.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv7bbm7fiyqvksu2x82rw.png" alt="Fullbody Avatar" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "bone shouldn't float at one place in air. it should come from left going to right side if dog is in the right side of the screen center and should come from the right side going to the left if dog is in the lef t side of the screen. if the dog could not hit the bone in air then bone doesnt count."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemini fixed the bug in 124 seconds but found another bug to be fixed "dog isn't always facing front when jump".&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flndcpoox4gwmtbkxw7iv.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flndcpoox4gwmtbkxw7iv.png" alt="Flying Bone" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "dog should always face front when jump".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemini fixed the bug in 156 seconds.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjigo49fzpx3473svx4ay.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjigo49fzpx3473svx4ay.png" alt="Front Face" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "dog should idle animation on ground by face and tail tilting."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemini updated the game in 114 seconds.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "remove face tilt and add tung animation for idle state."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemini updated game in 114 seconds.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "Move mouth triangle bihind the tung." Gemini failed here.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I gave new prompt "move the z index of tung up over the mouth." failed again.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then i realized maybe that yellow triangle is also the tung from old design. so i gave new prompt "move the z index of tung up over the mouth&lt;br&gt;
"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gemini ran for 9 seconds and ran out of free generations for today.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;45. Finally i restored back to face tilt animation no tung animation for idle to remove the duplicate tung.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  After finishing:
&lt;/h3&gt;

&lt;p&gt;I had Google AI Studio accound for a mounth but i didnt started using it since i felt it looks easy but maybe i will not easy to use. For that reason of dout i just didn't even started testing it just coz i didn't have any specific reason to use it. But then saw the "Dev Education Tracks" post on the Dev.io Home page and i click on it to read and i just tried it right after that.&lt;/p&gt;

&lt;p&gt;Google AI Studio proved incredibly effective at translating exact gameplay specs into a working code structure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Best Part:&lt;/strong&gt; The AI perfectly handled the visual translation of the score system—converting a standard numeric counter into a dynamic row of visual bone emojis (3 = 🦴🦴🦴) precisely as requested.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What did i learn:&lt;/strong&gt; At the time of sharing the project i realized preinstructions was empty in the right side window, still it worked without it. It could help in some common instructions like "give me reply in the for of diffs so can add the code my self." and "Reply to in devnagari." and so on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaway:&lt;/strong&gt; Clear, structured requirements yield incredible results. Breaking my game loops down into 12 granular steps allowed the AI to deliver production-ready logic on the first try.&lt;/p&gt;

&lt;p&gt;It was fun to use it for me. Thanks for the &lt;strong&gt;Dev Education Tracks&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>deved</category>
      <category>learngoogleaistudio</category>
      <category>ai</category>
      <category>gemini</category>
    </item>
    <item>
      <title>Mobile Gameplay Performance Optimization</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Tue, 18 Aug 2026 09:12:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/mobile-gameplay-performance-optimization-3bo8</link>
      <guid>https://dev.to/weirdcodesofficial/mobile-gameplay-performance-optimization-3bo8</guid>
      <description>&lt;h2&gt;
  
  
  MOKSHA — v0.1.1 Devlog
&lt;/h2&gt;

&lt;p&gt;Date: 2026-08-18&lt;br&gt;
Milestone: v0.1.1 — &lt;a href="https://github.com/weirdcodesofficial/MOKSHA/milestone/11" rel="noopener noreferrer"&gt;https://github.com/weirdcodesofficial/MOKSHA/milestone/11&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Highlights
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Major mobile-focused performance work: reduced per-frame CPU/GPU cost in render path.&lt;/li&gt;
&lt;li&gt;Replaced hot trig math with a lookup table (LUT) to remove repeated Math.sin/cos calls.&lt;/li&gt;
&lt;li&gt;Cached per-frame gradients and reduced expensive shadowBlur calls to lower GPU blur passes.&lt;/li&gt;
&lt;li&gt;Added quality-tier controls and explicit render-state resets for more predictable mobile behaviour.&lt;/li&gt;
&lt;li&gt;v0.1.1 release PR merged.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Merged pull requests (summary)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;PR #147 — perf(render): replace remaining Math.sin/cos with lutSin/lutCos&lt;br&gt;&lt;br&gt;
Replaced ~25 per-frame trig calls in drawScene() with reads from the existing 2048-entry radian LUT (affects ring ticks, pulses, orbit waves, arc heads, timer pill pulses, etc.) — reduces CPU trig cost significantly.&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/weirdcodesofficial/MOKSHA/pull/147" rel="noopener noreferrer"&gt;https://github.com/weirdcodesofficial/MOKSHA/pull/147&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PR #145 — render: Done gradient caching.&lt;br&gt;&lt;br&gt;
Implemented caching/baking for commonly created gradients and offscreen sprites (pickup glow, naama, chakravaata, rein gradient buckets) to avoid per-frame gradient allocations and GPU work.&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/weirdcodesofficial/MOKSHA/pull/145" rel="noopener noreferrer"&gt;https://github.com/weirdcodesofficial/MOKSHA/pull/145&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PR #144 — render: quality tier control, explicity reset, 40 shadowBlur calls wr…&lt;br&gt;&lt;br&gt;
Added device/quality-tier checks to disable or lower shadowBlur on low-end devices; isolated shadowBlur via save()/restore() and explicit ctx.shadowBlur = 0 resets to avoid leaks. GPU blur pass count reduced.&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/weirdcodesofficial/MOKSHA/pull/144" rel="noopener noreferrer"&gt;https://github.com/weirdcodesofficial/MOKSHA/pull/144&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PR #146 — V0.1.1 (release PR) — bump / release merge.&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/weirdcodesofficial/MOKSHA/pull/146" rel="noopener noreferrer"&gt;https://github.com/weirdcodesofficial/MOKSHA/pull/146&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>ai</category>
      <category>webdev</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Not a Protytype anymore!</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Mon, 17 Aug 2026 10:07:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/not-a-protytype-anymore-42o9</link>
      <guid>https://dev.to/weirdcodesofficial/not-a-protytype-anymore-42o9</guid>
      <description>&lt;h2&gt;
  
  
  🕉️ मोक्ष — अब Prototype नहीं, In Development है!
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;दिनांक:&lt;/strong&gt; 17 अगस्त 2026&lt;br&gt;
&lt;strong&gt;प्लेटफ़ॉर्म:&lt;/strong&gt; &lt;a href="https://weirdcodes.itch.io/moksha" rel="noopener noreferrer"&gt;itch.io&lt;/a&gt; · &lt;a href="https://github.com/weirdcodesofficial/MOKSHA" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  बड़ा बदलाव / Big Update
&lt;/h2&gt;

&lt;p&gt;मोक्ष की itch.io release status &lt;strong&gt;Prototype → In Development&lt;/strong&gt; हो गई है।&lt;/p&gt;

&lt;p&gt;Moksha's itch.io release status has changed from &lt;strong&gt;Prototype → In Development&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  यह क्यों मायने रखता है?
&lt;/h2&gt;

&lt;p&gt;जब मैंने मोक्ष पहली बार itch.io पर publish किया था, तो status "Prototype" थी —&lt;br&gt;
क्योंकि तब यह सिर्फ एक idea था जिसे test किया जा रहा था।&lt;/p&gt;

&lt;p&gt;अब स्थिति बदल गई है:&lt;/p&gt;

&lt;p&gt;When I first published Moksha on itch.io, the status was "Prototype" —&lt;br&gt;
because it was just an idea being tested.&lt;/p&gt;

&lt;p&gt;That has changed now:&lt;/p&gt;




&lt;h2&gt;
  
  
  अब तक क्या हुआ / What's been done
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;v0.1 milestone&lt;/strong&gt; — 95/95 issues closed, 100% complete&lt;/li&gt;
&lt;li&gt;✅ Vedic karma engine (पुण्य / पाप / प्रारब्ध / समर्पित)&lt;/li&gt;
&lt;li&gt;✅ ES6 modular architecture (11 source files)&lt;/li&gt;
&lt;li&gt;✅ Mobile touch controls + gyroscope steering&lt;/li&gt;
&lt;li&gt;✅ गुरु-दीक्षा tutorial system (5-step)&lt;/li&gt;
&lt;li&gt;✅ Full gamepad support&lt;/li&gt;
&lt;li&gt;✅ Layered ambient audio (28 mp3 files)&lt;/li&gt;
&lt;li&gt;✅ In-game शास्त्र (3 pages, bilingual)&lt;/li&gt;
&lt;li&gt;✅ Canvas alert system, floating text, orbit rings&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  आगे क्या है / What's next
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;v0.1.1&lt;/strong&gt; — Mobile performance optimization patch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;shadowBlur&lt;/code&gt; GPU cost कम करना&lt;/li&gt;
&lt;li&gt;Per-frame gradient caching&lt;/li&gt;
&lt;li&gt;Trig lookup table (sin/cos LUT)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;यह game अभी actively बन रही है।&lt;br&gt;
यह सफर अभी खत्म नहीं हुआ — यह तो अभी शुरू हुआ है।&lt;/p&gt;

&lt;p&gt;This game is actively being built.&lt;br&gt;
This journey hasn't ended — it has just begun.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"उद्धरेदात्मनात्मानं"&lt;/em&gt; — आत्मा का उद्धार स्वयं आत्मा करे।&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🔗 Links
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🎮 itch.io&lt;/td&gt;
&lt;td&gt;&lt;a href="https://weirdcodes.itch.io/moksha" rel="noopener noreferrer"&gt;weirdcodes.itch.io/moksha&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;💻 GitHub&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/weirdcodesofficial/MOKSHA" rel="noopener noreferrer"&gt;github.com/weirdcodesofficial/MOKSHA&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📝 dev.to&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/weirdcodesofficial"&gt;@weirdcodesofficial&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🐘 Mastodon&lt;/td&gt;
&lt;td&gt;&lt;a href="https://mastodon.social/@pjatmasto" rel="noopener noreferrer"&gt;@pjatmasto&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;𝕏 X&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/weirdcodesx" rel="noopener noreferrer"&gt;@weirdcodesx&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;▶️ YouTube&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/@weirdcodes-official" rel="noopener noreferrer"&gt;@weirdcodes-official&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;em&gt;Human-designed, AI-assisted. सभी शास्त्रीय और रचनात्मक निर्णय Weired Codes द्वारा।&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>gamedev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>v0.1.0 Done</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Mon, 17 Aug 2026 09:52:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/v010-done-46cg</link>
      <guid>https://dev.to/weirdcodesofficial/v010-done-46cg</guid>
      <description>&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspfffecw3hokhi2k65b1.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspfffecw3hokhi2k65b1.png" alt="Mobile performance optimization patch." width="663" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🕉️ मोक्ष Devlog — v0.1.1 Milestone
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;दिनांक:&lt;/strong&gt; 17 अगस्त 2026&lt;br&gt;
&lt;strong&gt;बिल्ड:&lt;/strong&gt; v0.1.1 (upcoming patch)&lt;br&gt;
&lt;strong&gt;प्लेटफ़ॉर्म:&lt;/strong&gt; &lt;a href="https://weirdcodes.itch.io/moksha" rel="noopener noreferrer"&gt;itch.io&lt;/a&gt; · &lt;a href="https://github.com/weirdcodesofficial/MOKSHA" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🎯 v0.1.1 क्या है?
&lt;/h2&gt;

&lt;p&gt;v0.1 milestone 100% complete हुआ — 95/95 issues closed। 🎉&lt;/p&gt;

&lt;p&gt;अगला पड़ाव है &lt;strong&gt;v0.1.1&lt;/strong&gt; — एक focused performance patch जो mobile devices पर&lt;br&gt;
मोक्ष को smoother बनाएगा। कोई नया feature नहीं — सिर्फ optimization।&lt;/p&gt;

&lt;p&gt;v0.1 milestone is 100% complete — 95/95 issues closed.&lt;br&gt;
Next up is &lt;strong&gt;v0.1.1&lt;/strong&gt; — a focused performance patch to make Moksha smoother on mobile.&lt;br&gt;
No new features — pure optimization.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔍 समस्या की जड़ / Root of the Problem
&lt;/h2&gt;

&lt;p&gt;मोक्ष पूरी तरह &lt;strong&gt;HTML5 Canvas 2D&lt;/strong&gt; पर बना है — कोई game engine नहीं।&lt;br&gt;
इसका मतलब हर frame में हम खुद GPU को instructions देते हैं।&lt;/p&gt;

&lt;p&gt;तीन operations हैं जो mobile GPU पर सबसे ज़्यादा cost करते हैं:&lt;/p&gt;

&lt;p&gt;Moksha is built entirely on &lt;strong&gt;HTML5 Canvas 2D&lt;/strong&gt; — no game engine.&lt;br&gt;
This means every frame we give instructions to the GPU directly.&lt;br&gt;
Three operations are the heaviest on mobile GPU:&lt;/p&gt;


&lt;h2&gt;
  
  
  🐛 Issue #96 — &lt;code&gt;shadowBlur&lt;/code&gt; per-frame GPU cost
&lt;/h2&gt;
&lt;h3&gt;
  
  
  समस्या
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;render.js&lt;/code&gt; में &lt;code&gt;shadowBlur&lt;/code&gt; हर frame &lt;strong&gt;77 बार&lt;/strong&gt; set होता है।&lt;/p&gt;

&lt;p&gt;&lt;code&gt;shadowBlur&lt;/code&gt; एक expensive GPU operation है — हर बार एक blur pass trigger होता है।&lt;br&gt;
Mobile पर (विशेषकर Firefox पर) यही FPS drop का सबसे बड़ा कारण है।&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="c1"&gt;// यह 77 बार हर frame होता है — बहुत ज़्यादा&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shadowBlur&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// ... draw ...&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shadowBlur&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  हल (planned)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Low-end device पर &lt;code&gt;shadowBlur = 0&lt;/code&gt; (quality tier system)&lt;/li&gt;
&lt;li&gt;हर draw block में &lt;code&gt;ctx.save()&lt;/code&gt; / &lt;code&gt;ctx.restore()&lt;/code&gt; से leak रोकें&lt;/li&gt;
&lt;li&gt;Critical visuals पर ही shadowBlur रखें, बाकी हटाएँ&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🐛 Issue #97 — Per-frame uncached gradients
&lt;/h2&gt;

&lt;h3&gt;
  
  
  समस्या
&lt;/h3&gt;

&lt;p&gt;नीचे दिए gradients &lt;strong&gt;हर frame नए बनते हैं&lt;/strong&gt; — GC pressure + GPU cost:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Location&lt;/th&gt;
&lt;th&gt;Gradient&lt;/th&gt;
&lt;th&gt;हर frame कितनी बार&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;drawPickupGlowIcon()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Radial&lt;/td&gt;
&lt;td&gt;हर maya entity पर&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rein draw&lt;/td&gt;
&lt;td&gt;Linear&lt;/td&gt;
&lt;td&gt;हर 6 घोड़ों पर&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Naama maya&lt;/td&gt;
&lt;td&gt;Radial&lt;/td&gt;
&lt;td&gt;हर naama entity पर&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chakravaata&lt;/td&gt;
&lt;td&gt;Radial&lt;/td&gt;
&lt;td&gt;हर chakravaata पर&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// यह हर frame naama के लिए नया बनता है — wasteful&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;nGrad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createRadialGradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ncx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ncy&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ncx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ncy&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;pulse&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  हल (planned)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;drawPickupGlowIcon()&lt;/code&gt; → offscreen sprite cache में bake करें&lt;/li&gt;
&lt;li&gt;Naama, chakravaata gradients → bucket-cached (size key से)&lt;/li&gt;
&lt;li&gt;Rein gradient → karma ratio bucket से cache करें&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🐛 Issue #98 — Trig caching for orbit rendering
&lt;/h2&gt;

&lt;h3&gt;
  
  
  समस्या
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;outerOrbits&lt;/code&gt; और &lt;code&gt;innerOrbit&lt;/code&gt; rendering में &lt;code&gt;Math.sin&lt;/code&gt; / &lt;code&gt;Math.cos&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;हर frame, हर entity पर&lt;/strong&gt; compute होता है।&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="c1"&gt;// हर orbit entity पर हर frame यह चलता है&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;angle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;renderTime&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;orbit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;speed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&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="nx"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;orbit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;dx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cx&lt;/span&gt; &lt;span class="o"&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;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;angle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;actualDist&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// ← expensive&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;dy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cy&lt;/span&gt; &lt;span class="o"&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;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;angle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;actualDist&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// ← expensive&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  हल (planned)
&lt;/h3&gt;

&lt;p&gt;360-entry lookup table (LUT) जो एक बार pre-compute हो:&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="c1"&gt;// एक बार — startup पर&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SIN_LUT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Float32Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;360&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;COS_LUT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Float32Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;360&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&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;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;360&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;SIN_LUT&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&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;sin&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;COS_LUT&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&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;cos&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// हर frame — O(1) lookup, zero trig cost&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;idx&lt;/span&gt; &lt;span class="o"&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;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;angleDeg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;360&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;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cx&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;COS_LUT&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;dist&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;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cy&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;SIN_LUT&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;dist&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📋 v0.1.1 Milestone Issues
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Issue&lt;/th&gt;
&lt;th&gt;Title&lt;/th&gt;
&lt;th&gt;Label&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;#96&lt;/td&gt;
&lt;td&gt;&lt;code&gt;perf: reduce shadowBlur calls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;performance&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#97&lt;/td&gt;
&lt;td&gt;&lt;code&gt;perf: cache per-frame gradients&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;performance&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#98&lt;/td&gt;
&lt;td&gt;&lt;code&gt;perf: sin/cos LUT for orbit rendering&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;performance&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🎯 Expected Impact
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;अभी / Now&lt;/th&gt;
&lt;th&gt;बाद / After&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;shadowBlur calls/frame&lt;/td&gt;
&lt;td&gt;~77&lt;/td&gt;
&lt;td&gt;~15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gradient allocations/frame&lt;/td&gt;
&lt;td&gt;~6&lt;/td&gt;
&lt;td&gt;~0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Trig calls/frame (orbits)&lt;/td&gt;
&lt;td&gt;~200+&lt;/td&gt;
&lt;td&gt;~0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mobile FPS (target)&lt;/td&gt;
&lt;td&gt;30-45fps&lt;/td&gt;
&lt;td&gt;60fps&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🔗 Links
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🎮 itch.io&lt;/td&gt;
&lt;td&gt;&lt;a href="https://weirdcodes.itch.io/moksha" rel="noopener noreferrer"&gt;weirdcodes.itch.io/moksha&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;💻 GitHub&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/weirdcodesofficial/MOKSHA" rel="noopener noreferrer"&gt;github.com/weirdcodesofficial/MOKSHA&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🐘 Mastodon&lt;/td&gt;
&lt;td&gt;&lt;a href="https://mastodon.social/@pjatmasto" rel="noopener noreferrer"&gt;@pjatmasto&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;𝕏 X&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/weirdcodesx" rel="noopener noreferrer"&gt;@weirdcodesx&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;▶️ YouTube&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/@weirdcodes-official" rel="noopener noreferrer"&gt;@weirdcodes-official&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;em&gt;Human-designed, AI-assisted. सभी शास्त्रीय और रचनात्मक निर्णय Weired Codes द्वारा।&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>ai</category>
      <category>webdev</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Fixed player verticle position</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Mon, 17 Aug 2026 09:21:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/fixed-player-verticle-position-27h0</link>
      <guid>https://dev.to/weirdcodesofficial/fixed-player-verticle-position-27h0</guid>
      <description>&lt;p&gt;&lt;strong&gt;दिनांक:&lt;/strong&gt; 17 अगस्त 2026&lt;br&gt;
&lt;strong&gt;बिल्ड:&lt;/strong&gt; v0.0.9 (patch)&lt;br&gt;
&lt;strong&gt;प्लेटफ़ॉर्म:&lt;/strong&gt; &lt;a href="https://weirdcodes.itch.io/moksha" rel="noopener noreferrer"&gt;itch.io&lt;/a&gt; · &lt;a href="https://github.com/weirdcodesofficial/MOKSHA" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  📋 बदली गई फ़ाइल / File Changed
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;फ़ाइल / File&lt;/th&gt;
&lt;th&gt;बदलाव / Change&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;engine.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;player.y&lt;/code&gt; — player canvas bottom पर&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h2&gt;
  
  
  🐛 Fix — Player Canvas के Bottom पर नहीं था
&lt;/h2&gt;
&lt;h3&gt;
  
  
  समस्या / Problem
&lt;/h3&gt;

&lt;p&gt;Player (रथ) canvas के बीच में दिखता था — bottom पर नहीं।&lt;br&gt;
खेलते समय ऊपर बहुत कम space था और नीचे बहुत ज़्यादा।&lt;/p&gt;
&lt;h3&gt;
  
  
  हल / Solution
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;engine.js&lt;/code&gt; — &lt;code&gt;init()&lt;/code&gt; method:&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="c1"&gt;// BEFORE&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;HEIGHT&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;250&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// AFTER&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;HEIGHT&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;पहले / Before&lt;/th&gt;
&lt;th&gt;बाद / After&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;player.y&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;430px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;560px&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Canvas bottom से दूरी&lt;/td&gt;
&lt;td&gt;&lt;code&gt;250px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;120px&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Maya ऊपर से नीचे गिरती है — player का bottom पर होना शास्त्र-संगत है:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"रथ धरा पर, आत्मा ऊर्ध्वगामी"&lt;/em&gt; — आकाश से माया उतरती है, रथ पृथ्वी पर।&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🔗 Links
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🎮 itch.io&lt;/td&gt;
&lt;td&gt;&lt;a href="https://weirdcodes.itch.io/moksha" rel="noopener noreferrer"&gt;weirdcodes.itch.io/moksha&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;💻 GitHub&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/weirdcodesofficial/MOKSHA" rel="noopener noreferrer"&gt;github.com/weirdcodesofficial/MOKSHA&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📝 dev.to&lt;/td&gt;
&lt;td&gt;&lt;a href="https://mastodon.social/@pjatmasto" rel="noopener noreferrer"&gt;@weirdcodesofficial&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;𝕏 X&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/weirdcodesx" rel="noopener noreferrer"&gt;@weirdcodesx&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;▶️ YouTube&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.youtube.com/@weirdcodes-official" rel="noopener noreferrer"&gt;@weirdcodes-official&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




</description>
      <category>javascript</category>
      <category>css</category>
      <category>webdev</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Moved footer back to screen bottom.</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Mon, 17 Aug 2026 07:16:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/moved-footer-back-to-screen-bottom-17h2</link>
      <guid>https://dev.to/weirdcodesofficial/moved-footer-back-to-screen-bottom-17h2</guid>
      <description>&lt;h1&gt;
  
  
  Devlog — Footer / HUD layout fix
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Commit: &lt;a href="https://github.com/weirdcodesofficial/MOKSHA/commit/c7cc8322ace555c15fd08c066d1ffd284963d80d" rel="noopener noreferrer"&gt;c7cc832&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Author: pj90 (weirdcodesofficial)&lt;/li&gt;
&lt;li&gt;Date: 2026-08-17&lt;/li&gt;
&lt;li&gt;Repo: weirdcodesofficial/MOKSHA — An HTML5 browser game based on Sanatan Shastras and Karmic philosophy.&lt;/li&gt;
&lt;li&gt;Languages: JavaScript (89.7%), CSS (6.1%), HTML (4.2%)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Moved the UI footer back to the screen bottom and consolidated the HUD controls (volume slider, mute, help, credits) into the footer alongside the mode badge. This removes the separate HUD controls block earlier in the DOM and places the mode badge + controls together at the bottom of the viewport.&lt;/p&gt;

&lt;p&gt;Commit message: "Footer: moved footer back to screen bottom."&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Modified: &lt;code&gt;index.html&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;Removed the standalone HUD controls block from its previous location.&lt;/li&gt;
&lt;li&gt;Re-introduced/added a &lt;code&gt;#ui-footer&lt;/code&gt; element placed immediately after the main container, containing:&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#mode-badge&lt;/code&gt; (mode/status badge)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#hud-controls&lt;/code&gt; with &lt;code&gt;#music-volume-slider&lt;/code&gt;, &lt;code&gt;#music-toggle-btn&lt;/code&gt;, &lt;code&gt;#shaashtra-help-btn&lt;/code&gt;, and &lt;code&gt;#hud-credits&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Diff stats: +14 / -16 (total 30)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Restore expected layout where the footer and HUD controls are anchored to the bottom of the screen, improving consistency of on-screen controls and grouping mode/status information with control elements.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  User-visible effect
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The mode badge and HUD controls now appear together fixed to the bottom area of the app UI instead of being separated. Users should find the music controls and help/credits consistently at the bottom.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Representative snippet (new footer block)
&lt;/h2&gt;

&lt;p&gt;html name=index.html url=&lt;a href="https://github.com/weirdcodesofficial/MOKSHA/blob/c7cc8322ace555c15fd08c066d1ffd284963d80d/index.html#L175-L193" rel="noopener noreferrer"&gt;https://github.com/weirdcodesofficial/MOKSHA/blob/c7cc8322ace555c15fd08c066d1ffd284963d80d/index.html#L175-L193&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- ── Footer (mode badge + HUD controls) — screen bottom पर ── --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"ui-footer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"mode-badge"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mode-badge"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"तत्परता की जाँच हो रही है..."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;⏳ जाँच रहे हैं...&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"hud-controls"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hud-right-group"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"music-volume-slider"&lt;/span&gt; &lt;span class="na"&gt;min=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;max=&lt;/span&gt;&lt;span class="s"&gt;"100"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"100"&lt;/span&gt;
                &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"संगीत वॉल्यूम"&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Background Music Volume"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"music-toggle-btn"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hud-icon-btn"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"पृष्ठभूमि ध्वनि म्यूट/अनम्यूट करें"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;🔊&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"shaashtra-help-btn"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hud-icon-btn"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"शास्त्र पढ़ें (खेल की जानकारी)"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;❓&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"hud-credits"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hud-icon-btn"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"cursor:default;"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Developed by Weird Codes"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;🛠️&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>html</category>
      <category>webdev</category>
      <category>gamedev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>📱 Touch Controls — Equal Spacing Fix | समान-अंतर लेआउट</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Sun, 16 Aug 2026 20:49:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/touch-controls-equal-spacing-fix-smaan-antr-leaautt-32p7</link>
      <guid>https://dev.to/weirdcodesofficial/touch-controls-equal-spacing-fix-smaan-antr-leaautt-32p7</guid>
      <description>&lt;h1&gt;
  
  
  📱 Touch Controls — Equal Spacing Fix | समान-अंतर लेआउट
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Project:&lt;/strong&gt; मोक्ष (MOKSHA) — Vedic Karma Browser Game&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Build:&lt;/strong&gt; v0.0.9+&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Type:&lt;/strong&gt; UI / Layout Fix&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Date:&lt;/strong&gt; 2026-08-17&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  समस्या क्या थी? (What was broken?)
&lt;/h2&gt;

&lt;p&gt;Mobile पर touch control buttons का spacing unequal था।&lt;br&gt;&lt;br&gt;
तीनों clusters — Left (◀▶), Center (🐚🪔📜⏸), Right (ॐ🙏🙌) — अलग-अलग hardcoded widths की वजह से एक-दूसरे से बेमेल दिख रहे थे।&lt;br&gt;&lt;br&gt;
Buttons भी visually बड़े थे जिससे पूरा layout cramped लग रहा था।&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Root cause — &lt;code&gt;style.css&lt;/code&gt; में:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cluster&lt;/th&gt;
&lt;th&gt;पुरानी width&lt;/th&gt;
&lt;th&gt;समस्या&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.touch-cluster-left&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;width: 136px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;hardcoded — shrink नहीं होती&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.touch-cluster-center&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;max-width: 120px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;बाकी से छोटी रहती थी&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.touch-cluster-right&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;width: 102px&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;सबसे छोटी — right-aligned&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;#touch-controls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;justify-content: space-between&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;edge पर push — center gap बड़ा&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  क्या बदला? (What changed?)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;style.css&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;सभी clusters को &lt;code&gt;flex: 1&lt;/code&gt; से equal width दी।&lt;br&gt;&lt;br&gt;
Hardcoded &lt;code&gt;width&lt;/code&gt; / &lt;code&gt;max-width&lt;/code&gt; हटाए।&lt;br&gt;&lt;br&gt;
&lt;code&gt;justify-content: space-evenly&lt;/code&gt; से तीनों clusters में uniform gap।&lt;br&gt;&lt;br&gt;
Button sizes &lt;code&gt;clamp()&lt;/code&gt; से proportionally घटाई।&lt;/p&gt;




&lt;h2&gt;
  
  
  Before / After
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Cluster widths
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* ── BEFORE ── */&lt;/span&gt;
&lt;span class="nc"&gt;.touch-cluster-left&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;136px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex-start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.touch-cluster-center&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;120px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.touch-cluster-right&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;102px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex-end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* ── AFTER ── */&lt;/span&gt;
&lt;span class="nc"&gt;.touch-cluster-left&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.touch-cluster-center&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* max-width हटाया */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.touch-cluster-right&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Container justify
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* ── BEFORE ── */&lt;/span&gt;
&lt;span class="nf"&gt;#touch-controls&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;space-between&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;12px&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* ── AFTER ── */&lt;/span&gt;
&lt;span class="nf"&gt;#touch-controls&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;space-evenly&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt; &lt;span class="m"&gt;6px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Button sizes (clamp values घटाए)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* ── BEFORE ── */&lt;/span&gt;
&lt;span class="nc"&gt;.touch-btn-xl&lt;/span&gt;      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;68px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;18vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;96px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;5vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="m"&gt;32px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.touch-btn-md&lt;/span&gt;      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;52px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;13vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;72px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;22px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;4.5vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;28px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.touch-btn-sm&lt;/span&gt;      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;46px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;12vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;64px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;18px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;4vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.touch-btn-primary&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;82px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;22vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;110px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;6.5vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;40px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* ── AFTER ── */&lt;/span&gt;
&lt;span class="nc"&gt;.touch-btn-xl&lt;/span&gt;      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;54px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;14vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;72px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;4vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="m"&gt;26px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.touch-btn-md&lt;/span&gt;      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;44px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;11vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;58px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;18px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3.5vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;22px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.touch-btn-sm&lt;/span&gt;      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;38px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;10vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;15px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3.2vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;19px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.touch-btn-primary&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;66px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;17vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;84px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;26px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;5.5vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;34px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Files Changed | बदली गई फ़ाइलें
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Change&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;style.css&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cluster widths → &lt;code&gt;flex: 1&lt;/code&gt;; button sizes कम; &lt;code&gt;space-evenly&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Result | परिणाम
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ तीनों clusters अब बराबर width लेते हैं&lt;/li&gt;
&lt;li&gt;✅ Buttons proportionally छोटे — cramped नहीं&lt;/li&gt;
&lt;li&gt;✅ &lt;code&gt;space-evenly&lt;/code&gt; से uniform gap — edges पर भी&lt;/li&gt;
&lt;li&gt;✅ HTML / JS — कोई बदलाव नहीं&lt;/li&gt;
&lt;li&gt;✅ Desktop / non-touch devices — unaffected&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Human-designed, AI-assisted. सभी शास्त्रीय और रचनात्मक निर्णय Weired Codes द्वारा।&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;🎮 &lt;a href="https://weirdcodes.itch.io/moksha" rel="noopener noreferrer"&gt;itch.io&lt;/a&gt; &amp;nbsp;|&amp;nbsp;&lt;br&gt;
💻 &lt;a href="https://github.com/weirdcodesofficial/MOKSHA" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; &amp;nbsp;|&amp;nbsp;&lt;br&gt;
🐘 &lt;a href="https://mastodon.social/@pjatmasto" rel="noopener noreferrer"&gt;Mastodon&lt;/a&gt; &amp;nbsp;|&amp;nbsp;&lt;br&gt;
𝕏 &lt;a href="https://x.com/weirdcodesx" rel="noopener noreferrer"&gt;X&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>gamedev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>NaN Bug Fix</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Sun, 16 Aug 2026 11:32:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/nan-bug-fix-1jbk</link>
      <guid>https://dev.to/weirdcodesofficial/nan-bug-fix-1jbk</guid>
      <description>&lt;h1&gt;
  
  
  मोक्ष Devlog — शास्त्र-ग्रंथ अपडेट + NaN Bug Fix
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Series:&lt;/strong&gt; मोक्ष Devlog — Building a Vedic Karma Game&lt;br&gt;
&lt;strong&gt;Tags:&lt;/strong&gt; &lt;code&gt;bugfix&lt;/code&gt; &lt;code&gt;content&lt;/code&gt; &lt;code&gt;shaashtra&lt;/code&gt; &lt;code&gt;vanilla-js&lt;/code&gt; &lt;code&gt;html5-canvas&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  संक्षेप
&lt;/h2&gt;

&lt;p&gt;इस पैच में दो काम हुए:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;NaN Bug Fix&lt;/strong&gt; — शास्त्र-ग्रंथ के हर page पर श्लोक की जगह "NaN" दिख रहा था। एक पुराना diff marker (&lt;code&gt;+&lt;/code&gt;) accidentally source code में रह गया था — JavaScript उसे unary &lt;code&gt;+&lt;/code&gt; operator मान रहा था।&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;शास्त्र-ग्रंथ Content Update&lt;/strong&gt; — नए mechanics (Gyroscope steering, Mobile touch controls, Chakravaata physics, Punarjanma types) जो implement तो हो गए थे, लेकिन शास्त्र में documented नहीं थे — वो भी जोड़े।&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🐛 Bug Fix — श्लोक की जगह NaN
&lt;/h2&gt;

&lt;h3&gt;
  
  
  क्या दिख रहा था
&lt;/h3&gt;

&lt;p&gt;शास्त्र खोलने पर — हर page पर — श्लोक की जगह:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NaN
— गीता ४.३७
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Punya/Paap/Prarabdha sab theek tha, sirf shlok block broken tha.&lt;/p&gt;

&lt;h3&gt;
  
  
  Root Cause
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;src/shaashtra.js&lt;/code&gt; के &lt;code&gt;renderShaashtraPage()&lt;/code&gt; function में श्लोक-render block इस तरह था:&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="c1"&gt;// ❌ BUGGY — diff markers (+) column-0 पर accidentally रह गए&lt;/span&gt;
&lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="s2"&gt;`&amp;lt;p style="text-align:center;margin:14px 0;"&amp;gt;`&lt;/span&gt;
     &lt;span class="o"&gt;+&lt;/span&gt;  &lt;span class="s2"&gt;`&amp;lt;em style="color:#ffecb4;"&amp;gt;`&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;                    &lt;span class="c1"&gt;// बहु-पंक्ति श्लोक — '\n' को &amp;lt;br&amp;gt; बनाएँ&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;                    &lt;span class="nf"&gt;escapeHtml&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;                    &lt;span class="s2"&gt;`&amp;lt;/em&amp;gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;क्यों NaN?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Column-0 पर &lt;code&gt;+&lt;/code&gt; को JavaScript &lt;strong&gt;unary &lt;code&gt;+&lt;/code&gt; operator&lt;/strong&gt; मानता है, binary concatenation नहीं:&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;p...&amp;gt;&amp;lt;em...&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;  &lt;span class="o"&gt;+&lt;/span&gt;  &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ज्ञानाग्निः सर्वकर्माणि...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
                        &lt;span class="err"&gt;↑&lt;/span&gt;
                   &lt;span class="nx"&gt;unary&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;on&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result: &lt;code&gt;"&amp;lt;p...&amp;gt;&amp;lt;em...&amp;gt;" + NaN + "&amp;lt;/em&amp;gt;"&lt;/code&gt; → HTML में &lt;code&gt;NaN&lt;/code&gt; render होता है।&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ✅ FIXED — proper indentation, diff markers हटाए&lt;/span&gt;
&lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="s2"&gt;`&amp;lt;p style="text-align:center;margin:14px 0;"&amp;gt;`&lt;/span&gt;
     &lt;span class="o"&gt;+&lt;/span&gt;  &lt;span class="s2"&gt;`&amp;lt;em style="color:#ffecb4;"&amp;gt;`&lt;/span&gt;
     &lt;span class="c1"&gt;// बहु-पंक्ति श्लोक — '\n' को &amp;lt;br&amp;gt; बनाएँ (escape के बाद, सुरक्षित)&lt;/span&gt;
     &lt;span class="o"&gt;+&lt;/span&gt;  &lt;span class="nf"&gt;escapeHtml&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
     &lt;span class="o"&gt;+&lt;/span&gt;  &lt;span class="s2"&gt;`&amp;lt;/em&amp;gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;सीख:&lt;/strong&gt; Diff review में हमेशा column-0 पर &lt;code&gt;+&lt;/code&gt;/&lt;code&gt;-&lt;/code&gt; markers को double-check करें — कभी-कभी ये operator बन जाते हैं।&lt;/p&gt;




&lt;h2&gt;
  
  
  📜 शास्त्र-ग्रंथ Content Updates
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Stale Comments हटाए
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;SHAASHTRA_PAGES&lt;/code&gt; export के ऊपर दो पुराने TODO comments थे जो v0.0.6 से relevant नहीं रहे:&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="c1"&gt;// ❌ OLD&lt;/span&gt;
&lt;span class="c1"&gt;// ⚠️ PAGE_2, PAGE_3 अगले पैच में जुड़ेंगे।&lt;/span&gt;
&lt;span class="c1"&gt;// ⚠️ PAGE_3 अगले पैच में जुड़ेगा।&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SHAASHTRA_PAGES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;PAGE_1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;PAGE_2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;PAGE_3&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="c1"&gt;// ✅ NEW&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SHAASHTRA_PAGES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;PAGE_1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;PAGE_2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;PAGE_3&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. Page 1 — पुनर्जन्म: पवित्र बनाम अपवित्र
&lt;/h3&gt;

&lt;p&gt;खिलाड़ी को नहीं पता था कि &lt;code&gt;R&lt;/code&gt; key कब काम करती है और कब नहीं।&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Added (HI):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;♻️ पुनर्जन्म — पवित्र बनाम अपवित्र :
जब समय शून्य पर कर्म-भार शेष हो — पुनर्जन्म होता है।
पवित्र पुनर्जन्म (R key) तभी संभव है जब शुभकर्म, अशुभकर्म और प्रारब्ध
— तीनों शून्य हों। यदि कोई भी शेष हो तो आत्मा "अपवित्र" रूप में पुनः आती है।
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Added (EN):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;♻️ Punarjanma — Pure vs Impure :
When Samaya reaches zero with karma remaining, rebirth follows. A Pure Rebirth
(R key) is only possible when Punya, Paapa, and Praarabdha are all zero.
If any remains, the soul returns in an "impure" form.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;शास्त्र-संदर्भ: &lt;code&gt;engine.js&lt;/code&gt; → &lt;code&gt;let isApavitra = (shuvhaKarma &amp;gt; 0 || ashuvhaKarma &amp;gt; 0 || prarabdha &amp;gt; 0)&lt;/code&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Page 2 Controls — Gyroscope + Mobile Touch
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;v0.0.9&lt;/code&gt; में &lt;code&gt;touch.js&lt;/code&gt; → &lt;code&gt;TouchControls&lt;/code&gt; (virtual buttons) और &lt;code&gt;GyroscopeControls&lt;/code&gt; (gamma-axis tilt) implement हुए थे, लेकिन शास्त्र में mention नहीं था।&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Added after steering line (HI):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;📱 Mobile: स्क्रीन पर virtual buttons (ॐ 🌿 🙏 💀 ♻️ 🐚 🪔) |
🔄 Gyroscope: device बाईं/दाईं झुकाएँ — iOS 13+ पर permission dialog।
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Added after steering line (EN):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;📱 Mobile: on-screen virtual buttons (ॐ 🌿 🙏 💀 ♻️ 🐚 🪔) |
🔄 Gyroscope: tilt device left/right — iOS 13+ shows a permission dialog.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  4. Page 2 — Chakravaata Mechanics Section
&lt;/h3&gt;

&lt;p&gt;Chakravaata (माया-तूफ़ान) implement था, README में documented था — लेकिन शास्त्र में इसकी mechanics missing थीं। खिलाड़ी को नहीं पता था कि यह खींचता है, और इसे कैसे नष्ट करें।&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Added new section (HI):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🌀 चक्रवात — माया का भय-रूप

🌀 चक्रवात : माया का भय-रूप — 160px range में player को स्वयं की ओर खींचता है।
             अन्य शुभ/अशुभ माया को भी खींचता है।

ॐ नाम-मार्ग : नाम-जाप वलय चक्रवात को भस्म करती है — नाम सर्वशक्तिमान है।

🐚 यंत्र-मार्ग : शंख-वलय (Y) भी चक्रवात नष्ट करती है — जब नाम संचित न हो।

⚠️ सीधे टकराने पर +1 अशुभ कर्म — नाम या शंख ही एकमात्र रक्षा।
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Added new section (EN):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🌀 Chakravaata — The face of fear in Maya

🌀 Chakravaata  : The storm of Samsara — pulls the player toward itself within
                  a 160px range. Also drags nearby Shuvha and Ashuvha Maya.

ॐ Naama-Maarga  : The Naama-Japa ring burns the Chakravaata — Naama is all-powerful.

🐚 Yantra-Maarga : The Shankha ring (Y) also destroys the Chakravaata —
                   for when no Naama is available.

⚠️ A direct collision adds +1 Ashuvha Karma — only Naama or Shankha can protect you.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📁 Files Changed
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Changes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;src/shaashtra.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;NaN bugfix (unary &lt;code&gt;+&lt;/code&gt; removed); stale comments cleaned; Page 1 HI+EN: Punarjanma types added; Page 2 HI+EN: Gyroscope/Mobile note added; Page 2 HI+EN: Chakravaata section added&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Before / After
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Before — शास्त्र Page 1 (screenshot)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ज्ञानाग्निः सर्वकर्माणि भस्मसात् कुरुते

NaN          ← 🐛 श्लोक की जगह NaN
— गीता ४.३७
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;After — शास्त्र Page 1&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ज्ञानाग्निः सर्वकर्माणि भस्मसात् कुरुते   ← ✅ सही render
— गीता ४.३७

♻️ पुनर्जन्म — पवित्र बनाम अपवित्र :     ← ✅ नया section
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;After — शास्त्र Page 2 (Chakravaata section)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🌀 चक्रवात — माया का भय-रूप 🌀           ← ✅ नया section

🌀 चक्रवात : माया का भय-रूप — 160px range में player को खींचता है।
ॐ नाम-मार्ग : नाम-जाप वलय चक्रवात को भस्म करती है।
🐚 यंत्र-मार्ग : शंख-वलय (Y) भी चक्रवात नष्ट करती है।
⚠️ सीधे टकराने पर +1 अशुभ कर्म।
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔗 Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🎮 &lt;a href="https://weirdcodes.itch.io/moksha" rel="noopener noreferrer"&gt;Play on itch.io&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;a href="https://github.com/weirdcodesofficial/MOKSHA" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🐘 &lt;a href="https://mastodon.social/@pjatmasto" rel="noopener noreferrer"&gt;Mastodon&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;𝕏 &lt;a href="https://x.com/weirdcodesx" rel="noopener noreferrer"&gt;X / Twitter&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>javascript</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>भक्ति-मार्ग में नाम की प्रधानता</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Sun, 16 Aug 2026 05:15:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/bhkti-maarg-men-naam-kii-prdhaantaa-3oo4</link>
      <guid>https://dev.to/weirdcodesofficial/bhkti-maarg-men-naam-kii-prdhaantaa-3oo4</guid>
      <description>&lt;h1&gt;
  
  
  🕉️ देवलॉग — भक्ति-मार्ग में नाम की प्रधानता
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Devlog: Bhakti-Marga Naama Spawn Bias&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;दिनांक / Date:&lt;/strong&gt; 2026-08-16&lt;br&gt;
&lt;strong&gt;संस्करण / Version:&lt;/strong&gt; v0.0.9+&lt;br&gt;
&lt;strong&gt;commit:&lt;/strong&gt; &lt;code&gt;feat(karma): add tunnel-biased spawn via _spawnXPos() helper&lt;/code&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🇮🇳 हिंदी
&lt;/h2&gt;
&lt;h3&gt;
  
  
  समस्या — भक्ति-मार्ग में अव्यवस्था
&lt;/h3&gt;

&lt;p&gt;भक्ति-मार्ग (Tunnel) मोक्ष का केन्द्रीय मार्ग है — यहीं नाम मिलता है,&lt;br&gt;
यहीं पुण्य-पाप भस्म होते हैं, यहीं पूर्ण-समर्पण संभव है।&lt;/p&gt;

&lt;p&gt;परंतु एक समस्या थी — &lt;code&gt;_spawnMaya()&lt;/code&gt; में &lt;strong&gt;सभी माया-प्रकारों&lt;/strong&gt; का&lt;br&gt;
&lt;code&gt;xPos&lt;/code&gt; पूरी canvas-width पर random था।&lt;br&gt;&lt;br&gt;
इसका अर्थ था कि shuvha 🌿, ashuvha 🥀, chakravaata 🌪️, shankha 🐚, jyoti 🪔&lt;br&gt;
— सभी tunnel के अंदर भी उतनी ही frequency पर आ सकते थे जितनी बाहर।&lt;/p&gt;

&lt;p&gt;परिणाम: भक्ति-मार्ग अव्यवस्थित लगता था।&lt;br&gt;&lt;br&gt;
नाम (ॐ) अपने ही पथ पर अल्पसंख्यक था।&lt;br&gt;&lt;br&gt;
यह शास्त्र-विरुद्ध है — भक्ति-मार्ग में नाम की प्रधानता होनी चाहिए।&lt;/p&gt;


&lt;h3&gt;
  
  
  समाधान — &lt;code&gt;_spawnXPos(tunnelProb)&lt;/code&gt; helper
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;src/karma.js&lt;/code&gt; में एक नया helper जोड़ा गया:&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="nf"&gt;_spawnXPos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tunnelProb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &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;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;tunnelProb&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// tunnel zone — नाम का क्षेत्र&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;TUNNEL_X&lt;/span&gt; &lt;span class="o"&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="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;TUNNEL_WIDTH&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;// बाईं या दाईं पट्टी — tunnel exclude&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;अब &lt;code&gt;_spawnMaya()&lt;/code&gt; में हर type का अपना &lt;code&gt;tunnelProb&lt;/code&gt; है:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;माया-प्रकार&lt;/th&gt;
&lt;th&gt;tunnelProb&lt;/th&gt;
&lt;th&gt;अर्थ&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ॐ नाम&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1.0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;हमेशा tunnel में&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;shuvha 🌿&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% बाहर, 15% tunnel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ashuvha 🥀&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% बाहर, 15% tunnel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;chakravaata 🌪️&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% बाहर, 15% tunnel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;shankha 🐚&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% बाहर, 15% tunnel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;jyoti 🪔&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% बाहर, 15% tunnel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;kripa ✋&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% बाहर, 15% tunnel&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  शास्त्रीय आधार
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"भक्त्या मामभिजानाति यावान्यश्चास्मि तत्त्वतः।"&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
— भगवद्गीता १८.५५&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;भक्ति-मार्ग वह पवित्र क्षेत्र है जहाँ सारथी नाम के साथ एकाग्र होता है।&lt;br&gt;
संसार की अड़चनें वहाँ भी आती हैं — परंतु नाम की प्रधानता अब&lt;br&gt;
gameplay में भी दृश्यमान है।&lt;/p&gt;


&lt;h3&gt;
  
  
  क्या बदला
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;src/karma.js&lt;/code&gt; — &lt;code&gt;_spawnXPos()&lt;/code&gt; helper जोड़ा; &lt;code&gt;_spawnMaya()&lt;/code&gt; के सभी xPos updated&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;README.md&lt;/code&gt; — Features, Change Log, और Developer Reference में entry जोड़ी&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  आगे क्या
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;tunnelProb = 0.15&lt;/code&gt; को gameplay test के बाद tune किया जा सकता है&lt;/li&gt;
&lt;li&gt;भविष्य में &lt;code&gt;chetanaaJaagrita&lt;/code&gt; होने पर tunnel में naama और अधिक dense हो सकती है&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🇬🇧 English
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Problem — Chaos in the Bhakti-Marga
&lt;/h3&gt;

&lt;p&gt;The Bhakti-Marga (Tunnel) is the sacred path of Moksha — Naama is collected&lt;br&gt;
here, Punya and Paapa are burnt here, and Poorna-Samarpana is only possible here.&lt;/p&gt;

&lt;p&gt;But there was a problem. In &lt;code&gt;_spawnMaya()&lt;/code&gt;, &lt;strong&gt;every Maya type&lt;/strong&gt; had its &lt;code&gt;xPos&lt;/code&gt;&lt;br&gt;
drawn randomly across the entire canvas width.&lt;/p&gt;

&lt;p&gt;This meant that shuvha 🌿, ashuvha 🥀, chakravaata 🌪️, shankha 🐚, jyoti 🪔&lt;br&gt;
— all of them could appear inside the tunnel just as often as outside.&lt;/p&gt;

&lt;p&gt;Result: the Bhakti-Marga felt chaotic.&lt;br&gt;&lt;br&gt;
Naama (ॐ) was outnumbered on its own path.&lt;br&gt;&lt;br&gt;
This is contrary to Shastra — the path of devotion should be dominated by the Name.&lt;/p&gt;


&lt;h3&gt;
  
  
  Solution — &lt;code&gt;_spawnXPos(tunnelProb)&lt;/code&gt; helper
&lt;/h3&gt;

&lt;p&gt;A new helper was added to &lt;code&gt;src/karma.js&lt;/code&gt;:&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="nf"&gt;_spawnXPos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tunnelProb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &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;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;tunnelProb&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;TUNNEL_X&lt;/span&gt; &lt;span class="o"&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="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;TUNNEL_WIDTH&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;// left or right strip — tunnel excluded&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each Maya type in &lt;code&gt;_spawnMaya()&lt;/code&gt; now has its own &lt;code&gt;tunnelProb&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Maya Type&lt;/th&gt;
&lt;th&gt;tunnelProb&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ॐ Naama&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1.0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Always inside tunnel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shuvha 🌿&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% outside, 15% inside&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ashuvha 🥀&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% outside, 15% inside&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chakravaata 🌪️&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% outside, 15% inside&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shankha 🐚&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% outside, 15% inside&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Jyoti 🪔&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% outside, 15% inside&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kripa ✋&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.15&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;85% outside, 15% inside&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Obstacles remain inside the Bhakti-Marga — but Naama is now&lt;br&gt;
undeniably its most prominent presence.&lt;/p&gt;




&lt;h3&gt;
  
  
  Scriptural Basis
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"भक्त्या मामभिजानाति यावान्यश्चास्मि तत्त्वतः।"&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;"Through Bhakti one knows Me in truth — what I am and how great I am."&lt;/em&gt;&lt;br&gt;&lt;br&gt;
— Bhagavad Gita 18.55&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Files Changed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;src/karma.js&lt;/code&gt; — &lt;code&gt;_spawnXPos()&lt;/code&gt; helper added; all &lt;code&gt;xPos&lt;/code&gt; assignments in &lt;code&gt;_spawnMaya()&lt;/code&gt; updated&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;README.md&lt;/code&gt; — Features, Change Log, and Developer Reference updated&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  What's Next
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;tunnelProb = 0.15&lt;/code&gt; can be tuned further after gameplay testing&lt;/li&gt;
&lt;li&gt;Future: when &lt;code&gt;chetanaaJaagrita&lt;/code&gt; is true, Naama density inside tunnel could increase further&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Developed by Weird Codes — Human-designed, AI-assisted.&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;🔗 &lt;a href="https://weirdcodes.itch.io/moksha" rel="noopener noreferrer"&gt;weirdcodes.itch.io/moksha&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;a href="https://youtube.com/shorts/xyhPAljt7pk?feature=share" rel="noopener noreferrer"&gt;Watch Video Clip&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>gamedev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Now Karma Bandhana is Adhomukhi and Aatma breath pulse with white glow.</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Sat, 15 Aug 2026 22:33:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/now-karma-bandhana-is-adhomukhi-and-aatma-breath-pulse-with-white-glow-1jmm</link>
      <guid>https://dev.to/weirdcodesofficial/now-karma-bandhana-is-adhomukhi-and-aatma-breath-pulse-with-white-glow-1jmm</guid>
      <description>&lt;h1&gt;
  
  
  MOKSHA Development Log — 2026-08-15
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/weirdcodesofficial/MOKSHA" rel="noopener noreferrer"&gt;weirdcodesofficial/MOKSHA&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Project Description:&lt;/strong&gt; An HTML5 browser game based on Sanatan Shastras and Karmic philosophy&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Language Composition:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript: 89.4%&lt;/li&gt;
&lt;li&gt;CSS: 6.3%&lt;/li&gt;
&lt;li&gt;HTML: 4.3%&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;This devlog documents &lt;strong&gt;3 hours of focused development&lt;/strong&gt; on 2026-08-15, completing &lt;strong&gt;v0.0.9&lt;/strong&gt; with major architectural and visual enhancements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Mobile/touch platform support (iOS + Android)&lt;/li&gt;
&lt;li&gt;✅ Gyroscope steering (DeviceOrientation API)&lt;/li&gt;
&lt;li&gt;✅ 5-step Guru-Diksha tutorial system&lt;/li&gt;
&lt;li&gt;✅ ES6 modular architecture (11 files)&lt;/li&gt;
&lt;li&gt;✅ Enhanced visuals (Atman glow + Karma-responsive triangles)&lt;/li&gt;
&lt;li&gt;✅ Bug fixes &amp;amp; code consistency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Total Impact:&lt;/strong&gt; ~8,300 lines of well-documented, Vedic-philosophy-aligned game code ready for the v0.1.&lt;/p&gt;


&lt;h2&gt;
  
  
  Commits
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. docs: Updated README file.
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Commit:&lt;/strong&gt; &lt;a href="https://github.com/weirdcodesofficial/MOKSHA/commit/ee310ff1c32b7e3931a46d170e65bd5ec6ee0e6e" rel="noopener noreferrer"&gt;&lt;code&gt;ee310ff1c32b7e3931a46d170e65bd5ec6ee0e6e&lt;/code&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Time:&lt;/strong&gt; 2026-08-15 17:56 UTC&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Author:&lt;/strong&gt; pj90 (weirdcodesofficial)&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Changes:&lt;/strong&gt; +341 / −143 lines&lt;/p&gt;
&lt;h4&gt;
  
  
  Major Updates to v0.0.9 Documentation
&lt;/h4&gt;
&lt;h5&gt;
  
  
  📱 Mobile &amp;amp; Touch Support
&lt;/h5&gt;

&lt;p&gt;New &lt;code&gt;touch.js&lt;/code&gt; module with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On-screen touch button overlay (←/→/ॐ/🌿/🙏/💀/♻️/🐚/🪔)&lt;/li&gt;
&lt;li&gt;Blocker-stack visibility system for tutorial/shaashtra states&lt;/li&gt;
&lt;li&gt;Gyroscope steering (gamma-axis tilt; iOS 13+ permission dialog)&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  🎓 Guru-Diksha Tutorial System
&lt;/h5&gt;

&lt;p&gt;New &lt;code&gt;tutorial.js&lt;/code&gt; (TutorialManager):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5-step progressive learning system:

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Move&lt;/strong&gt; — ≥40px horizontal movement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maya&lt;/strong&gt; — Collect first naama (&lt;code&gt;activeNaam &amp;gt;= 1&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jaapa&lt;/strong&gt; — Trigger naam-jaap mode&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tunnel&lt;/strong&gt; — Enter antimaCharana tunnel&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Praarabdha&lt;/strong&gt; — Endure past-life karma&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Slow-mode (dt × 0.3) during card display for reading&lt;/li&gt;
&lt;li&gt;Forced naama spawn during steps 1–2&lt;/li&gt;
&lt;li&gt;Anti-chakravaata wait gate; praarabdha-wait gate&lt;/li&gt;
&lt;li&gt;localStorage persistence (&lt;code&gt;'moksha_tutorial_seen'&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  🏗️ ES6 Module Refactor
&lt;/h5&gt;

&lt;p&gt;Architecture now split into &lt;strong&gt;11 files&lt;/strong&gt; (~8,312 lines total):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Lines&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;engine.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~1220&lt;/td&gt;
&lt;td&gt;Core orchestrator + KarmaMixin, PhysicsMixin, StateMixin&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;karma.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~542&lt;/td&gt;
&lt;td&gt;Vedic collision &amp;amp; action logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;physics.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~203&lt;/td&gt;
&lt;td&gt;Glow rings, particles, explosions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;state.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~202&lt;/td&gt;
&lt;td&gt;HUD updates, alert management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;touch.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~344&lt;/td&gt;
&lt;td&gt;Touch controls + Gyroscope API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tutorial.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~355&lt;/td&gt;
&lt;td&gt;Learning system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;audio.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~1279&lt;/td&gt;
&lt;td&gt;28 mp3 layered ambient + SFX&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;render.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~1452&lt;/td&gt;
&lt;td&gt;All Canvas drawing (+ tutorial card renderer)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;main.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~854&lt;/td&gt;
&lt;td&gt;Game loop, input polling, initialization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;i18n.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~464&lt;/td&gt;
&lt;td&gt;hi/en translation with late-binding resolve&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;shaashtra.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~268&lt;/td&gt;
&lt;td&gt;3-page spiritual knowledge system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;style.css&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;External&lt;/td&gt;
&lt;td&gt;All UI styles&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h5&gt;
  
  
  🎮 Input Mapping Enhancement
&lt;/h5&gt;

&lt;p&gt;Updated input control table with new Touch column:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Keyboard&lt;/th&gt;
&lt;th&gt;Gamepad&lt;/th&gt;
&lt;th&gt;Touch&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Chariot Steering&lt;/td&gt;
&lt;td&gt;A/D, ←/→&lt;/td&gt;
&lt;td&gt;DPAD L/R&lt;/td&gt;
&lt;td&gt;←/→ button&lt;/td&gt;
&lt;td&gt;इंद्रिय-नियंत्रण (Sense Control)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Naam-Jaap&lt;/td&gt;
&lt;td&gt;SPACE&lt;/td&gt;
&lt;td&gt;RT (7)&lt;/td&gt;
&lt;td&gt;ॐ button&lt;/td&gt;
&lt;td&gt;Name recitation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Detachment&lt;/td&gt;
&lt;td&gt;S, ↓&lt;/td&gt;
&lt;td&gt;X (2)&lt;/td&gt;
&lt;td&gt;🌿 button&lt;/td&gt;
&lt;td&gt;पुण्य-बंधन रोकें (Block virtue binding)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Surrender&lt;/td&gt;
&lt;td&gt;W, ↑&lt;/td&gt;
&lt;td&gt;RB (5)&lt;/td&gt;
&lt;td&gt;🙏 button&lt;/td&gt;
&lt;td&gt;Final-stage only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pralaya&lt;/td&gt;
&lt;td&gt;Q&lt;/td&gt;
&lt;td&gt;LB (4)&lt;/td&gt;
&lt;td&gt;💀 button&lt;/td&gt;
&lt;td&gt;Voluntary dissolution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sacred Rebirth&lt;/td&gt;
&lt;td&gt;R&lt;/td&gt;
&lt;td&gt;LT (6)&lt;/td&gt;
&lt;td&gt;♻️ button&lt;/td&gt;
&lt;td&gt;Pure rebirth&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scripture&lt;/td&gt;
&lt;td&gt;ESC&lt;/td&gt;
&lt;td&gt;BACK (8)&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;Knowledge gate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pause&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;START (9)&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;Pause&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conch&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y (0)&lt;/td&gt;
&lt;td&gt;🐚 button&lt;/td&gt;
&lt;td&gt;Dispel Maya chaos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lamp&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;B (1)&lt;/td&gt;
&lt;td&gt;🪔 button&lt;/td&gt;
&lt;td&gt;Vision in darkness&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scripture Nav&lt;/td&gt;
&lt;td&gt;↑↓ (held)&lt;/td&gt;
&lt;td&gt;DPAD U/D&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;Scroll&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h5&gt;
  
  
  🌍 Gyroscope Steering System
&lt;/h5&gt;

&lt;p&gt;gamma axis: portrait mode left/right tilt (-90° to +90°) deadzone: ±10° — neutral zone for straight driving iOS 13+: DeviceOrientationEvent.requestPermission() — user-gesture required Android: automatic — no dialog calibrate(): next event becomes baseline (zero)&lt;/p&gt;

&lt;p&gt;Key ownership safety: Gyro and keyboard/touch work simultaneously without interference.&lt;/p&gt;
&lt;h5&gt;
  
  
  🎵 Audio Architecture Updates
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Total: 28 mp3 files (22 eager, 6 deferred)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Eager Load:&lt;/strong&gt; naamaSamarpita, samarpita, punaraJanma, shathendriya, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deferred Load:&lt;/strong&gt; bgMusic, chetanaJaagrita, pralaya, jaagritaSwaansa, moksha, antimaCharana&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Duck Reduction per Layer:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;BG_MUSIC_DUCK_REDUCTION: 0.75&lt;/li&gt;
&lt;li&gt;JAAGRITA_SWAANSA_DUCK_REDUCTION: 0.55&lt;/li&gt;
&lt;li&gt;SUSHUPTI_SWAANSA_DUCK_REDUCTION: 0.20 (improved from 0.55)&lt;/li&gt;
&lt;li&gt;RUNNING_HORSES_DUCK_REDUCTION: 0.15&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  📊 Variable Naming Consistency Pass
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;purnaSamarpana&lt;/code&gt; → &lt;code&gt;poornaSamarpana&lt;/code&gt; (Sanskrit correction)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;isshaashtraVisible&lt;/code&gt; → &lt;code&gt;isShaashtraVisible&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;handleShaashtraGamepadNav()&lt;/code&gt; — now callable from start-screen too&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  ⚡ Performance Improvements
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Single RAF Loop:&lt;/strong&gt; Dual RAF removed (Issue #64)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visibility API:&lt;/strong&gt; Tab-hide cancels rAF; restore resets &lt;code&gt;lastTime&lt;/code&gt; (prevents dt spike)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sprite Caches:&lt;/strong&gt; Emoji offscreen canvas per emoji + 3-state Pankhudi cache&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DOM Throttle:&lt;/strong&gt; Guards like &lt;code&gt;lastPunyaAlertSecond&lt;/code&gt; prevent spam&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  2. docs: Updated readme file.
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Commit:&lt;/strong&gt; &lt;a href="https://github.com/weirdcodesofficial/MOKSHA/commit/19cce7a6f9d7b23e6e3c4d10b36a4e82d06bfbf2" rel="noopener noreferrer"&gt;&lt;code&gt;19cce7a6f9d7b23e6e3c4d10b36a4e82d06bfbf2&lt;/code&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Time:&lt;/strong&gt; 2026-08-15 19:00 UTC&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Author:&lt;/strong&gt; pj90 (weirdcodesofficial)&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Changes:&lt;/strong&gt; +1 / −2 lines&lt;/p&gt;
&lt;h4&gt;
  
  
  Minor Documentation Fix
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Added version label to ES6 Modular Refactor changelog:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🆕 ES6 Modular Refactor (0.0.4)&lt;/p&gt;

&lt;p&gt;Clarifies refactor release version in change log&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Removed PayPal donation link from footer social links&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  3. fix: fixed variable name.
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Commit:&lt;/strong&gt; &lt;a href="https://github.com/weirdcodesofficial/MOKSHA/commit/45bb9af6e533d857fdd2c169d52f1156ed5106c5" rel="noopener noreferrer"&gt;&lt;code&gt;45bb9af6e533d857fdd2c169d52f1156ed5106c5&lt;/code&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Time:&lt;/strong&gt; 2026-08-15 19:21 UTC&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Author:&lt;/strong&gt; pj90 (weirdcodesofficial)&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Changes:&lt;/strong&gt; +8 / −8 lines&lt;/p&gt;
&lt;h4&gt;
  
  
  Variable Naming Consistency Fix
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Issue:&lt;/strong&gt; Typo in Sanskrit variable naming&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; &lt;code&gt;swaansaingSmoothSize&lt;/code&gt; → &lt;code&gt;swaansaringSmoothSize&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Locations Updated:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;README.md: 1 occurrence (code comment)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/render.js&lt;/code&gt;: 7 occurrences across:&lt;/li&gt;
&lt;li&gt;Player body radius calculation&lt;/li&gt;
&lt;li&gt;Glow effect rendering&lt;/li&gt;
&lt;li&gt;Horse positioning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Reason:&lt;/strong&gt; Consistency in Sanskrit phonetics where सांस (swaansa) means "breath"&lt;/p&gt;


&lt;h3&gt;
  
  
  4. render: added atma breath pulse glow.
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Commit:&lt;/strong&gt; &lt;a href="https://github.com/weirdcodesofficial/MOKSHA/commit/5c28afae40ef2696d6cde57ce10bc1b654f8cf0a" rel="noopener noreferrer"&gt;&lt;code&gt;5c28afae40ef2696d6cde57ce10bc1b654f8cf0a&lt;/code&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Time:&lt;/strong&gt; 2026-08-15 19:59 UTC&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Author:&lt;/strong&gt; pj90 (weirdcodesofficial)&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Changes:&lt;/strong&gt; +10 / −3 lines&lt;/p&gt;
&lt;h4&gt;
  
  
  Atman (Spirit) Visual Enhancement
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; Emphasize the eternal अत्मन् (Atman) as consciousness that persists through all karmic cycles&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Changes to &lt;code&gt;src/render.js&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Glow Radius Increase&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before: 6px × scale&lt;/li&gt;
&lt;li&gt;After: 12px × scale&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Swaansa-Synchronized Pulse Animation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;shadowBlur&lt;/code&gt;: 20 + (worldSwaansaPulse × 45)&lt;/li&gt;
&lt;li&gt;Minimum: 20 at rest&lt;/li&gt;
&lt;li&gt;Maximum: ~65 at breath peak&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;shadowColor&lt;/code&gt;: Divine violet &lt;code&gt;rgba(220, 200, 255, ${atmanOpacity})&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Opacity: 0.55 + (worldSwaansaPulse × 0.45)&lt;/li&gt;
&lt;li&gt;Syncs with meditation breath cycle&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Center Dot Dynamic&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Radius: 0.7 + (worldSwaansaPulse × 0.5)&lt;/li&gt;
&lt;li&gt;Shadow: atmanGlow × 1.4&lt;/li&gt;
&lt;li&gt;Also pulses with swaansa for continuity&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Visual Intent:&lt;/strong&gt; The Atman glows brighter with each breath, symbolizing eternal presence independent of karma.&lt;/p&gt;


&lt;h3&gt;
  
  
  5. src/render.js
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Commit:&lt;/strong&gt; &lt;a href="https://github.com/weirdcodesofficial/MOKSHA/commit/3a060f15f1d6bedecef5a09967735c7451231b14" rel="noopener noreferrer"&gt;&lt;code&gt;3a060f15f1d6bedecef5a09967735c7451231b14&lt;/code&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Time:&lt;/strong&gt; 2026-08-15 20:54 UTC&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Author:&lt;/strong&gt; pj90 (weirdcodesofficial)&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Changes:&lt;/strong&gt; +33 / −2 lines&lt;/p&gt;
&lt;h4&gt;
  
  
  Dual-Triangle Yantra Breath Mechanics
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Philosophy (शास्त्र-अनुसार):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The two triangles represent the eternal duality of existence:&lt;/p&gt;

&lt;p&gt;निष्कर्म आत्मा (Karma-freed Soul) ↓ ऊर्ध्वगामी 🔺 (Upward Movement) → मोक्ष (Liberation path) → Gold pulse glow&lt;/p&gt;

&lt;p&gt;कर्म-बद्ध आत्मा (Karma-bound Soul) ↓ अधोगामी 🔻 (Downward Movement) → संसार (Worldly cycle) → Reddish pulse glow&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation Logic:&lt;/strong&gt;&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;isKarmaMukta&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;shuvhaKarma&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;ashuvhaKarma&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;praarabdha&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isKarmaMukta&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// 🔺 UPWARD TRIANGLE: Active (breathing pulse)&lt;/span&gt;
  &lt;span class="c1"&gt;//    - Color: gold rgba(255, 215, 0, ...)&lt;/span&gt;
  &lt;span class="c1"&gt;//    - LineWidth: 2.2 → 4.0 px (swaansa-sync)&lt;/span&gt;
  &lt;span class="c1"&gt;//    - Shadow: 14 → 32 px blur (swaansa-sync)&lt;/span&gt;

  &lt;span class="c1"&gt;// 🔻 DOWNWARD TRIANGLE: Inactive (static dim at 18% alpha)&lt;/span&gt;
  &lt;span class="c1"&gt;//    - Color: dim gold rgba(255, 200, 60, 0.5)&lt;/span&gt;
  &lt;span class="c1"&gt;//    - LineWidth: 1.2 px&lt;/span&gt;
  &lt;span class="c1"&gt;//    - No shadow&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// 🔺 UPWARD TRIANGLE: Inactive (static dim)&lt;/span&gt;

  &lt;span class="c1"&gt;// 🔻 DOWNWARD TRIANGLE: Active (breathing pulse)&lt;/span&gt;
  &lt;span class="c1"&gt;//    - Color: reddish rgba(255, 80, 40, ...)&lt;/span&gt;
  &lt;span class="c1"&gt;//    - LineWidth: 2.2 → 4.0 px (swaansa-sync)&lt;/span&gt;
  &lt;span class="c1"&gt;//    - Shadow: 14 → 32 px blur (swaansa-sync)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Animation Parameters:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Rest&lt;/th&gt;
&lt;th&gt;Peak&lt;/th&gt;
&lt;th&gt;Formula&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Line Width&lt;/td&gt;
&lt;td&gt;2.2 px&lt;/td&gt;
&lt;td&gt;4.0 px&lt;/td&gt;
&lt;td&gt;2.2 + (worldSwaansaPulse × 1.8)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shadow Blur&lt;/td&gt;
&lt;td&gt;14 px&lt;/td&gt;
&lt;td&gt;32 px&lt;/td&gt;
&lt;td&gt;14 + (worldSwaansaPulse × 18)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Opacity&lt;/td&gt;
&lt;td&gt;0.7&lt;/td&gt;
&lt;td&gt;1.0&lt;/td&gt;
&lt;td&gt;0.7 + (worldSwaansaPulse × 0.3)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Visual Intent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time visual feedback of karma bondage state&lt;/li&gt;
&lt;li&gt;Breathing animation (swaansa-pulse) represents life force&lt;/li&gt;
&lt;li&gt;Gold (ऊर्ध्व) vs. Red (अधो) follows Vedic color symbolism&lt;/li&gt;
&lt;li&gt;Continuously educates player through Vedic philosophy&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Statistics&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Commits by Type&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Documentation: 2 commits (README updates)&lt;/li&gt;
&lt;li&gt;Features: 2 commits (Tutorial, Touch, Gyro, Modules)&lt;/li&gt;
&lt;li&gt;Bug Fixes: 1 commit (Variable naming)&lt;/li&gt;
&lt;li&gt;Visual Enhancement: 2 commits (Atman glow, Triangle mechanics)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code Impact&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Total Changes: ~395 lines (additions + deletions)&lt;/li&gt;
&lt;li&gt;Files Modified: README.md, src/render.js, src/tutorial.js, src/touch.js&lt;/li&gt;
&lt;li&gt;Architecture Upgrade: Single HTML → 11 ES6 modules&lt;/li&gt;
&lt;li&gt;Total Codebase: ~3,835 lines → ~8,312 lines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Timeline&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Summary&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;17:56&lt;/td&gt;
&lt;td&gt;Major Release&lt;/td&gt;
&lt;td&gt;v0.0.9 Documentation + Module Architecture&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;19:00&lt;/td&gt;
&lt;td&gt;Documentation&lt;/td&gt;
&lt;td&gt;Version label clarification&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;19:21&lt;/td&gt;
&lt;td&gt;Bug Fix&lt;/td&gt;
&lt;td&gt;Variable naming consistency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;19:59&lt;/td&gt;
&lt;td&gt;Visual&lt;/td&gt;
&lt;td&gt;Atman breath glow enhancement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20:54&lt;/td&gt;
&lt;td&gt;Visual&lt;/td&gt;
&lt;td&gt;Karma-responsive triangle system&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;strong&gt;📱 Mobile-First Support&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Touch button controls (8 action buttons visible on mobile)&lt;/li&gt;
&lt;li&gt;Gyroscope steering via device tilt&lt;/li&gt;
&lt;li&gt;Blocker-stack system prevents control conflicts&lt;/li&gt;
&lt;li&gt;iOS 13+ permission handling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎓 Educational System&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5-step गुरु-दीक्षा (Guru-Diksha) tutorial&lt;/li&gt;
&lt;li&gt;Slow-mode for reading (dt × 0.3)&lt;/li&gt;
&lt;li&gt;Forced naama spawns to teach mechanics&lt;/li&gt;
&lt;li&gt;Gate checks (antimaCharana-wait, praarabdha-wait)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🏗️ Architectural Improvements&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ES6 modules (no build tool needed)&lt;/li&gt;
&lt;li&gt;Mixin pattern for class composition&lt;/li&gt;
&lt;li&gt;Dependency injection for game state&lt;/li&gt;
&lt;li&gt;Circular import safety via constants&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎨 Visual Enhancements&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Atman with dynamic breath pulse&lt;/li&gt;
&lt;li&gt;Karma-responsive dual triangles&lt;/li&gt;
&lt;li&gt;Swaansa-synchronized animations&lt;/li&gt;
&lt;li&gt;3-state sprite caching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎵 Audio Refinements&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Improved SUSHUPTI duck level (0.55 → 0.20)&lt;/li&gt;
&lt;li&gt;28 mp3 files with eager/deferred loading&lt;/li&gt;
&lt;li&gt;Smooth duck/fade system per layer&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Performance Metrics&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Before → After&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single RAF loop (eliminated dual-RAF overhead)&lt;/li&gt;
&lt;li&gt;Visibility API integration (saves battery when tab hidden)&lt;/li&gt;
&lt;li&gt;Sprite caching: 6 cache objects + emoji cache&lt;/li&gt;
&lt;li&gt;DOM write throttling via dirty-check&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Optimization Patterns&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Object pools for particles/text (no GC pressure)&lt;/li&gt;
&lt;li&gt;Sprite caches for emoji/maya/pankhudi&lt;/li&gt;
&lt;li&gt;Bucket-cached gradients (swaansa + tunnel)&lt;/li&gt;
&lt;li&gt;Per-key animation state (glow rings, UI scales)&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Files Overview&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;New Files (v0.0.9)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;src/touch.js — Touch controls + Gyroscope steering&lt;/li&gt;
&lt;li&gt;src/tutorial.js — 5-step learning system&lt;/li&gt;
&lt;li&gt;src/state.js — HUD management split from engine&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Refactored Files&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;src/engine.js — Now slim orchestrator (~1220 lines)&lt;/li&gt;
&lt;li&gt;src/render.js — Enhanced with tutorial card + triangle mechanics (~1452 lines)&lt;/li&gt;
&lt;li&gt;src/main.js — Now includes touch/gyro/tutorial wiring (~854 lines)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;External Assets&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;style.css — Extracted from HTML&lt;/li&gt;
&lt;li&gt;audio/ — 28 mp3 files (indexed in i18n)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Testing Checklist (Recommended)&lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;[ ]  Desktop (Chrome/Firefox/Safari) — keyboard + gamepad&lt;/li&gt;
&lt;li&gt;[ ]  Mobile (iOS Safari) — touch controls + gyro permission&lt;/li&gt;
&lt;li&gt;[ ]  Mobile (Android Chrome) — touch controls + gyro (no permission needed)&lt;/li&gt;
&lt;li&gt;[ ]  Tutorial flow — all 5 steps complete&lt;/li&gt;
&lt;li&gt;[ ]  Karma-responsive triangles — test all states (karma-mukta ↔ karma-bound)&lt;/li&gt;
&lt;li&gt;[ ]  Atman glow — verify swaansa pulse (≥1 breath cycle)&lt;/li&gt;
&lt;li&gt;[ ]  Audio levels — verify duck reductions apply&lt;/li&gt;
&lt;li&gt;[ ]  i18n switching — hi/en toggle, persists across reload&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Known Limitations&lt;/strong&gt;&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Gyroscope — Mobile browsers only; desktop has no sensor&lt;/li&gt;
&lt;li&gt;Touch Buttons — Desktop sees no buttons (not needed)&lt;/li&gt;
&lt;li&gt;Audio Eagerness — 22 MP3s preload may impact startup on slow connections&lt;/li&gt;
&lt;li&gt;localStorage — Tutorial seen flag persists browser-wide (no per-user tracking)&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Developer Notes&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;शास्त्र-संरचना (Shastra Structure)&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;This codebase tightly integrates Vedic philosophy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Katha Upanishad's chariot metaphor (player = Atman, chariot = body, reins = mind)&lt;/li&gt;
&lt;li&gt;Gita 4.37 (ज्ञानाग्निः सर्वकर्माणि भस्मसात्) — Knowledge burns all karma&lt;/li&gt;
&lt;li&gt;Dual-triangle yantra (निष्कर्म/कर्म-बद्ध duality)&lt;/li&gt;
&lt;li&gt;Swaansa cycles (meditation breath = time in game)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Module Dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;main.js&lt;br&gt;
├── engine.js (KarmaEngine)&lt;br&gt;
│   ├── karma.js (KarmaMixin)&lt;br&gt;
│   ├── physics.js (PhysicsMixin)&lt;br&gt;
│   └── state.js (StateMixin)&lt;br&gt;
├── render.js (Renderer)&lt;br&gt;
├── audio.js (AudioManager)&lt;br&gt;
├── tutorial.js (TutorialManager)&lt;br&gt;
├── touch.js (TouchControls, GyroscopeControls)&lt;br&gt;
├── i18n.js (translations)&lt;br&gt;
└── shaashtra.js (renderShaashtraPage)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Style Guidelines&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Language: Vanilla ES6 (no TypeScript, no build tool)&lt;/li&gt;
&lt;li&gt;Comments: Hindi + English; Sanskrit terms preserved&lt;/li&gt;
&lt;li&gt;Naming: camelCase for JS, UPPER_SNAKE_CASE for constants&lt;/li&gt;
&lt;li&gt;Architecture: Mixins, object pools, sprite caches, DI pattern&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Contact &amp;amp; Support&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt;: weirdcodesofficial/MOKSHA&lt;br&gt;
&lt;strong&gt;Developer&lt;/strong&gt;: Weired Codes (PS → weirdcodesofficial)&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Channe&lt;/th&gt;
&lt;th&gt;Link&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;📘 Facebook&lt;/td&gt;
&lt;td&gt;weirdcodesofficial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📸 Instagram&lt;/td&gt;
&lt;td&gt;
&lt;a class="mentioned-user" href="https://dev.to/weirdcodes"&gt;@weirdcodes&lt;/a&gt;.dev&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🧵 Threads&lt;/td&gt;
&lt;td&gt;
&lt;a class="mentioned-user" href="https://dev.to/weirdcodes"&gt;@weirdcodes&lt;/a&gt;.dev&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Last Updated&lt;/strong&gt;: 2026-08-15 20:54 UTC&lt;br&gt;
&lt;strong&gt;Version&lt;/strong&gt;: v0.0.9&lt;br&gt;
&lt;strong&gt;Status&lt;/strong&gt;: Under Development and Testing v0.1&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtube.com/shorts/AcqUXWaNT6Q?feature=share" rel="noopener noreferrer"&gt;Watch video clip&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Sanchita Karma makes stronger Praarabdha | More Difficult to Win.</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Sat, 15 Aug 2026 12:55:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/sanchita-karma-makes-stronger-praarabdha-more-difficult-to-win-3idl</link>
      <guid>https://dev.to/weirdcodesofficial/sanchita-karma-makes-stronger-praarabdha-more-difficult-to-win-3idl</guid>
      <description>&lt;h1&gt;
  
  
  🌀 MOKSHA Devlog — August 15, 2026
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Today's session focused on implementing and refining the &lt;strong&gt;Shareera Gatee&lt;/strong&gt; (body-motion) mechanic as a companion to Samaya Gatee (time-flow). Major work included UI/UX polish, physics integration, and karmic carry-over mechanics for praarabdha (accumulated karma from past lives).&lt;/p&gt;




&lt;h2&gt;
  
  
  Commits &amp;amp; Changes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;UI: Added HUD Element for Shareera Gati&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Commit: &lt;code&gt;8874bcc&lt;/code&gt;&lt;/em&gt; | 06:33 UTC&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; HTML/JS refactoring of HUD elements&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added new &lt;code&gt;shareera-gatee&lt;/code&gt; HUD indicator (cyan, &lt;code&gt;#67e8f9&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Renamed &lt;code&gt;ui-gatee&lt;/code&gt; → &lt;code&gt;samaya-gatee&lt;/code&gt; for clarity&lt;/li&gt;
&lt;li&gt;Updated engine state tracking:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;_oldStats&lt;/code&gt; and &lt;code&gt;_uiScales&lt;/code&gt; now include both &lt;code&gt;samayaGatee&lt;/code&gt; and &lt;code&gt;shareeraGatee&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;_uiGlows&lt;/code&gt; state expanded for dual-gatee animations&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Files Modified:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;index.html&lt;/code&gt; — HUD markup&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/engine.js&lt;/code&gt; — State initialization&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/main.js&lt;/code&gt; — UI element references&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/state.js&lt;/code&gt; — Animation loop updates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Status:&lt;/strong&gt; ✅ Foundational UI structure ready&lt;/p&gt;




&lt;h3&gt;
  
  
  2. &lt;strong&gt;UI:UX: Implemented Shareera Gatee&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Commit: &lt;code&gt;387e488&lt;/code&gt;&lt;/em&gt; | 09:30 UTC&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Physics integration + dynamic speed modulation&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Karma-speed coupling:&lt;/strong&gt; Punya/Paapa/Praarabdha now reduce player movement speed

&lt;ul&gt;
&lt;li&gt;Base speed modifier: &lt;code&gt;_sMod = 0.7^ashuvhaKarma × 0.8^shuvhaKarma × 0.7^praarabdha&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Body-motion indicators:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;🐌 = slowed (&amp;lt; 100%)&lt;/li&gt;
&lt;li&gt;🚶 = normal (100%)&lt;/li&gt;
&lt;li&gt;🏃 = accelerated (&amp;gt; 100%)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Samaya Gatee now represents relative time flow:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Inverted modifier: &lt;code&gt;karmaSpeedMul = (1/0.7)^ashuvhaKarma × (1/0.8)^shuvhaKarma&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Time accelerates under karma-debt, slows under merit&lt;/li&gt;
&lt;li&gt;Dynamic emojis: 🧊 (slow) / ⌛ (normal) / ⚡ (fast)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Praarabdha snapshot on death:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Speed multiplier carries forward to next rebirth&lt;/li&gt;
&lt;li&gt;Stored in &lt;code&gt;_praarabdhaSpeedMul&lt;/code&gt; for persistent karma-weight&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Game Feel:&lt;/strong&gt; Karma now directly affects both &lt;strong&gt;movement speed&lt;/strong&gt; and &lt;strong&gt;time progression&lt;/strong&gt;, creating dual gameplay feedback&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Files Modified:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;src/engine.js&lt;/code&gt; — Physics + HUD animation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/karma.js&lt;/code&gt; ��� Rebirth speed carry-over&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;index.html&lt;/code&gt; — Icon symbols&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Status:&lt;/strong&gt; ✅ Core mechanic implemented&lt;/p&gt;




&lt;h3&gt;
  
  
  3. &lt;strong&gt;praarabdha: No Reset of Samaya Gatee on Punarjanma&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Commit: &lt;code&gt;4305106&lt;/code&gt;&lt;/em&gt; | 10:25 UTC&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Rebirth state persistence bug-fix&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Issue:&lt;/strong&gt; Speed multiplier resetting on rebirth, breaking karma continuity&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Renamed &lt;code&gt;_currentGatiModifier&lt;/code&gt; → &lt;code&gt;_currentGateeModifier&lt;/code&gt; (clarity)&lt;/li&gt;
&lt;li&gt;Introduced &lt;code&gt;_praarabdhaSpeedMul&lt;/code&gt; (1.0 initial):

&lt;ul&gt;
&lt;li&gt;Persists across rebirths&lt;/li&gt;
&lt;li&gt;Multiplied by current-life karma on death&lt;/li&gt;
&lt;li&gt;Carries forward momentum of karma-debt&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Updated &lt;code&gt;reset()&lt;/code&gt; to preserve this value (only reset on R-key)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Gameplay:&lt;/strong&gt; Subsequent rebirths now inherit the "speed penalty" from all prior lives, creating &lt;strong&gt;cumulative difficulty&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Files Modified:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;src/engine.js&lt;/code&gt; — State initialization + reset&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Status:&lt;/strong&gt; ✅ Persistence fixed&lt;/p&gt;




&lt;h3&gt;
  
  
  4. &lt;strong&gt;praarabdha-fix: Sanchita Karma Per Janma&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Commit: &lt;code&gt;c6370bd&lt;/code&gt;&lt;/em&gt; | 10:33 UTC&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Karma-accounting system refinement&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Issue:&lt;/strong&gt; Praarabdha units not tracking individual life-carries correctly&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added &lt;strong&gt;&lt;code&gt;_praarabdhaSpeedStack&lt;/code&gt;&lt;/strong&gt; — FIFO queue for per-janma multipliers

&lt;ul&gt;
&lt;li&gt;Each rebirth pushes its individual speed modifier&lt;/li&gt;
&lt;li&gt;When praarabdha is exhausted (bhog-complete), shift oldest entry&lt;/li&gt;
&lt;li&gt;Implements &lt;strong&gt;"पूर्व-कृत कर्म पूर्व-भुज्यते"&lt;/strong&gt; (ancient karma pays first)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Undo mechanic:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Math.hypot&lt;/code&gt; prevents floating-point drift&lt;/li&gt;
&lt;li&gt;Never divides below 1.0 (clamp at identity)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Only push to stack if &lt;code&gt;actualAdded &amp;gt; 0&lt;/code&gt; (prevents cap-hit false entries)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Architectural Insight:&lt;/strong&gt; This is a &lt;strong&gt;generational karma model&lt;/strong&gt; — each life's debt is tracked independently within the running total, enabling complex multi-life simulations&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Files Modified:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;src/engine.js&lt;/code&gt; — Stack operations + logic&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/karma.js&lt;/code&gt; — Rebirth push conditions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Status:&lt;/strong&gt; ✅ Multi-generational karma accounting&lt;/p&gt;




&lt;h3&gt;
  
  
  5. &lt;strong&gt;Bug: Fixed Samaya Gatee Circle Ratio&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Commit: &lt;code&gt;7f5b472&lt;/code&gt;&lt;/em&gt; | 11:10 UTC&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; Rendering synchronization&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Issue:&lt;/strong&gt; Samaya Gatee visual circle didn't match engine physics calculations&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Render ratio fix:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="nx"&gt;gatiRatio&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ashuvhaMod&lt;/span&gt; &lt;span class="err"&gt;×&lt;/span&gt; &lt;span class="nx"&gt;shuvhaMod&lt;/span&gt; &lt;span class="err"&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;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;praarabdha&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://youtube.com/shorts/iVz88XpekHM?feature=share" rel="noopener noreferrer"&gt;Watch Video Clip&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>gamedev</category>
      <category>html</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Fixed dt spike at tutorial card dismiss.</title>
      <dc:creator>Weird Codes</dc:creator>
      <pubDate>Fri, 14 Aug 2026 18:44:00 +0000</pubDate>
      <link>https://dev.to/weirdcodesofficial/fixed-dt-spike-at-tutorial-card-dismiss-4efp</link>
      <guid>https://dev.to/weirdcodesofficial/fixed-dt-spike-at-tutorial-card-dismiss-4efp</guid>
      <description>&lt;h1&gt;
  
  
  Devlog: Performance Fix - Tutorial Card Dismiss
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Commit SHA:&lt;/strong&gt; &lt;code&gt;9e00951468a361cd1127092072208ac6b63e947d&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Author:&lt;/strong&gt; pj90 (weirdcodesofficial)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; 2026-08-14 18:21:24 UTC&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Message:&lt;/strong&gt; performance-fix: fixes dt spike at tutorial card dismiss.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Fixed a delta time (&lt;code&gt;dt&lt;/code&gt;) spike that occurred when dismissing the tutorial card. The issue was that &lt;code&gt;lastTime&lt;/code&gt; was only being updated conditionally when there was no active tutorial card, causing a large time gap on the next frame after dismissal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Changes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;File Modified:&lt;/strong&gt; &lt;code&gt;src/main.js&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Before
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// tutorial card dismiss होने पर dt spike न आए&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;tutorial&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hasActiveCard&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="nx"&gt;lastTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ts&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  After
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// lastTime हमेशा update — pause/tutorial/shaashtra किसी में भी spike न आए&lt;/span&gt;
&lt;span class="nx"&gt;lastTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ts&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Technical Details
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: The conditional update of lastTime was causing delta time spikes because when the tutorial card was active, lastTime wasn't being updated. Upon dismissal, the accumulated time difference would create a large dt value in the game loop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Unconditionally update lastTime on every frame to ensure consistent delta time calculations, preventing spikes regardless of pause/tutorial/shaashtra states.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Smoother gameplay experience without frame rate anomalies when dismissing the tutorial card.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Files Changed&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/main.js (+2 lines, -2 lines)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Game Context&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This optimization is part of the MOKSHA project—an HTML5 browser game based on Sanatan Shastras and Karmic philosophy. The fix ensures the game maintains stable performance during tutorial interactions.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>gamedev</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
