[RELEASE] Dungeon Court Revive v18.3 — Full Gothic Dark-Fantasy RPG for Hubitat (OAuth Local & Cloud Webpage Game)

[RELEASE] Dungeon Court Revive (v18.0) — A Full 150-Level Grimdark RPG Running Natively on Hubitat (Dragon Court + Darkest Dungeon + Dark Souls)

If you played Fred Haslam’s classic Java browser RPG Dragon Court back in the day, or if you love the punishing tactical weight of Darkest Dungeon and Dark Souls, this project is for you.

I wanted to build a deep, persistent multiplayer browser RPG that I could play from my phone or desktop, and I wanted to host it using hardware I already had on hand. Looking at a spare Hubitat C-7 sitting on my desk, I wondered: Can a smart home hub actually host a full-blown, 150-level grimdark RPG with vector graphics, synthesized music, kingdom building, and asynchronous multiplayer?

Working alongside Google Gemini as an AI coding collaborator, I spent the last several weeks pushing Hubitat’s Groovy environment and OAuth web endpoints to their absolute limits. The result is Dungeon Court Revive: Legends of the Dragon Realm (v18.0)—an entire self-contained RPG that runs 100% natively inside a single Hubitat Custom App.

:desktop_computer: Hardware Recommendation: The "Spare C-7" vs. Your Main Hub

Recommendation #1: Dust Off That Spare Hub! If you upgraded to a C-8 or C-8 Pro and have an old C-5 or C-7 gathering dust in a drawer, this is the ultimate excuse to plug it back in. Turning a spare hub into a dedicated "RPG Game Server" for your household or friends (via the Hubitat Cloud OAuth link) is an absolute blast and gives retired hardware a second life.

Recommendation #2: What If You Only Have One Main Hub? While a spare hub is fun for tinkering, we specifically engineered v18.0 so it can run safely on your primary production hub without slowing down your Zigbee/Z-Wave meshes or automations:

  1. Zero Background Cron Jobs (unschedule()): The game uses zero background runIn() or periodic cron timers. Whether 45 minutes or 3 days pass while you are away, the hub does nothing in the background. All stamina regeneration, kingdom production, and world boss ticks are calculated lazily only at the exact millisecond an API request hits the hub.

  2. 80% Smaller Delta-Only Save Payloads: Routine patrol battles, stamina ticks, and tavern actions do not POST your entire character sheet back to the hub. Instead, the client sends a tiny heroDelta JSON packet containing only the 6–8 numbers that changed (hp, mp, gold, xp, quests), reducing Hubitat HTTP POST overhead by 80%.

  3. 3-Slot Hardcore Cap & 45% State Compression: By default, the app caps the active roster at 3 Hero Slots (configurable up to 6 in Admin Settings) and strips all default item keys (dur: 100, upgrade: 0, kills: 0, rarity: "Common") before writing to Hubitat’s state storage.

  4. Client-Side localStorage Engine Caching: Once your browser loads the game's JavaScript chunks the first time, they are cached in your browser's localStorage. On subsequent visits, your Hubitat hub only serves a few kilobytes of JSON state data.

:gear: How We Bypassed Hubitat & Groovy’s Hard Limits

For the fellow Groovy developers here who know how strict the JVM and Hubitat sandbox can be, here is how we got a massive RPG into a single app:

  • Beating the 64KB JVM Method Limit: A single Groovy method cannot exceed 64KB of bytecode, and massive string literals will crash the compiler. We split the game engine across 15 dedicated OAuth JavaScript endpoints (/js/data1 through /js/v16b), with each endpoint assembled from micro-split Groovy string-builder helpers kept strictly under 10,000 characters. When you open /play, a lightweight HTML bootloader fetches the 15 chunks sequentially with a live progress bar, evaluates them, and caches them locally.

  • 100% Procedural SVG Art (Zero Hosted Image Files Required): Hubitat isn't a CDN, so every piece of character art, monster portrait, and map is generated procedurally in real time using inline SVG vectors. Your hero’s Tarot card dynamically renders their race, gender, class regalia, medieval helm, facial scars, and astral aura. Even the Boar’s Head Inn renders custom SVG interior illustrations of the exact room you bed down in (from scurrying rats on the Cold Tavern Floor to the stained-glass Private Feather Suite).

  • Procedural Web Audio API Synthesizer: Using zero MP3s, the browser synthesizes a dynamic soundtrack and combat SFX on the fly—shifting from a calm tavern synth-lute on the world map to war-drums in battle and a multi-oscillator Gothic choir when a Boss hits 50% HP Phase II Enrage.

