DEV Community

Cover image for Sanchita Karma makes stronger Praarabdha | More Difficult to Win.
Weird Codes
Weird Codes

Posted on • Originally published at weirdcodes.itch.io

Sanchita Karma makes stronger Praarabdha | More Difficult to Win.

🌀 MOKSHA Devlog — August 15, 2026

Overview

Today's session focused on implementing and refining the Shareera Gatee (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).


Commits & Changes

1. UI: Added HUD Element for Shareera Gati

Commit: 8874bcc | 06:33 UTC

Scope: HTML/JS refactoring of HUD elements

Changes:

  • Added new shareera-gatee HUD indicator (cyan, #67e8f9)
  • Renamed ui-gateesamaya-gatee for clarity
  • Updated engine state tracking:
    • _oldStats and _uiScales now include both samayaGatee and shareeraGatee
    • _uiGlows state expanded for dual-gatee animations

Files Modified:

  • index.html — HUD markup
  • src/engine.js — State initialization
  • src/main.js — UI element references
  • src/state.js — Animation loop updates

Status: ✅ Foundational UI structure ready


2. UI:UX: Implemented Shareera Gatee

Commit: 387e488 | 09:30 UTC

Scope: Physics integration + dynamic speed modulation

Changes:

  • Karma-speed coupling: Punya/Paapa/Praarabdha now reduce player movement speed
    • Base speed modifier: _sMod = 0.7^ashuvhaKarma × 0.8^shuvhaKarma × 0.7^praarabdha
  • Body-motion indicators:
    • 🐌 = slowed (< 100%)
    • 🚶 = normal (100%)
    • 🏃 = accelerated (> 100%)
  • Samaya Gatee now represents relative time flow:
    • Inverted modifier: karmaSpeedMul = (1/0.7)^ashuvhaKarma × (1/0.8)^shuvhaKarma
    • Time accelerates under karma-debt, slows under merit
    • Dynamic emojis: 🧊 (slow) / ⌛ (normal) / ⚡ (fast)
  • Praarabdha snapshot on death:
    • Speed multiplier carries forward to next rebirth
    • Stored in _praarabdhaSpeedMul for persistent karma-weight

Game Feel: Karma now directly affects both movement speed and time progression, creating dual gameplay feedback

Files Modified:

  • src/engine.js — Physics + HUD animation
  • src/karma.js ��� Rebirth speed carry-over
  • index.html — Icon symbols

Status: ✅ Core mechanic implemented


3. praarabdha: No Reset of Samaya Gatee on Punarjanma

Commit: 4305106 | 10:25 UTC

Scope: Rebirth state persistence bug-fix

Issue: Speed multiplier resetting on rebirth, breaking karma continuity

Changes:

  • Renamed _currentGatiModifier_currentGateeModifier (clarity)
  • Introduced _praarabdhaSpeedMul (1.0 initial):
    • Persists across rebirths
    • Multiplied by current-life karma on death
    • Carries forward momentum of karma-debt
  • Updated reset() to preserve this value (only reset on R-key)

Gameplay: Subsequent rebirths now inherit the "speed penalty" from all prior lives, creating cumulative difficulty

Files Modified:

  • src/engine.js — State initialization + reset

Status: ✅ Persistence fixed


4. praarabdha-fix: Sanchita Karma Per Janma

Commit: c6370bd | 10:33 UTC

Scope: Karma-accounting system refinement

Issue: Praarabdha units not tracking individual life-carries correctly

Changes:

  • Added _praarabdhaSpeedStack — FIFO queue for per-janma multipliers
    • Each rebirth pushes its individual speed modifier
    • When praarabdha is exhausted (bhog-complete), shift oldest entry
    • Implements "पूर्व-कृत कर्म पूर्व-भुज्यते" (ancient karma pays first)
  • Undo mechanic:
    • Math.hypot prevents floating-point drift
    • Never divides below 1.0 (clamp at identity)
  • Only push to stack if actualAdded > 0 (prevents cap-hit false entries)

Architectural Insight: This is a generational karma model — each life's debt is tracked independently within the running total, enabling complex multi-life simulations

Files Modified:

  • src/engine.js — Stack operations + logic
  • src/karma.js — Rebirth push conditions

Status: ✅ Multi-generational karma accounting


5. Bug: Fixed Samaya Gatee Circle Ratio

Commit: 7f5b472 | 11:10 UTC

Scope: Rendering synchronization

Issue: Samaya Gatee visual circle didn't match engine physics calculations

Changes:

  • Render ratio fix:
  gatiRatio = ashuvhaMod × shuvhaMod × Math.pow(0.7, praarabdha)
Enter fullscreen mode Exit fullscreen mode

Watch Video Clip

Top comments (0)