end3r

HTML5 Game Developer, Enclave Games studio founder, js13kGames compo creator, Gamedev.js Weekly newsletter publisher, Mozilla Tech Speaker.

Demo of the Body Guard game was prototyped more than three years ago during Global Game Jam 2018, and right after that tossed into a pile of unfinished projects. Since it is a game where you fight against viruses, we’ve decided to bring it back to life, finish and release it as part of our Web Monetization API experiments, and support Artist Rescue Trust (and Phaser) thanks to the Grant for the Web program as well.

We’ve built the demo in a couple of hours following the transmission theme given by Global Game Jam 2018 organizers, as we liked the concept of defending your body against diseases transmitted by viruses. Now, given the global pandemic, we’ve decided to make Coronavirus our main antagonist – it even looks the same!

Since we’ve been busy with the js13kGames competition and Gamedev.js initiatives (meetups, workshops, jams, etc) for a couple of years now, releasing games wasn’t a top priority anymore. I was doing all those things AND traveling around the world giving talks about WebXR, PWAs, or Web Monetization, but I was constantly missing the actual coding. It’s been four years since the last released game, Flood Escape that came out in May 2017, and I’m happy to say we can now reset the clock!

I had to update the code from Phaser version 2 to 3, similar to how NSHex Roulette was done, where I used Enclave Phaser Template (having the latest Phaser 3 version), moved the gameplay and updated it along the way fixing all the differences between those versions – it went quite smooth and fast.

Grant for the Web and Artist Rescue Trust

As part of our Grant for the Web grant, beside other things, we were going to release three game-related, Web Monetized projects. First was NSHex Roulette, where we monetize the digital expansion of the physical board game. Second is Body Guard, where, since it’s a game where you defend yourself from viruses, we decided to give back and support the fight against Covid-19.

One of the grant recipients is also Artist Rescue Trust, which provide support to musicians and artists affected by the pandemic. It was a perfect case to implement the probabilistic revenue sharing, where Web Monetization API can distribute funds based on a predefined weight.

Web Monetization through probabilistic revenue sharing

It was suppose to be an even split between Artist Rescue Trust and us, Enclave Games, but I got inspired by Björn’s thread on Twitter and decided to toss in Phaser to the mix, since we’re using a free framework to build the game in the first place, so it definitely deserves support as well. The final split is: 40% for Artist Rescue Trust, 30% for Phaser, and 30% for Enclave Games.

This means a player monetized through Coil visiting the website with the Body Guard game will have a 40% chance of having an Artist Rescue Trust’s payment pointer, 30% of Phaser, and 30% Enclave Games. Whenever the website is accessed by a paying user, that session’s amount will go to a preselected recipient. We went even further and allowed anyone to actually change the recipient of the funds collected throughout the gaming session.

Implementation

The probabilistic revenue sharing implementation boils down to this piece of code, taken directly from the documentation and modified to our needs:

const pointers = {

'$ilp.uphold.com/kN2KHpqhNFiM': 40, // Artist Rescue Trust

'$ilp.uphold.com/zdXzL8aWJ4ii': 30, // Phaser

'$ilp.uphold.com/k4eJGQUDF9nw': 30 // Enclave Games

}

function pickPointer () {

const sum = Object.values(pointers).reduce((sum, weight) => sum + weight, 0)

let choice = Math.random() * sum

for (const pointer in pointers) {

const weight = pointers[pointer]

if ((choice -= weight) <= 0) {

return pointer

}

}

}

The pickPointer function choses a random pointer based on the weight of it compared to the sum of all the weights, and with our numbers it nicely adds to 100%. Then a selected pointer is added to the (already existing) meta tag:

document.querySelector('meta[name="monetization"]').content = pickPointer();

Body Guard does a little bit more than that though – beside juggling the payment pointer, it also uses the counter example to show the current amount of money sent during this particular session, and the overall amount sent by the player (saved in local storage).

The cool thing about saving the overall amount is that it’s not a single number, but three – for every recipient. This allows us to show the numbers for Artist Rescue Trust, Phaser, and Enclave Games separately. Keep in mind those stats are for this given player using a specific system and the browser, saved locally. If you launch the game on a different device, the stats will be collected independently.

