DEV Community

Cover image for How I built a real-money 1v1 SDK for web games
JS
JS

Posted on

How I built a real-money 1v1 SDK for web games

What Challenge does

Devs drop a single <script> tag into their web game. Players match for $2 or $5, winner takes the pot, dev keeps 4.5% of every match. The button lives inside the host game — no separate app to download.

<script src="https://api.withchallenge.com/widget/dist/challenge-widget.js"></script>                                                                                                                                                                                        
Enter fullscreen mode Exit fullscreen mode

Then:

Challenge.init({                                                                                                                                                                                                                                                             
  gameId: 'your-game-id',                                                        
  apiKey: 'sk_test_...',                                                                                                                                                                                                                                                     
  entryFee: 2,                         
  onReady: handlePlayerReady,                                                                                                                                                                                                                                                
  onError: (err) => console.error(err),                                          
});
Enter fullscreen mode Exit fullscreen mode

~10 lines of code total. No backend changes if your game runs in the browser.

This is the Challenge button that will show in games

The Challenge button rendered in a web game

Challenge widget home screen

Three game modes

Different games decide winners differently, so the SDK supports three integration patterns:

  1. SCORE — Each player plays solo. They submit a score. The platform compares and pays the higher one.
  2. LIVE — Players play at the same time, with scores synced via WebSocket. They watch each other compete in real time.
  3. VERSUS — Your existing multiplayer game runs the match. You call sdk.reportWinner(userId) when it's over. Challenge handles the money.

Challenge widget winners screen

Most games I've reached out to map cleanly to one of these three modes. Single-player score and 1v1 head-to-head cover the broadest market today — every puzzle, reaction, or score-attack web game qualifies. Team-based formats (MOBAs, battle royale) and tournament brackets are on the roadmap.

What I learned

The legal framework is more navigable than I expected. Skill-based competition is legal in 30+ US states under the same predominance test DraftKings uses. State-by-state compliance varies — some states (Arizona, Arkansas, Connecticut, Louisiana, Montana, South Carolina, South Dakota, Tennessee) explicitly exclude real-money skill gaming.

The fintech is the actual moat. Payments, KYC, settlement, regulatory compliance — months of plumbing before you write any game code. That's the gap I've been filling.

AI changed everything about how I build. I drove the architecture; AI handled the implementation — backend, settlement engine, widget, three portals all came together because I could iterate at the speed of natural language. This is my second digital product; Bazu(a nutrition + diabetes tracker, withbazu.com) is already live in the App Store.

This is the new founder shape: business background + AI execution.

What's built

  • Full backend, settlement engine, fraud detection, KYC integration
  • Three portals: player, developer, admin
  • Widget SDK with three game modes
  • Demo: Swingi (playswingi.com) — a game built end-to end on Challenge as the reference integration for waitlist devs\

Players dashboard

Admin dashboard

Devs dashboard

What's gated by the next phase

I'm pre-launch. Three things require capital before going live:

  1. Payment processor — Stripe rejected real-money skill gaming. Working with a high-risk processor now.
  2. Multi-state legal opinion — Skill-vs-chance memo across top US markets.
  3. AML + Responsible Gaming documentation — Required for any regulated money-movement service.

None of these are technically hard. All require time, money, and legal expertise.

If you build web games

The waitlist for early integrations is at https://withchallenge.com.

I'm onboarding the first batch personally. Demo video: https://streamable.com/91xuz1.

Open to feedback on the tech, the legal framework, or the business model in the comments — or just anything you'd like to see built next.

Top comments (0)