ChainSlayers: DOOM® on the blockchain — made with no-code tools

Timothy Carambat
Mintplex
Published in
5 min readMar 15, 2023
UI of chainslayers tech demo with connected on-chain character.

First, Mintplex Labs, Mintplex, MintFoundry, Chainslayers, or literally anything about this project is directly affiliated with Id Software nor endorsed by Id Software. This project was built on the shareware version of DOOM® released publically for non-commercial use by Id Software.

Play the game yourself at chainslayers.mintplex.xyz and see you on the leaderboard! 😈

The problem with blockchain or NFT-based games right now.

There is a litany of difficulties that come with building a game even in the traditional sense. Games are extremely hard to build, costly, and often wind up failing outright. Look no further than all the failed RPG Kickstarter projects.

NFT games are no exception, even when they tend to be outright ponzis. In fact, blockchain games tend to almost always be far worse than any game you may have played for…ya know, fun?

There are a few reasons for this:
- Greed.
- Using the blockchain for every aspect of the game because ???
- Having to approve transactions constantly to do anything.
- It forgot to be a game and instead is a tech demo of a blockchain.

We wanted to build a tech demo that was fun to play. Crazy, I know.

Our Objective

Take a game that is actually fun and open source that we can hack on and augment an already fun game with an on-chain element that is non-blocking and rewarding.

This game should be playable in a browser and have a free on-chain element that is optional and people can customize. These changes should update on-chain and all marketplaces automatically.

Our Target: DOOM®

Why DOOM? Doom was a legendary game and still continues to be and is a mainstay in the culture of gaming. Lucky for us, the entire source code for the Shareware version of DOOM was released by John Carmack for hacking.

We are standing on the shoulders of giants here. Notably, Chocolate DOOM, who gives you all the C++ code you need to mod the game, but also CloudFlare (yeah the CDN provider) for porting DOOM to WebAssembly so you can play multiplayer DOOM in your browser 🤯.

Without getting into the technical details — we modified the game to emit events into the browser that we can hook into to receive events from the WebAssembly code.

If you want a breakdown of how we did this — comment and I can write it up!

The Plan? Hook up player progress to a free on-chain character.

First, we need a smart contract for which the NFTs will be minted for free. We will stay on testnet for this so we never really deal with real ETH.

For this, the option was easy — Mintplex.xyz gives you a fee-free smart contract you can deploy for a few bucks on Ethereum. You can also get a free minting website that you can attach a domain to.

Chainslayer basic mint site.

Next, we need to do the hard part. How do you make an NFT that updates all of its traits and even images as the player makes progress in the game?

That is all solved with a single service — MintFoundry.xyz. MintFoundry plugs and plays with any smart contract and allows you to update NFTs dynamically with a single REST API — no gas needed.

This seriously unlocks an entire world of gaming where you can reward and unlock the true potential of on-chain gaming. Ownership is on-chain but the reward is done off-chain.

As players play, their own efforts make their NFT rarer over time.

Editing a Slayer before playing

It was important from the beginning that all players who mint a ChainSlayer are immediately able to customize it to their liking.

Selecting the slayer before playing
Editing the on-chain data for my slayer.

Once these updates occur I can go to OpenSea and refresh the token and it appears!

MintFoundry handles all the chains and validation for me and updates OpenSea!

So Time to play?

Not quite, I had to then build the game part, but using the MintFoundry API I simply built a server that takes inputs and modifies the token's stats based on what I get. It's a simple REST API call to update 1 or 1,000 tokens.

For example, as I get more kills, I report that to the backend and then update the token — since this costs no gas this is no different than updating a database, but the result is on-chain!

After that was done though — it was time to slay 😈

If you can beat this game on nightmare mode without cheating — there might be a prize but 🤫

go aheadtry to cheat and see what happens.

also, the last level has a very special crypto boss. :)

Want to unlock the power of your NFT collection or build an on-chain game?

We want to help you! Keep in mind, this demo is free and on testnet, but works exactly the same on Ethereum, Polygon, Solana, and any chain.

Want to chat about your use case and get started? We are looking to partner with new on-chain games that need this problem solved to really level up their playing experience and make on-chain games fun and rewarding.

team@mintplex.xyz

--

--