Then, on top of that, it also allows the player to chose between the recipients manually. If the player end up with the Enclave Games payment pointer, but decides to support Phaser instead, they can do so during their playing session.

clickMonetizationPhaser() {

if(this.currentlyActiveMonetization != this.monetizationList[1]) {

this.currentlyActiveMonetization = this.monetizationList[1];

this.clickMonetizationNewPointer('Phaser');

this.countPhaser++;

} this.monetizationSelectedValue.setText(this.currentlyActiveMonetization);

this.monetizationToggleART.setTexture('button-toggle-off');

this.monetizationTogglePhaser.setTexture('button-toggle-on');

this.monetizationToggleEnclave.setTexture('button-toggle-off');

}

Clicking on the toggle stops the current payment stream, replaces the payment pointer in the head of the document, and restarts the monetization.

clickMonetNewPointer(pointer) {

EPT.Sfx.play('click');

EPT.WebMonetization.pickPointer(pointer);

this.amountART = EPT.Storage.get('BodyGuard-totalAmount-ART');

this.amountPhaser = EPT.Storage.get('BodyGuard-totalAmount-Phaser');

this.amountEnclave = EPT.Storage.get('BodyGuard-totalAmount-Enclave');

this.totalAmount = this.amountART+this.amountPhaser+this.amountEnclave;

}

It also handles the counters to keep track of how many given options were selected, either by randomness or by the player.

savePointerStat: function(pointer) {

var countART = EPT.Storage.get('BodyGuard-chosenTimes-ART');

var countPhaser = EPT.Storage.get('BodyGuard-chosenTimes-Phaser');

var countEnclave = EPT.Storage.get('BodyGuard-chosenTimes-Enclave');

switch(pointer) {

case 'Artist Rescue Trust': {

countART = parseInt(countART)+1;

EPT.Storage.set('BodyGuard-chosenTimes-ART', countART);

break;

}

case 'Phaser': {

countPhaser = parseInt(countPhaser)+1;

EPT.Storage.set('BodyGuard-chosenTimes-Phaser', countPhaser);

break;

}

case 'Enclave Games': {

countEnclave = parseInt(countEnclave)+1;

EPT.Storage.set('BodyGuard-chosenTimes-Enclave', countEnclave);

break;

}

default: {}

}

}

With big enough number of random selections and not too many manual interventions it should end up 40% / 30% / 30% respectively.

Summary

We’re quite happy with how the game turned out, given we liked the core mechanic of the demo and needed a little push to finish it, which Grant for the Web (and the global pandemic) provided.

The Web Monetization “bonus” is rather meta – it’s not giving any benefits to the players within the gameplay, but this is a conscious decision. It’s an experiment to see if people value being offered the control over who their funds support. Would YOU make the decision yourself, or leave this to the algorithm?

Read more...

We’re big fans of the physical board game Neuroshima Hex, and NSHex Roulette is a digital expansion to that game. We are offering a unique experience to all the fellow players, and it’s free thanks to implementing the Web Monetization API as part of the Grant for the Web program.

Paper prototype

We’re running the biggest Polish fan site about the post-apocalyptic board game, NeuroshimaHex.pl, since 2010, but our passion for the game started a few years earlier. Fast forward to 2014, when Portal Games (Neuroshima Hex creator and publisher) announces an open call for proposals to send in expansion ideas. We did exactly that with the Russian Roulette, which back then was a paper prototype, but got absolutely no response, even after asking a few times every couple of months and sending reminders over the next 2 years (!). I was really sad about it, and thus the project was abandoned for the next couple of years.

Digital demo

I’m giving talks as a public speaker at front-end conferences since 2012, usually presenting about cutting-edge technologies you can use to build games (Firefox OS, Gamepad API, WebVR/A-Frame/WebXR, Web Monetization, etc) – it was 2018 when I got interested in Progressive Web Apps and was looking for a good demo example for the talk. I decided to dig up the paper Russian Roulette draft and build a digital proof-of-concept – and so NSHex Roulette demo was born.