:scroll: The Lore & World of Valoria

Seven moons ago, at the Solstice Feast, Grand Vizier Malakor poisoned King Aldric IX. Neither dead nor waking, the King's soul was locked inside an obsidian phylactery deep beneath the Royal Catacombs while Malakor's Inquisition seized the High Court. Queen Isolde fled into the night with twelve sworn Outriders, scattering ciphered signets across the realm that point toward the Three Dragon Shards—ancient warden-keys forged when Aethelgard the First Wyrm fell at the Battle of the Sundered Sky.

You begin as a nameless Peasant in Area 1: The Blighted Shire Fields. Over 22 distinct regions and 150 character levels, you will fight your way through the Whispering Weald, Goblin Warrens, Ironcrag Glacier Peaks, and Sunken Atlantis, eventually ascending the Stair of Stars to confront Aethelgard the Reborn Progenitor at the Throne of Genesis.

:crossed_swords: Core Gameplay Systems (The Three Inspirations)

1. The Dragon Court DNA (Stats, Quests & Feudal Politics)

  • Guts, Wits & Charm: Distribute 20 build points across 6 Callings (Warrior, Wizard, Trader, Sage, Shadowblade, Paladin) and 8 Races, plus playable Origins (including the secret Nameless One Amnesia start that drops you into the Catacombs at Level 30 with 0 Gold).

  • The High Court & Feudal Ranks: Earn Court Fame from Royal Warrants and Jousting Lists to petition the Chancellor for 12 feudal titles—rising from Peasant and Knight to Duke, King of Valoria, and God-Monarch of Genesis (complete with animated SVG wax-seal verdicts).

  • Per-Character Personal Vaults: Each hero has their own private, lead-lined Vault in the Citadel to store Gold, 25 Heirloom items, and up to 20 locked Dragon Gems (protected from daily carried decay, though locked gems must be used or wagered at the Catacomb Gem Roulette within 7 days before turning into Dulled Slag).

2. The Dark Souls DNA (Tactical Combat, Poise & Soul-Urn Corpse Runs)

  • V.A.T.S. Limb Targeting & Poise Stagger: Flip any enemy’s Tarot card to target their Head (1.35x DMG, Stun & Silence), Torso (shreds Enemy Armor & Poise bars), or Legs (cripples Dodge). Shattering an enemy’s Poise bar staggers them for a guaranteed 100% Critical Strike.

  • Chained QTE Reflex Bar & Blade Clashes: Time your strikes and potions to a live moving cursor bar for +35% Gold Sweet-Spot Ripostes. When a Boss charges an Annihilation Cleave, the arena drops into crimson silhouette mode—requiring a timed Perfect Deflect or an Ultimate Blade-Clash.

  • Soul-Urn Rescue Delves & The 48-Hour Fallen Crypt: Every hero starts with 5 Seals of the Valkyrie (auto-resurrections). If you fall in battle with 0 Seals, you drop your Gold and a random backpack item into a Soul-Urn. You get one chance to survive a 5-room Dungeon Delve and slay the Sanctum Guardian to reclaim your Soul-Urn. Fail, and True Permadeath shatters your screen—sending your hero to the 48-Hour Fallen Crypt, where another character slot can resurrect them via Charon Vane at the Weeping Graveyard (or hunt their risen Revenant Bounty Boss on patrol!).

