Pixels Builds an On-Chain Ecosystem for its Open-World Web3 Game
TLDR: Pixels is an immersive, open-world MMO game built on the blockchain — leveraging the power of web3 to enable digital ownership, and creating an engaging world for players to explore, complete quests, & collaborate in. thirdweb is proud to power two major updates within the Pixels game:
- VIP Memberships: Players can purchase subscriptions (in the form of time-based NFTs) in exchange for in-game perks & additional rewards.
- In-Game Tokens: Pixels’ in-game economy is fueled by two in-game tokens, $PIXEL and $BERRY, each with different utilities & both stored on-chain.
Building an immersive MMO game, on the blockchain
Pixels is an open-world, massively multiplayer online (MMO) game — where players can explore, gather resources, advance their skills, complete quests, and collaborate with others.
With 100k+ monthly active wallets and 1.5m+ monthly on-chain transactions, the team is building the best Pixels Universe possible by 1) creating a game that’s fun & engaging, and 2) unlocking digital ownership for players through the blockchain.
The most important aspect to building any game is for it to be fun. In doing this, Pixels is building a sandbox world with immersive gameplay — first launching in 2022 with core mechanics like farming, cooking, & questing, and then gradually layering in social features like trading, achievements, and leaderboards for players to interact with each other.
The Pixels team is also leveraging blockchain-based assets to create a thriving in-game economy, through features like:
- Farming land plots that players can purchase, customize, & rent to others
- Resources that players can buy, sell, & trade amongst themselves
- A digital currency system ($PIXEL & $BERRY) to underpin the ecosystem
Pixels is continuously updating the game & adding new features — with foraging, pets, mini-games, and more coming soon. Read more about the game mechanics, and upcoming features, in the Pixels Litepaper.
Enabling digital ownership for players with web3
Beyond building an immersive game, the Pixels team is leveraging the power of web3 to enable true digital ownership for players. As part of this mission, Pixels has ensured that NFTs are deeply embedded in their ecosystem — integrating web3 communities into its platform and turning 65+ NFT collections into playable, interactive, in-game characters (with more coming).
“Interoperability is one of the biggest unlocks for web3 games.”
– Luke Barwikowski, Founder & CEO
But beyond building a web3 game, the Pixels team is also developing its own web3 infrastructure to create the best user experience possible — and opening it up as a platform for other web3 games to build on the blockchain.
In doing this, Pixels is creating a more accessible web3 ecosystem — providing game developers with the necessary tools for them to deliver more value, and enabling digital ownership for their players in the process.
For Pixels’ own game, the team has crafted a thriving in-game economy that both benefits players, and provides Pixels with additional revenue streams that they can then reinvest back into the game. In moving this mission forward, Pixels launched two major updates to its game:
- VIP Memberships: Players can purchase subscriptions (in the form of time-based NFTs) in exchange for in-game perks & additional rewards.
- In-Game Tokens: Pixels is building a sustainable in-game economy through two primary tokens, $PIXEL and $BERRY, each with different utilities.
Launching Pixels VIP Memberships
Using thirdweb, Pixels combined the best of web2 and web3 to launch Memberships — allowing players to purchase time-based subscription NFTs, and unlocking perks & rewards within the game. Building this required two key features:
- Time-based subscription NFTs that can act as memberships & unlock in-game perks & rewards for members, deployable on multiple blockchains (Ethereum & Polygon)
- Fiat on-ramp for seamless purchase flows — enabling players to easily turn traditional currencies into crypto, and for them to easily buy Pixels Memberships with it
Let’s dive into what’s under the hood, and how Pixels used thirdweb’s web3 development kit to power Pixels’ VIP Memberships.
Using time-based NFTs to create the VIP subscriptions
To launch Pixels Memberships, the team needed a smart contract that would implement time-based properties into their NFTs (such as renewals and expiration dates) — allowing for their membership tokens to act as time-based subscriptions.
The Pixels team used thirdweb Explore — a library for developers to discover smart contracts that are compatible with any EVM blockchain — to deploy a Membership NFT smart contract, built by Unlock Protocol.
Using thirdweb Explore, the Pixels team selected a version of the Membership smart contract they wanted and used thirdweb's easy deployment flow to add customizable properties to the smart contract — such as duration of memberships, price, number of membership NFTs, and the name of their contract.
You can find the Membership smart contract & deploy it to any blockchain, here:
thirdweb also enabled the Pixels team to deploy as many versions of the smart contract as necessary (to the Goerli & Mumbai testnets) before deciding on their preferred contract settings and taking it live on both the Ethereum & Polygon blockchains — seamlessly, using the same deployment flow.
“We were able to build and launch our membership feature with just one developer in 2 weeks.”
– Luke Barwikowski, Founder & CEO
Once Pixels deployed the Membership contract, thirdweb generated a personalized dashboard for the team to manage all of their smart contracts in one place, and to view & modify their contracts. The dashboard also includes a Code tab, which they used to read and write data from the contract using thirdweb’s SDK, and to connect the smart contract to their application:
When the contract had been set up and deployed, Pixels integrated the subscriptions mechanism directly into their game through the thirdweb SDK — using the time-based membership tokens to determine whether a user has an active subscription, and whether they can access special features based on that.
Pixels is able to determine a user's membership status by using thirdweb’s React SDK to:
- Fetch the Membership contract, and the wallet addresses of logged-in users, via the
useContract
anduseAddress
React hooks - Use the Membership smart contract’s
getHasValidKey
function, through theuseContractRead
React hook, to determine whether a logged-in user has an active subscription and whether they have access to members’ perks and rewards. - Display a “Subscribe” button if the user does not have an active subscription — which they can use to purchase an NFT membership, directly from the smart contract, through the
useContractWrite
React hook.
Enabling seamless in-game purchases for players, with fiat-to-crypto on-ramps
In launching Memberships, the Pixels team wanted to ensure that the user experience was easy and accessible to all — for existing web3 users, and for new players without any blockchain experience. This meant that they had to build a checkout flow that allows players to turn traditional currencies, such as USD, into crypto that they can use in-game.
To do this, Pixels used thirdweb’s React SDK, which comes with built-in Coinbase Pay integration — allowing them to implement a native fiat-to-crypto on-ramp into their application with just a few lines of code.
With Coinbase Pay, Pixels players can buy crypto through their Coinbase account while in-game — automatically returning to the game with the purchased crypto in their wallet and making for more seamless gameplay. Learn how to set this up in our guide:
Powering a thriving ecosystem with on-chain tokens
To create true digital ownership for its players, Pixels is carefully building its in-game economy through three main asset classes: land, resources, and tokens.
And while the former two are just as important to the Pixels ecosystem, in-game tokens serve as the underlying engine that power the rest of the economy, creating a pricing mechanism (& value) for land and resources.
Using thirdweb, Pixels built a system of two in-game tokens to fuel its economy, each with its own unique utilities: $BERRY, and $PIXEL.
Creating more immersive gameplay with $BERRY
$BERRY is the primary in-game ‘soft currency’ in Pixels, giving players different ways to navigate and progress in the game. It is vital to core gameplay loops, and needs to be easily accessible & earnable in-game.
Players are able to sell resources to the Pixels’ in-game store for $BERRY, after which the game burns the tokens to limit incoming supply. Players will also be able to use $BERRY to purchase in-game items that unlock new industries, activities, areas, quests, and content — and to rent land for resource collection if they don’t have their own.
Read more about $BERRY in the Pixels docs.
Unlocking even more & decentralizing the platform with $PIXEL
$PIXEL, which hasn’t been released yet, will be a premium in-game currency — used to buy items, upgrades, and cosmetics that aren’t necessary for the progression of the game. $PIXEL is much more limited in supply (i.e. rarer) than $BERRY, and will unlock new abilities for players such as minting new land, speeding up build times, replenishing energy, unlocking crafting recipes, boosting skills, and purchasing special cosmetics like pets.
Unlike $BERRY, the supply of $PIXEL will be much more controlled and predictable — distributed to active players that engage for the benefit of the Pixels Universe. Pixels plans to decentralize its web3 gaming platform as well, underpinning it with $PIXEL as an underlying governance token.
Read more about $PIXEL in the Pixels docs.
The benefits of building an on-chain economy & token system
Like its other asset classes, the Pixels team opted for these tokens to be built & stored on the blockchain — providing various benefits over currencies in traditional games, and building a more sustainable economy in the process:
- Transparency: Token price, supply, and activity is visible to everyone — increasing players’ trust in the developers and enhancing digital ownership by providing more accurate measures of value through the game’s tokenomics.
- True ownership: Because the tokens are built on-chain & stored directly in users’ wallets, players can permissionlessly buy, sell, & trade them on open marketplaces.
- Interoperability: Assets on the blockchain are interoperable by nature — meaning that a token can be valuable both within the game & beyond, further increasing digital ownership for players. Because Pixels is building a platform for other web3 games, $PIXEL and $BERRY can power other ecosystems beyond its own in the future.
- Composability: Blockchain-based assets are composable, allowing in-game currencies to serve other purposes outside of the game. Because Pixels plans to decentralize the game over time, the team may then use its tokens to power an on-chain governance system, like a DAO, if it chooses to.
But building on-chain tokens has its own set of challenges. Let’s dive into how Pixels used thirdweb’s web3 development kit to power its $BERRY and $PIXEL tokens.
Creating a customizable token, with extensions for added functionality
To launch its in-game currencies, the team needed a smart contract that would allow them to customize properties like claim conditions, total supply and platform fees — along with the ability to add advanced functionality, such as a token burning mechanism (for when a player purchases in-game items, for example).
The contract also needed to be compliant with the ERC-20 standard for the tokens to be secure, composable, and interoperable.
Similar to launching Memberships, the Pixels team used thirdweb Explore to deploy an ERC-20 token — using its simple deployment flow for any EVM blockchain, and adding customizable properties to the smart contract.
See & deploy the the ERC-20 smart contract & deploy it to any blockchain, here:
With thirdweb’s easy one-click workflow, the Pixels team was able to deploy & test as many versions of the contract as necessary before launching one that suited their needs — automatically adding it to the team’s dashboard.
“The documentation, templates, and contract deployment removed a ton of complexity around how we needed to build this. Instead, we were able to spend more time focusing on the key decisions surrounding Pixels memberships, rather than on how we would implement it.”
– Weiwei Li, Founding Engineer
Once the contract was set up and deployed, Pixels integrated $BERRY into their game — using the thirdweb SDK to connect the smart contract to their app seamlessly, so that players could use the currencies within Pixels.
thirdweb looks forward to powering the $PIXEL token, and its similar capabilities as an ERC-20 token, when it launches.
Looking into the future: Building a platform for web3 games
Pixels is excited to continue using thirdweb’s tools to build a more immersive web3 game, with a flourishing ecosystem that engages existing users & bring new players in.
"thirdweb made the implementation very easy on our end: We were able to focus on features, specs, and user experience instead of spending a needless amount of time on testing, auditing, and deploying smart contracts."
– Luke Barwikowski, Founder & CEO
And beyond creating their own game, Pixels is continuing development of its platform for other blockchain-based games, and their communities, to come together — empowering developers with best-in-class blockchain tools, creating a gateway for millions into web3, and building a digital economy where players have true ownership.
From pre-built & customizable smart contracts to robust SDKs for every stack, thirdweb provided Pixels with everything they needed to launch memberships & in-game tokens — enabling the team to focus on creating great products, allowing players to interact with them seamlessly, and building an immersive game.
If you’d like to learn more about how thirdweb can accelerate your business and web3 development workflow, reach out to the team directly! And start building with thirdweb's web3 tools, SDKs, and smart contracts — easily, and for free.