[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.
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:
-
Zero Background Cron Jobs (
unschedule()): The game uses zero backgroundrunIn()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. -
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
heroDeltaJSON packet containing only the 6–8 numbers that changed (hp,mp,gold,xp,quests), reducing Hubitat HTTP POST overhead by 80%. -
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’sstatestorage. -
Client-Side
localStorageEngine Caching: Once your browser loads the game's JavaScript chunks the first time, they are cached in your browser'slocalStorage. On subsequent visits, your Hubitat hub only serves a few kilobytes of JSON state data.
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/data1through/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.
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.
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.
Installation Instructions
-
In your Hubitat web interface, go to Apps Code ➔ + New App.
-
Paste the complete
Dungeon Court ReviveGroovy code (or import via raw GitHub URL) and click Save. -
Click OAuth in the top-right corner of the editor ➔ Enable OAuth in App ➔ Update.
-
Go to Apps ➔ + Add User App ➔ select Dungeon Court Revive (OAuth RPG).
-
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