PWA example

The first talk titled “Progressive Web Apps and board games” was given at the Tech Speakers meetup in Paris, and a few next ones followed afterwards. I got a positive response about both the presentation and the app itself, but I somehow couldn’t release the completed version – the project felt too important and needed to be perfect, so I couldn’t force myself into actually finishing it.

NSHex Counter

Then in 2019 I decided to build and release the NSHex Counter, which was more of a “companion app” that was designed to help keep track of the tiles used by the player and the opponent, quite popular at the official Neuroshima Hex tournaments in Poland. Since I couldn’t focus on finishing the Roulette, I figured it will be easier to build something similar first, and then use its source code as the base to release the actual expansion, and that worked! It was built with Phaser and on top of a modified Enclave Phaser Template.

The background story of Roulette

Since Neuroshima Hex is a game set in the post-apocalyptic future, the NSHex Roulette expansion introduces the “Russian roulette” mechanism using crates full of military equipment which players can use during their turn, but also traps that can harm them.

“In a post-apocalyptic wasteland, you never know what you can find in an old abandoned bunker burried deep in the ground.”

There are five bonuses to pick (Airborne, Detonation, Bombing Raid, Reanimation, and Berserk) which offers unique benefits to those using them, but the sixth one, Headshot, ends the player’s turn violently. You can use every bonus only once, but the Headshot returns to the pool when used – that’s why the longer you play, the bigger the chance of losing.

Web Monetization

The app was created with the support from the Grant for the Web program, where we experimented with creative ideas that could be monetized with the new Web Monetization API – I think the digital expansion for the physical board game fits nicely.

The implementation of the API is rather straightforward: first, the payment pointer is added in a meta tag to the header of the index.html file:

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

The rest is done in JavaScript – an if statement detects if the visitor have an active Coil membership:

if(document.monetization && document.monetization.state === 'started') {

// monetized content

}

else {

// non-monetized content

}

Since it’s within the Settings of the app, we can safely assume the monetization already loaded in the browser – if it was something to be showed on the main screen we’d probably use an event instead. If the user is monetized, they will see the screen on the left, and if not, the one on the right:

It’s a simple implementation, there’s no backend validation – this is more for fun than profit. The stats are collected anyway, so you could play the game as a non-monetized user, register through Coil, and see your statistics from the very beginning.

Next steps

This is a weird kind of project that “started” 7 years ago, had a few stops along the way, but was finally released. At some point I decided to not wait for Portal and do it myself, and then see what happens.

Since the original concept was suppose to be a physical expansion, some bonuses were using tokens to mark units getting bonuses, but they were scrapped for the sake of not needing any extra parts, so the mobile app is the only thing you need to play. This, however, leaves the door open to create a second expansion, NSHex Standoff (from, you know, “the Mexican standoff”, since “Duel” was a name used by one of the original expansions), which could in turn be paper again given as prizes at Neuroshima Hex tournaments and Polish championships.

Read more...

Another bi-monthly online meetup of the W3C Games Community Group happened a few days ago, on April 15th, and this time two main presentation topics revolved around Unity and WebCodecs.

Anthony Bowker from Unity was talking about their efforts towards HTML5 export, and Unity Tiny.

That is some important work, since Unity have a huge user base, which can create top quality content for the Web – it have to work smooth, including mobile devices.

The second talk was about WebCodecs, and had three speakers: Bernard Aboba from Microsoft, Chris Cunningham from Google, and Paul Adenot from Mozilla. Chris was leading most of the talk, discussing the technical aspects of WebCodecs, which can greatly increase the performance of audio decoding in Web game engines and games themselves.

After the talks there was time for open discussion, where I quickly presented the Gamedev.js Survey 2021 results, and talked about the Gamedev.js Jam 2021 that is currently happening. I raised the decentralization and games topic at the end of my talk, and we might actually have some presentations related to that at the next meetup already.

Tom Greenaway also proposed to have a second bi-monthly gathering where we could have hands-on workshops on attempting to solve specific high-level issues, like lack of virality in Web games, their monetization, copyright issues, etc. There was a positive response to this idea, so we might have the first one next month already.

