We are hosting a Web Monetization game jam

You should be able to add the monetization meta tag under Customize -> Themes -> Head

Done!

1 Like

The Web Monetization extension received an update today to also include event details in the listener callback:

webmonetization.set_listener(function(self, event, details)
    pprint(details)
end)

Details table:

{
  paymentPointer = "$ilp.uphold.com/QkG86UgXzKq8",
  assetScale = 9,
  amount = "26009",
  requestId = "a1f728aa-21e0-4376-ae99-0ccb22642956",
  assetCode = "XRP"
}
2 Likes

And this week we announced two more judges and we have a few more lined up!):

  • Joep Van Duinen - Poki
  • Linda Kiby Zetterman - co-founder and CEO of Warpzone Studios

Learn more about the jam and judges here:

5 Likes

Some information on the details, I’m a newbie on these so please correct if anything wrong.

paymentPointer is the address being paid to, when a transaction happens uphold generates a unique address for the payer (most likely Coil) to send to in order to adds some extra privacy to payments.

When you are validating transaction you should have some knowledge of the paymentPointer that should be used and discard invalid paymentPointers as that is probably something bad actors would spoof, which could mean you are just validating them sending transactions to themselves.

assetScale is the number of places past to the zero needed to get an amount of 1 of the assetCode. This is important for crypto currency as very small amounts can equal large amounts of currencies like USD.

amount is the amount of the assetCode sent relative to the scale.

requestId is the session id for the payment.

assetCode is the three letter currency being paid. It will probably be the crypocurrency XRP but it might be other currencies depending on payer in the future. Even if it is XRP if you use a service like Uphold I think it immediately converts any value sent over the Interledger network to USD (or maybe to whatever your primary currency is) (and on Uphold itself it’s easy to convert USD to XRP if you wanted to for example). https://interledger.org/overview.html

receipt is used to validate the payment. I’m not sure how to use this yet. https://webmonetization.org/docs/explainer/#flow I don’t see for example how to validate with Uphold. https://interledger.org/rfcs/0039-stream-receipts/

The docs say this but I’m not sure how to deal with it. If you care about the total value of something sent to you it should be something you figure out how to deal with.

There may be multiple STREAM connections for a single requestId . Therefore, a receipt amount may not represent the total amount received for a given requestId .

https://webmonetization.org/specification.html

3 Likes

I’ve asked around and got some information about recept validation:

“The receipt is an optional field in the monetizationprogress event. Receipts will only be present if a receipt verifier’s payment pointer is used. The web monetization sequence diagram shows how a receipt verifier fits into the flow.”

2 Likes

I’m not sure if I understand the process yet but it seems like you would use a receipt verifier service to pass the transaction through instead of using say the Uphold pointer directly and that’s how you would validate the transaction? Or the receipt validator is just a secondary service to use in the process?

Even reading everything on the recommended link and other links it’s not perfectly clear to me yet. Unless there is an easy solution worrying about payments not being faked will only be for those trying to use this for serious projects in the future.

This link will give JSON with the price of XRP in USD. You can do a http.request() to get it. The value you want is current_price

https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=ripple&order=market_cap_desc&per_page=100&page=1&sparkline=false

This can be useful if you want to track the amount a user has supported your game and show them in game so they have some transparency. Don’t expect the numbers to be exact unless you track external to the game to add up all payments on the game’s page.

You might want unlock certain things / give gifts at certain milestones to encourage people to keep playing your game. Though from my experience it takes a long time being on a site to even reach $1 of payments so if you do something like that make sure you have the right expectations of play time vs rewards.

2 Likes

Where can we host a HTML5 version if not on Itch because of the iframe issue?

itch needs to update its iframe code to allow monetization.

It already has

allow="autoplay; fullscreen *; geolocation; microphone; camera; midi"

It needs to add monetization to that list for Web Monetization to work.

https://webmonetization.org/docs/api/#iframes

Someone can try to ping https://twitter.com/moonscript and see if he will update the iframe code to include this.

1 Like

We are trying to reach people at itch.io but have so far been ignored. Please submit your requests as well to the itch.io forum, discord and on Twitter!

3 Likes

I did so, but also ignored :confused: Is this something that could be somehow inconvenient for itch owners? How did you check the “allow” attribute of itch, @Pkeod? Maybe it is possible on some other hosting pages like Gamejolt or Indiexpo?

1 Like

If you inspect the webpage from Chrome/Firefox devtools and check the iframe which loads the HTML5 game you see the allow option on the tag.

On the contrary. It could potentially open up for a new revenue stream for itch.io. They could set their own payment pointer if the game doesn’t have one for instance. There’s also an opportunity for itch.io to apply for a grant from Grant for the Web to get funding for this.

Getting platform providers and game portals on board is very important for adoption of web monetization as a standard.

There are discussions with Gamejolt regarding this. Not sure about Indiexpo.

3 Likes

I e-mailed Leaf and posted in the #meta Discord for itch but no reply so far.

3 Likes

Almost to 100 people joined with 14 days until this gamejam begins! Post the link for it at any gamedev community you visit since any tool that can ship HTML5 builds/support Web Monetization will work for this and it works as indirect marketing to promote Defold.

3 Likes

Aye, please help us spread word of the gamejam to all online communities you frequent!

4 Likes

I’m attacking recently social media everyday :rofl: I will make some cool post with this jam :+1:

2 Likes

I got response from Leaf, that it should be now allowed! Can you check it please? @britzl @Pkeod

3 Likes

In the game I just played, I saw: "allow=“autoplay; fullscreen *; geolocation; microphone; camera; midi; monetization”

1 Like

If so it would be great to announce it in Itch community and Twitter :wink:

1 Like