3. The Darkest Dungeon DNA (Torchlight Delves, Retinues & Outlaw Crime)

  • Branching SVG Torchlight Delves: Navigate an interactive branching dungeon map with 3 Torches. Every failed trap check snuffs a torch and drains HP; if all 3 torches go out in the dark, your delve fails.

  • Permadeath Mercenaries & Cross-Slot Alt Bodyguards: Hire up to 2 sellswords (including Brother Lazarus the Blood-Martyr, who sacrifices his life to intercept a fatal blow for you) or hire your own idle heroes from your other character slots as AI Bodyguards. When you camp for the night, banter only triggers from companions you’ve actually recruited—if you travel alone, only crickets chirp by the fire.

  • The Outlaw Underbelly (10% Shoplifting, Wanted Bounties & The Sewer Fence): Attempt a 10% five-finger heist on any item in the Bazaar. On the 90% failure roll, the merchant blacklists you for 1 hour (unless you equip the Inquisitor Hood or Plague Doctor Beak disguise in the Studio!) and summons a New Hire Watchman, High Court Halberdier, or King’s Obsidian Guard with a 5% flee cap. Slaying a guard stains your Fame and raises your Wanted Level, sending Royal Bounty Executioners after you on patrol until you launder your contraband and bribe the Watch Captain at the Underground Sewer Fence (or capture weakened guards into your Dungeon Interrogation Cell to extract -20% Boss Armor Intel!).

4. Kingdoms, Dynasties & Live Interactive Mini-Games

  • 2.5D Strongholds & Siege Catapults: At Level 20 (with a Knighthood and a Royal Consort), charter your own Kingdom. Allocate citizen workforce units, construct Brass Golems (and feed them crushed Vault Gem Slag for 2x mining overdrive), launch timed Sovereign Armada naval voyages, and defend your ramparts with an interactive SVG Trebuchet Trajectory Mini-Game while your Consort and Dynasty Heir fire volleys beside you.

  • Dynasty Heirs & Apprenticeships: Court and wed 5 Noble Ladies in the Velvet Chamber. Raise up to 6 Dynasty Children who can apprentice under Blacksmith Brom (+5% all-gear durability repair per tick) or Apothecary Mira (+1 Healing Potion per tick), or pass the crown to your heir at Level 50+ for permanent Prestige mutations.

  • Live QTE Mini-Games: Includes Animated Royal Jousting Lists, 3-Pin QTE Runic Lockpicking, Blacksmith Brom’s 3-Strike QTE Rhythm Anvil, Dark Weir Angling, Goblin Sapper 3x3 Minesweeper, High Court Liar’s Dice, and Gregor’s Bones of 21.