Read more...

After announcing the Web Monetization category in the upcoming Gamedev.js Jam 2021, now it’s time to reveal the second, Decentralized one, organized in partnership with Protocol Labs and NEAR Protocol!

The Decentralized category will offer various prizes for doing challenges – building games using the technologies provided by either of our partners: NEAR or Protocol Labs (or both). Entries will be judged by a panel of experts – they will be announced in the next few days.

NEAR Protocol

Top 10 entries using the NEAR platform will receive NEAR coins:

- 1st place: 225 NEAR (~$1500)

- 2nd place: 175 NEAR

- 3rd place: 125 NEAR

- 4th place: 75 NEAR

- 5th place: 25 NEAR

- 6th-10th places: 15 NEAR (~$100)

That’s a total of 700 NEAR currently worth roughly $5000 to be given away as prizes. You can learn more about the development on NEAR by checking out the Getting Started guide, looking at the source code of the Examples, or doing the free NEAR Academy course.

Protocol Labs

Top 10 entries using IPFS or any other Protocol Labs technology will receive Filecoins:

- 1st place: 8 FIL (~$1500)

- 2nd place: 6 FIL

- 3rd place: 4 FIL

- 4th place: 2 FIL

- 5th place: 1 FIL

- 6th-10th places: 0,6 FIL (~$100)

That’s a total of 24 FIL currently worth roughly $5000 to be given away as prizes. Make sure to check the Protocol Labs’ Work page for their projects, the IPFS docs and Filecoin docs specifically to see what you can use to build your game.

Paras challenge

On top of all that, the Paras marketplace for Digital Art Cards is putting a challenge as well: build a card game that uses their cards, and win $500 cash. Winning entry will be selected by the Paras team.

Hardware prizes

To make things more physical, we will be also offering hardware wallets to the best entries participating in the Decentralized category – it would be cool to store the coins you just won on a secure device, right?

Top 10 entries using any of the decentralized technologies: IPFS, Filecoin, NEAR, on anything else entirely, will win one Ledger Nano S each, so a total of 10 devices.

Mix and match

You are free to participate in any and all the challenges. Building a card game using IPFS for decentralized storage and NEAR for smart contracts? Go for it! Tossing in Web Monetization as well? If it’s possible, build it!

Value of coins

The sum of both challenges from Near and Protocol Labs is currenly worth around $10k, but this is their value today. The prizes are given as they are, in their respective coins. The price of either NEAR or FIL may change as the crypto is very volatile at the moment – it may double in the coming weeks, or drop in half.

Keep in mind your prize may increase or decrease in value between now when it is being announced, and the time you will receive it – you will get the coins, not their current worth in USD. You can, however, decide to get the prize in USD – coins will have to be converted to USD based on given exchange rate, and you’ll have to pay any conversion fees.

OP Games support

Last, but definitely not least, I’d like to thank Paul Gadi from OP Games for his help organizing and running the Decentralized category in the competition.

Next steps

Remember: Gamedev.js Jam 2021 starts in a week, on Tuesday April 13th, and will run for two weeks up until April 26th, hosted on Itch.io. The voting and judging period will happen in the following week, with winners announced on Monday May 3rd.

Read more...

March was a crazy month on so many levels – we were extremely busy, had health issues, unexpected problems, and couldn’t work as much as we wanted. We didn’t even have the time or energy to celebrate Enclave’s birthday that happened March 10th, but I do hope April will be better.

Games

NSHex Roulette wasn’t finished yet, although I was doing everything I could to release it in March up until the last day of the month. Good thing is the app is almost ready and it’s a matter of a few days to publish.

Writing

A whole bunch of blog posts, and an article Five cool Web Monetized games to play right now.

Design

Ewa did the photoshoot of the js13kGames swag: new t-shirt, pen, and stickers.

She also designed the Gamedev.js Survey and Jam landing pages, and prepared the Survey results using cool-looking graphs (along with the PDF that we’ll release in the next couple of days).

