Ad network abstraction #15

Open
opened 2026-10-22 00:45:48 -04:00 by cheech · 0 comments
Owner

A thin shared/ads.js interface so games and the shell never talk to an ad SDK directly.

ads.showBanner(slotId)      // header, gutter, sidebar, mobile banner
ads.showRewarded(rewardType) -> Promise<{completed, watchedMs}>
ads.showInterstitial()      // optional, between runs

Providers

  • placeholder (dev): countdown overlay, no network calls.
  • Google H5 Games Ads (Ad Placement API) / AdSense for web.
  • AdMob later, via a native wrapper if we ship Android.

Acceptance criteria

  • Provider chosen by config, placeholder default in dev
  • Rewarded call always pauses the game and mutes audio
  • Graceful fallback when blocked by an ad blocker (no reward, no crash)
  • No provider code imported by games
  • Docs list what each provider requires (account, ads.txt, consent)
A thin `shared/ads.js` interface so games and the shell never talk to an ad SDK directly. ```js ads.showBanner(slotId) // header, gutter, sidebar, mobile banner ads.showRewarded(rewardType) -> Promise<{completed, watchedMs}> ads.showInterstitial() // optional, between runs ``` ## Providers - **placeholder** (dev): countdown overlay, no network calls. - **Google H5 Games Ads (Ad Placement API) / AdSense** for web. - **AdMob** later, via a native wrapper if we ship Android. ## Acceptance criteria - [ ] Provider chosen by config, placeholder default in dev - [ ] Rewarded call always pauses the game and mutes audio - [ ] Graceful fallback when blocked by an ad blocker (no reward, no crash) - [ ] No provider code imported by games - [ ] Docs list what each provider requires (account, ads.txt, consent)
cheech added this to the M2 Rewarded ads milestone 2026-10-22 00:45:48 -04:00
cheech added this to the Roadmap project 2026-10-22 20:51:53 -04:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
NetDagger/arcade#15
No description provided.