Inspiration
We are seeking to offer Theta NFT collectors a game that rewards their appreciation of a generative NFT collection and strategic thinking with higher chances of winning.
Anecdotally, we have observed relatively high NFT community engagement with multiplayer Discord games. However, many of the most popular games offer no skill expression (pure dice rolls) or any particular connection to our Theta NFT communities.
WWZ[^1] is our attempt to offer the Theta NFT community a smart, fun, web3-enabled Discord game with high replayability.
[^1]: WWZ is short for World Wide 'Zilla Entertainment Federation
What it does
WWZ game pits an arbitrary number of players against each other in a simulated battle royale. As the battle progresses, the WWZ Discord bot supports the action with highly dynamic text and pixel art based on a players' NFT.
How we built it
In three 2-week sprints, each concluding with a working software deliverable used to collect feedback from the community and better direct subsequent sprints.
Each deliverable, including our final submission consisted of one or more Discord bots, a web application exposed through a REST API, a Postgres DB, varying AWS storage services, and an integration with ZillaPass[^2] for current NFT ownership data.
[^2]: 2022 Theta Hackathon submission by a subset of the WWZ team. Service that provide current NFT ownership data for self-custodial Theta NFTs.
Sprint 1: Remix Engine Proof of Concept
At the core of the game design was the ability to reimagine a PixZilla NFT as a combatant ready for battle. We started therefore, by demonstrating just this capability. Community members were invited to submit a PixZilla of their choice to a Discord bot that regenerated the image along with new, sometimes surprising results.
Sprint 2: Discord UI
In Sprint 2, we refined the Proof of Concept from Sprint 1 to include what Discord calls UI Component in an effort to hone what would become the game interface (buttons, Discord commands, etc.).
Sprint 3: Battle Engine
In the final sprint, we added elements responsible for managing the state of a game, training PixZillas as Combatants through the aforementioned Remix Engine, and deciding the outcomes of interactions between Combatants and their respective weapons and gear.
Challenges we ran into
Token Verification
The design requires the ability to restrict a Player's access to only PixZillas they own for use in the game. We accomplished this with ZillaPass.
Image Manipulation Performance
Multiple features of the game require rebuilding or reformatting an NFT image. We found the following to be very helpful:
- Piet lossy png compression algorithm
- Exploiting more efficient image resizing techniques made possible by the nature of pixel art (can shrink, operate or transmit, and later expand back to original size when helpful)
Build Ratings
When a player trains a Combatant, the game shows the player a series of star ratings to help them judge how the Combatant stacks up against other players. This is intended to help the Player decide if they should keep the Combatant or retrain it.
Our first two attempts to convey how strong a particular build was resulted in unpredictable star ratings that often didn't mirror expectation. Ultimately, our solution was to simulate several thousand (~10K) outcomes and use the standard deviations of the resulting distributions to better understand in which quartile each Combatant ranks for each combat statistic.
Inefficient Loot Tables
There are several decisions the game makes each turn using tables of many outcomes with varying probabilities (to a gamer, "Loot Table"). These became slow as we ramped up the number of players we simulated in testing and as our number of possible combat-related assets increased. We implemented a version of Walker's Alias Method for performance that better scales with loot table size.
Accomplishments that we're proud of
Your NFT, In-Game
We set out to make a game where a Player competed as their NFT, including the qualities unique to it.
No collection too small
The game is playable (and winnable) with a single PixZilla NFT. A larger collection likely offers more Combatant build strategies to explore.
Dynamic Turn Order
We wanted to avoid a fixed or predictable Combatant turn order within the simulation. Often this can include a significant advantage to earlier players that must be balanced and compensated for.
Instead, our Combatant variables ZEAL and HEAT ensure the next Players to attack and defend depend on game state (attacking more leads to getting attacked more, etc.).
Celebrates the nuances of the collection
We wanted a game where advantage is gained by studying the underlying NFT collection in addition to the game itself. Understanding which PixZilla attributes are rarest and their connections to game mechanics leads to increased win probability.
Content scaling
There's theoretically no limit to the amount of new Combat-ready assets we can make available to the PixZillas in Training.
Capacity
The turn-based, hands-off game design means a significant portion of the PixZilla community can play in the same game at any one time. We have tested hundreds with bot users - there is a soft limit currently at 1000 players.
What we learned
Thanks to the ETH RPC Adaptor for the Theta Mainnet and ZillaPass, we were able to build a highly dynamic web application based entirely on Theta NFTs and wallets without a writing a line of Solidity or accumulating any Theta-specific blockchain knowledge.
We used a leading Ethereum client for our programming language of choice (in this case Ruby), provided it the URL for Theta's ETH RPC Adaptor, and everything just "worked."
What's next for WWZ
The following are areas of interest. We may focus on one or more depending on community feedback and ongoing gameplay.
- Team-Based Combat - facilitates deeper strategy and Combatant interactions
- Organized Competitions - structure to be determined, but performance is tracked and ranked across multiple games
- Mintable Combatants - facilitates a game economy and alternate roles for community members to play in the game (provider of Combatants to others). In a relatively optimistic scenario, could be reason to consider a Theta Subchain.
Built With
- discord
- midjourney
- postgresql
- ruby
- ruby-on-rails



Log in or sign up for Devpost to join the conversation.