Break. Earn. Upgrade. Gamble. Repeat.
A pirate-themed incremental game that turns conventional progression upside down by introducing high-stakes gambling mechanics where accumulated coins can be completely wiped out or multiplied to escape the island.

Incremental games inherently train players to expect monotonic growth — numbers only go up, upgrades are permanent, and time invested is guaranteed to yield compounding returns. The challenge was to violate that core expectation without making the game feel cheap or unfair.
I decoupled the economy, game loop, and gambling machine through an event-driven transactional model in C#, backed by deterministic state machines.
Implemented an EconomyManager that treats all resource mutations (crate drops, upgrades, gambling bets) as discrete transactions. Balance deductions are validated client-side and locked during slot reel spins, preventing concurrent request corruption.
Designed a pooled spawner for crates and coin pick-ups. Crates utilize 2D rigidbodies with pre-warmed hit-point state machines, ensuring consistent 60 FPS in WebGL by eliminating garbage-collection overhead.
Structured tiered gambling algorithms with dynamic odds. Machines evaluate player bet tiers against configurable paytables, firing visual reel tweens and dispatching resolved payout events to the audio and currency subsystems.
using System;
using UnityEngine;
public class EconomyManager : MonoBehaviour
{
public static EconomyManager Instance { get; private set; }
public int CurrentCoins { get; private set; } = 0;
public int EscapeGoal { get; private set; } = 5000;
public event Action<int> OnBalanceChanged;
public event Action<string> OnTransactionFailed;
public event Action OnEscapeGoalReached;
private bool isTransactionLocked = false;
private void Awake()
{
if (Instance != null && Instance != this) { Destroy(gameObject); return; }
Instance = this;
}
public void AddCoins(int amount, string source)
{
if (amount <= 0) return;
CurrentCoins += amount;
OnBalanceChanged?.Invoke(CurrentCoins);
if (CurrentCoins >= EscapeGoal)
OnEscapeGoalReached?.Invoke();
}
public bool TryExecuteGamble(int wager, float winMultiplier, float winProbability, out int payout)
{
payout = 0;
if (isTransactionLocked)
{
OnTransactionFailed?.Invoke("Machine is currently spinning!");
return false;
}
if (CurrentCoins < wager)
{
OnTransactionFailed?.Invoke("Insufficient coins to place bet!");
return false;
}
// Deduct wager atomically
CurrentCoins -= wager;
OnBalanceChanged?.Invoke(CurrentCoins);
isTransactionLocked = true;
// Resolve risk-reward outcome
bool won = UnityEngine.Random.value <= winProbability;
if (won)
{
payout = Mathf.RoundToInt(wager * winMultiplier);
CurrentCoins += payout;
}
isTransactionLocked = false;
OnBalanceChanged?.Invoke(CurrentCoins);
return won;
}
}ℹ This transactional pattern guarantees that rapid player inputs cannot cause race conditions or duplicate spending during gambling cycles in WebGL.
Risky Business was deployed as an optimized browser-playable build for IIITN Tantrafiesta 2026, delivering high-stakes gameplay with flawless stability.
Constant 60 FPS performance in WebGL via zero-allocation object pooling.
Zero balance desync or double-spend glitches across thousands of spin cycles.
Compressed WebGL build with Brotli assets under 15MB total footprint.
Playable right now in your browser with full WebGL performance.