:hammer_and_wrench: Installation Instructions

  1. In your Hubitat web interface, go to Apps Code ➔ + New App.

  2. Paste the complete Dungeon Court Revive Groovy code (or import via raw GitHub URL) and click Save.

  3. Click OAuth in the top-right corner of the editor ➔ Enable OAuth in App ➔ Update.

  4. Go to Apps ➔ + Add User App ➔ select Dungeon Court Revive (OAuth RPG).

  5. Open the app to grab your Local LAN Play Link or Remote Cloud Play Link (which you can bookmark on your phone's home screen as a web app!).

If you have an old C-7 sitting in a drawer—or if you just want to see what a Hubitat hub looks like when it’s running a 22-realm dark fantasy RPG—give it a spin and let me know what you think!

Hubitat_Apps/Dungeon_Court_Revive at main · ShaneAllen334/Hubitat_Apps

-Reserve-

Absolutely amazing! Fantastic work! Now let’s see when the first Doom emulator arrives :wink:

Its only a matter of time.

Version 18.1 is released with some bug fixes.

...eyes the C-7 sitting in a drawer...

I might be biased! but it's very fun!

[RELEASE] Dungeon Court Revive v18.3 — Full Gothic Dark-Fantasy RPG for Hubitat (OAuth Local & Cloud Webpage Game)

Updated Feature List:

:satellite_antenna: Hubitat-Native Architecture & Smart Home Integration

  • Live Outdoor Weather Station Link: Connect your physical Hubitat weather station (Ecowitt, Tempest, OpenWeather, or individual rain/wind/temp/lightning sensors) to dynamically alter the game world. Real-world rain, high winds, lightning storms, cold snaps, and heatwaves trigger live in-game combat modifiers, farming bonuses, naval speed boosts, and weather-locked Apex Boss spawns.

  • Multi-Slot Asynchronous Co-Op & PvP (3 to 6 Hero Slots): Host multiple characters on one hub with 45-second concurrency session locks so family members or friends can play simultaneously without overwriting each other.

  • Zero-Bloat Paged Script Streaming: Uses 22 KB paged chunk streaming and delta state saves to respect Hubitat’s Groovy memory and cloud relay limits.

  • Admin Restoration & Control Portal: Built-in Hubitat App interface to inspect active character slots, toggle server-wide events, spawn World Bosses, or restore fallen heroes from the 48-hour Fallen Crypt.

:crossed_swords: Tactical Combat & Hardcore Mortality

  • Anatomical Limb Targeting & Poise System: Target the Head (1.35x DMG, Stun/Silence, and Boss Limb Severing), Torso (shreds Enemy Armor and Poise), or Legs (cripples Enemy Dodge).

  • Dynamic Level-Scaled Reflex Bar (QTE): Time your strikes and parries on a moving reflex bar for +18% to +35% Riposte damage. The target window dynamically shrinks as you face higher-level enemies and Bosses.

  • Boss Phase-Gates & Blade Clashes: Bosses feature multi-turn armor wards, a mandatory 50% HP Phase II enrage transition, and telegraphed Annihilation Cleaves that you must counter with a timed Perfect Deflect or Class Ultimate Clash.

  • 6-Buff FIFO Law: Heroes can channel a maximum of 6 active positive blessings at one time (First-In, First-Out—new buffs push out the oldest), while all Debuffs, Curses, Diseases, and Afflictions apply without limit.

  • Valkyrie Seals, Soul-Urn Rescue Delves & Permadeath: Heroes carry up to 3 Seals of the Valkyrie (consecrated 1/day). Falling with 0 Seals drops your Soul-Urn into a 5-Chamber Branching Dungeon Delve; fail to recover your urn before your 3 torches go out and your hero faces True Permadeath.

  • Same-Slot Graveyard Soul Exhumation: If a hero dies permanently, starting a new character in that same slot lets you visit The Weeping Graveyard at Level 5+ to exhume your predecessor's soul (+20% inherited stats and a 50% chance to unearth their best heirloom relic).

:anxious_face_with_sweat: Darkest Stress, Afflictions & Physical Diseases

  • Resolve Tests (Virtues vs. Afflictions): Dungeon traps, crits, and horror foes build Stress (0–100%). Hitting 100% triggers a Resolve Check—rolling either a heroic Virtue (Courageous, Stalwart, Focused) or a crippling Mental Affliction (Paranoid, Fearful, Hopeless, Masochistic, Raving).

  • Mortal Plagues & Diseases: Venomous, undead, and swamp enemies can infect you with persistent physical diseases (The Red Plague, Creeping Rabies, Weald Spore-Lung, Catacomb Lockjaw).

  • Cathedral Confessional & Leech Ward: Visit the Cathedral of the First Flame to confess your sins (-45% Stress & cures Afflictions) or undergo Plague-Doctor Leech Therapy to purge physical diseases.

:shield: The Two-Companion Law, Mortal Pets & Cross-Slot Bodyguards

  • Strict 2-Helper Party Cap: March into battle with at most 2 active helpers at a time—choosing any combination of Sellsword Recruits, a bound Animal Companion, a Dynasty Heir, or an Alt Slot Bodyguard.

  • Tactical Retinue Orders & Synergy Bonds: Issue real-time orders (Attack, Defend, Mix, Auto, or Sacrificial Protect) and unlock duo synergy bonds like Brother Lazarus the Blood-Martyr, who absorbs 20% of your Stress and sacrifices himself to restore you to 100% HP/MP.

  • 7-Day Resurrectionist Cooldown & Hazard Tax: When a sellsword dies in battle, the Resurrectionists of the Weeping Graveyard require 7 full days to stitch their soul back together—and every death under your command permanently raises future mercenary hiring costs (+35% Reputation Hazard Tax).

  • Mortal Animal Companions & 7-Day Weald Reincarnation: Bind and evolve 5 companions (Dire Wolf, Twilight Wisp, Brass Owl, Cinder Wyrmling, Obsidian Griffin) across 3 Armored Barding stages. Pets have their own HP bar in battle; if slain, Beastmaster Thulsa requires 7 days around the Weald-Stone to reincarnate their spirit.

  • Cross-Slot Alt Bodyguards: Hire one of your other Hubitat character slots as an 8-quest bodyguard. 100% of the gold retainer fee is transferred directly into that character's treasury, and they receive a Raven Battle Report on login showing their earnings and whether their shadow-retainer survived or fell.

:rose: Noble Courtship, Dynasty Heirs & Sovereign Kingdoms

  • The Obsidian High Court: Climb 12 feudal ranks from Peasant to God-Monarch of Genesis, managing passive Court Fame decay, Chancellor petitions, espionage, and masquerade mysteries.

  • The Velvet Chamber & Single Consort Blessing: Serenade, gift, and wed 5 noblewomen. Courtship affection and marital devotion decay over time if neglected; if you wed multiple consorts, you select one active Consort Blessing at a time.

  • Mortal Dynasty Heirs (3-Child Lifetime Cap Per Princess): Each Princess can bear at most 3 children in her lifetime (even if an heir dies in battle). Train heirs at the War Academy, apprentice them to Blacksmith Brom or Apothecary Mira, send them on 2-hour expeditions, or abdicate the throne to crown a Level 50+ heir via Dynasty Succession.

  • Sovereign Kingdom & Workforce Management: Charter your Royal Estate at Level 20+, allocate serfs (Farmers, Timber-wrights, Quarrymen, Burghers, Border Inquisitors), construct 7 upgradable strongholds, build automated Brass Golems, enact Royal Edicts, and defend 3-lane Trebuchet Rampart Sieges.

  • Standing Legions & Sovereign Armada: Command mass army battles using the Cavalry / Volley / Magic counter-triangle, or recruit Admiral Kaelen Vance to launch timed 4h–24h naval voyages and smuggle stolen contraband for Dragon Gems.

:world_map: 22 Vector Realms, Endgame Modes & Seasonal Events

  • 8 Races, 6 Callings & 3 Ascension Tiers: Play as Human, Elf, Dwarf, Halfling, Dragonborn, Half-Orc, Dhampir, or Goliath across Warrior, Wizard, Trader, Sage, Shadowblade, and Paladin—with Tier I Awakening (Lv 20), Tier II Mythic Ascension (Lv 75), Tier III Eclipse Dual-Classing (Lv 125), and Rite of Eternal Prestige (Lv 100+ Roman numeral succession: Camus II, III, IV).

  • 22 Interactive Vector Realms: Progress from The Blighted Shire Fields to The Throne of Genesis (Lv 150 Finale), unlocking 10/10 Regional Boss Warrants (with 72-hour lair respawns), a 20-Volume Lore Codex, and a Hunter's Bestiary.

  • Shared World Calamity Bosses & Co-Op Warrants: Team up across all hero slots on your hub to slay World Raid Bosses (including the 1% Galactic Destroyer), delay The Unmaking doomsday event, raise a 10-stage Shared Dynasty Wonder, and assist pinned Cross-Slot Co-Op Warrants.

  • Endgame Sanctums: Climb the Abyssal Spire, brave 10-wave Abyssal Chasm Gauntlets (with a rechargeable 3-sip Estus Soul-Flask), stabilize Void-Rifts for Cosmic Runes, complete Grandmaster Solaris's 5-Stage Hall of Legends Saga, or face your own 4x–10x reflection in the Mirror of the First King.

  • Dwarven Forge, Outlaw Fence & 12 Citadel Mini-Games: Temper gear up to +25, reforge 3-piece Class Gear Sets, awaken sentient blood-drinking weapons, shoplift from the Bazaar (and disguise yourself to bypass merchant blacklists), lock up to 20 Gems in your Personal Reliquary Vault, and compete in Jousting Lists, Brom's Rhythm Anvil, Runic Lockpicking, Dark Weir Angling, Sapper Kegs, Liar's Dice, and Bones of 21.

  • Automatic Seasonal Holiday Weeks: Automatically activates special monsters, loot bonuses, and raid bosses during Halloween Week, Thanksgiving Feast Week, and Super-Hard Krampusnacht Week (or toggle them anytime in the Omen Inspector).