DEV Community

Cover image for How I Built a Cyberpunk Web Game to Experience the Scale of $1 Trillion
Abhinav
Abhinav

Posted on

How I Built a Cyberpunk Web Game to Experience the Scale of $1 Trillion

Hey everyone! πŸ‘‹

Most tycoon games challenge you to start from zero and make billions. I decided to flip the script. What if you start with a massive bank account and your only goal is to go completely broke?

I built Spend 1 Trillion Dollarsβ€”a responsive, single-page web game where the only objective is to spend every single dollar.

Play Live: https://abhinavgamer730-ops.github.io/Spendtrillions/

Source Code: https://github.com/abhinavgamer730-ops/Spendtrillions


Key Features of the Simulator:

Fluctuating Stock/Crypto Markets: Real estate, stock markets, and cryptocurrency prices update dynamically in real-time. You must purchase assets at their peak value and dump them when the market crashes to burn your cash.

The Reverse-Casino Vault: For players looking to take huge risks, a hacking terminal allows you to wager billions. Winning the bet doubles your money (making you richer!), while losing the bet incinerates the money completely (bringing you closer to victory).

Level Progression Overlays: You start at Level 1 (Starter Loan of $100 Billion) and must progress to Level 4 (Tech Lord Mode of $5 Trillion) by successfully spending down your wallet to unlock the next tiers.

Speedrun Timer: Challenge your friends to see who can hit absolute zero the fastest.


Tech Stack Details:

Lightweight Front-End: The game operates entirely client-side using vanilla HTML5, CSS, and JavaScript. It runs smoothly on mobile web browsers with zero lag.

Real-Time Web Audio API: Instead of downloading heavy audio files, all sound effects (button clicks, cash burn fires, alarms) are synthesized in real-time using raw audio oscillators.

Local Storage Saves: Progress, level locks, and speedrun records are saved locally on the user's browser device.

I would love to get your feedback on the market pacing, UI aesthetics, and casino balancing!

Top comments (2)

Collapse
 
gw_abhi_4397cf271d7cafaef profile image
Abhinav

Thanks for checking out the post! πŸš€

If you have any questions about how the Web Audio API synthesizes sound on the fly (without audio files) or how the client-side state management is handled in vanilla JS, feel free to ask here.

Also, let me know your best speedrun time to go broke!"

Collapse
 
wealthyyvibes_quotes_8e23 profile image
Wealthyyvibes quotes

Good Game Try Know