Zarabianie

na grach HTML5

z pomocą

Web Monetization API

4Developers 2021

Andrzej Mazur@end3rEnclave Games
4Developers 2021, online, 25 maja 2021

Andrzej 'End3r' Mazur

Andrzej Mazur

2011 vs 2019

2011: onGameStart, Warsaw

2019: Microsoft HQ, Redmond

2012: Is HTML5 ready for gaming?

Poor Canvas performance

Poor performance

Way worse than native.

Crappy (or missing) audio

No audio

Play/sync issues, too many formats.

(Not) working offline

Offline

Web Storage, AppCache, IndexedDB, Web SQL.

Drafts of Web APIs

Web APIs

Gamepad, Pointer Lock, Fullscreen, etc...

Development tools

Dev environment

Borrowed from front-end.

No monetization

No monetization

Go native or go home.

2019: It works!

Good news

Performance improved

Audio working correctly

Audio

Offline with PWA

Offline with Service Workers

Web APIs support

Can I Use Gamepad

Lots of new tools

Phaser Editor

Lots of new tools

PlayCanvas Editor

Thousands of great games

js13kGames 2019: Bounce Back, [Swagshot], xx142-b2.exe

Technology is sufficient

But...

Web vs Native

Publishers and platforms

Facebook Instant Games

Fragmented market, oversaturates quickly.

Packaging to native

Steam

Competing with native, playing by their rules.

Indies vs Studios

Small indies

Stack

Fast hyper-casual mobile experiences.

Big studios

Quake4

WebGPU, WebAssembly, hundreds of MBs of assets.

Community survey

What are your struggles and needs? What problems are you facing?

So many different answers...

  • Too many packagers and preprocessors
  • Dev tools focusing on game development
  • More tutorials, courses, materials
  • New platforms oversaturating extremely quick
  • Not enough support for indie devs
  • Native 2D and 3D math modules
  • SharedArrayBuffers for multi-threaded games
  • Discoverability and monetization
  • Discoverability

    Monetization

    Change of focus

    1. Licensing games
    2. Subscriptions
    3. Advert revenue share

    Theft

    1. Protecting the assets
    2. Being cloned

    June 2019: W3C Games workshop

    Indie perspective on Web games

    2011 vs 2019

    Two main issues:

    • Discoverability
    • Monetization

    Coil

    Web Monetization API

    Many more

    Monetized website

    
    							<head>
    							  <meta name="monetization" content="$ilp.uphold.com/k4eJGQUDF9nw">
    							  // ...
    							</head>
    						

    Real-time money transfer

    coil.com

    $5 / month

    Detecting active subscribers

    Checking the state

    
    							if(document.monetization && document.monetization.state === 'started') {
    							  // do something
    							}
    						

    Listening for an event

    
    							function startEventHandler(event) {
    							  // do something
    							}
    							document.monetization.addEventListener('monetizationstart', startEventHandler);

    Extra content

    Levels, points, coins, weapons, bonuses, etc...

    No advertisements

    • No privacy issues
    • No spying on users
    • No selling data

    Full control

      "Classic" publisher Web Monetization
    Implementation: Complicated, changing code 1 line of HTML + 2 lines of JS
    Income: Waiting months for reports Instant, streamed in real time

    Finally, the "native"

    monetization alternative!

    Thank you! Questions? Ask in the comments!

    slides.end3r.com/4dev21-webmonetization

    Andrzej Mazur@end3rEnclave Games

    Ender Efka @end3r