Events

I’ve participated in a panel discussion about the Diverse Game Developers Fund (created by the IGDA Foundation) that happened at the Indie Game Business online conference, and talked about Web Monetization in games.

Kernel Gaming Guild had run since January, through February, and ended up with the last module at the beginning of March – I wrote a short summary about all the sessions we had. And yes, I mainly talked about HTML5 games and Web Monetization.

Other

The js13kGames swag was finally shipped, and the work on the new website is ongoing – I hope to share the first version of it soon.

The Gamedev.js Survey 2021 results were published, and we’ve announced the Gamedev.js Jam 2021, with the Web Monetization category this year, and another to be revealed in the next couple of days.

Plans for the next month

Releasing NSHex Roulette, hopefully Body Guard right after that as well, and the third game we promised to build with Web Monetization as part of the Grant for the Web (we’ve extended our deadline for the next two months, up until the middle of May). Running Gamedev.js Jam 2021 with two new categories.

Read more...

Second cohort of the Kernel program, first one game-themed, ended up already, so it’s time to summarize all the sessions that we had over those past few weeks.

Kernel is an online program run by Gitcoin folks to connect like-minded Web 3 devs so they can collaborate online, and provide them with knowledge and support from the experts to expand on their decentralized/blockchain projects. Gaming Guild was focusing on gamedev-related prototypes and demos, and I was helping from the “classic” HTML5 game development point of view.

At the very beginning, in December, I was thinking of leading a Web Monetization themed module (a weekly session), but ultimately ended up helping the host, Paul Gadi, during all the modules in the program (who was accompanied by Vivek Singh, a Gitcoin co-founder). Those were:

Module 0: Patterns and Trust – Paul did a solid introduction to Web 3 games, went throught pattern recognition, humility, and trust between players, developers, and whole environments.

Module 1: Jamming On Value – the second session was right before Global Game Jam 2021, so we talked a bit about that, but also discussed the concept of value (in a virtual world) through metaverses and NFTs with Austin Griffith, who shared his knowledge and experience on the topic.

Module 2: The Business of Games – Paul was discussing the global financial system, and how virtual money can disrupt the current situation for the better. Meaningful change comes from how technologies or startups change the power dynamics of the industry itself.

Module 3: Freedom and Open Source – we talked with Björn Ritzl about free software, open source movement, and NFTs. He was sharing his perspective as a board member of the Defold Foundation. We need evolution, not revolution.

Module 4: Expo Week – instead of a regular weekly one-hour session, we had an Expo Week with participants showing their demos, giving feedback to each other, and discussing future plans for their projects. The AirMeet platform allowed us to have dedicated tables for discussions in small groups.

Module 5: Game Discoverability – in this weekly session we’ve discussed the topic with Tom Greenaway from Google, who is leading the Open Mini Games format as a proposal to define a set of combined minimum requirements that game developers can implement when developing a game. Discoverability is one of the main struggles developers are facing, so it’s important to address that.

Module 6: The Future of the Web – during the last module we talked with Desigan Chinniah from Coil about the concept of earning money using Web Monetization API, and discussed the Grant for the Web program. It was also a wrap on the whole gaming track, so Paul went through a short overview of what was mentioned in the past weeks.

I’m so happy I took Paul’s invitation and participated in all the sessions! I was feeling a bit overwhelmed, since I’m new to Web 3, the whole decentralization concept, blockchain, and NFTs, but apparently there are many similarities, and my HTML5 game development knowledge and experience was useful throughout all the sessions.

Those topics excite me and I’d love to dive into them more – we do plan on announcing a new category (second, after Web Monetization one) dedicated to Decentralized games in the upcoming Gamedev.js Jam 2021, so stay tuned if you’re interested!

Beside the Jam, there are two last things to mention: OP Games, Paul’s company, is looking for Full-stack Web Developers to join their team, and the next Kernel cohort, called Block, starts soon – you can apply before April 15th.

Read more...

We’re happy to announce the Gamedev.js Jam 2021 that will run online between April 13th and 26th 2021 will have a Web Monetization category this year, with cash prizes and Coil memberships for the best entries.

This extra category is optional, and unlike the regular voting based on criteria by other devs participating in the jam, Web Monetization will be judged by dedicated experts – those will be announced in the coming days.

There will also be extra prizes for this specific category, on top of the regular ones:

1st place: $300 cash

2nd place: $250 cash

3rd place: $200 cash

4th place: $150 cash

5th place: $100 cash

Beside cash, there will also be 10 Coil memberships for 6 months each (worth $5 a month) for the ten best entries in the category. This means the total prize pool will be exactly $1300 ($1000 cash and $300 Coil memberships).

Make sure to join the Jam via Itch.io, and remember that the platform supports Web Monetization, so on top of winning prizes, you will be able to earn money from people playing your games.

This is the second edition of the jam, after Gamedev.js Jam 2020, but the first one with the Web Monetization category. There were, however, two editions of the Web Monetization category in js13kGames competition that runs yearly since 2012.

Read more...

After a whole month of gathering responses, and a week of preparing results, we’re happy to publish the report containing answers to 26 questions submitted by 437 developers.

We at Enclave Games were wondering what tools and technologies people use to develop web games, how much do they earn, what monetization strategies are they using, etc. There was almost no up-to-date, solid data on the topic, so we decided to ask the community directly and publish the results afterwards.

When we opened it on February 18th, I was worried we won’t get too many submissions – I decided I’ll share the numbers even if we receive 20 of them, and getting 100 would be an achievement. Turns out we got 437 responses, which is incredible – thank you to all who participated, you’re awesome!

Some of the answers to the questions were predictable, some others ended up being quite a surprise, so make sure to check all of them along with the short comment below every graph. Overall it feels building web games is going in the right direction. We do have our issues and struggles, but the community is positive about the future.

The survey was conducted with the support from the Grant for the Web program, you might’ve noticed Web Monetization as one of the options in the question about various ways of getting a revenue. I’m happy to see it’s getting traction, and more developers are exploring Web Monetization API as a viable alternative of earning money.

Prizes we promised (cash and Coil memberships) will be sent in the next few days, same goes for offering the downloadable report as a pdf document. It’s the first edition of the survey, but I do hope it will be a yearly thing from now on, so we all can track the trends in HTML5 game development!

Read more...

We’re starting the countdown to Gamedev.js Jam 2021 – an online competition for HTML5 game developers, running for thirteen days between April 13th and 26th. It’s the second edition after the Gamedev.js Jam 2020 hosted last year.

The first Jam was organized and announced only a few days before the actual start, yet we managed to get 220 participants submitting 44 entries, and an incredible amount of 683 votes in the judging process. This year’s edition preparations are beginning right now, one month before the start.

We will announce the prizes in the coming days, and there might also be some new, extra categories, or challenges – make sure to join the Jam on Itch.io, follow the competition on Twitter, and visit our Discord server to not miss a thing!

Read more...

A few days ago, on Thursday March 4th, I’ve joined a session about the Diverse Game Developers Fund (started by IGDA Foundation and supported by the Grant for the Web program) at the Indie Game Business online conference.

IGDA Foundation was awarded a grant from the Grant for the Web program to create a Diverse Game Developers Fund that will support underrepresented developers around the world while they create Web Monetized game prototypes.

The fund will offer up to $25k each to build a game prototype that explores earning revenue from Web Monetization. There’s also an academic scholarship that will offer up to $5k each for students to work on the game related projects. The steering committee will evaluate all the proposals, but also offer their help and knowledge throughout the whole program – the deadline for submitting is March 15th.

I was invited to the Indie Game Business session by Nika Nour and Sarah Spiers both from the IGDA Foundation to support them in explaining the technical details of the Web Monetization API while they were talking about the fund itself – the video can be watched here.

I’m happy I joined – we already did a few events together with IGDA Foundation around Web Monetization, and I hope we’ll continue our collaboration. I’d love to see more games implementing Web Monetization since I’m a huge fan of the technology, and this fund is a great opportunity, so if you do meet the requirements, please send your proposal!

Read more...