PewDiePie and Memes Related Trading Cards

Introduction

PewDiePie & Memes is an upcoming Blockchain based trading cards game. We're not quite there yet, but eventually we are going to deploy all sorts of cool meme related trading cards on the Ethereum Blockchain as ERC721 tokens which means you can own, sell or trade them freely with other people in our decentralized marketplace (a work in progress).

Once we go live, each new player is given a mystery box containing 7 basic level 1 cards that are chosen randomly. Because the cards will be ERC721 tokens, the player can withdraw them to their Ethereum wallet and own them permanently (or until they either sell or trade them away).

The idea is to build a game system similar to the "ladder model" known from fighting games like Tekken where the player "climbs the ladder" playing against tougher and tougher opponents. After each successful round the game state is saved to our sidechain, meaning that you can continue where you left off without having to start from level 1.

Play the demo

On the 13th of October 2018 we released a playable demo of PewDiePie & Memes in hopes of spreading awareness of our project as well as give everyone a chance to become familiar with the gameplay itself.

Play the demo!

How the game is played


This turn based game is played on a 3x3 board where cards are placed as the game progresses. Each card has four values shown in the top left corner. Each value corresponds to one of the four sides of the card (left value for left side of the card, top value for top side of the card, etc.) The values range from 1 to 10 with the value 10 represented by the letter A.

The first player is chosen randomly after which they may choose a card to place anywhere on the board. After the first card is placed, the opponent may place a card on any unoccupied space on the board.

The color of the card indicates which player has captured it on the board. All green cards are captured by the player and all yellow cards are captured by the opponent. The game starts with both players having an equal score of 5 (because they both have 5 cards that haven't been played yet).

To win, a majority of the total ten cards played (including the one card that is not placed on the board) must be of the player's card color (green). To do this, the player must capture cards by placing a card adjacent to an opponent's card whereupon the value of the sides where the two cards touch will be compared. If the value of the player's card is higher than the opponent's card, the opponent's card will be captured and turned into the player's color (green). The opponent can capture the player's cards the same way.

A draw occurs if the player and the opponent possess equal numbers of cards in their color on the board.

Additional rules

Placing cards on the board and comparing the value of the touching sides will get boring after a while. But don't worry, there are additional rules which make the game more interesting and allow players to come up with their own strategies for beating the opponent even if the opponent's card values are much higher than the player's card values.

Same

When a card is placed touching two or more other cards (one or both of them have to be the opposite color), and the touching sides of each card is the same (8 touching 8 for example), then the other two cards are captured. Combo rule applies.
Same Rule Explained

Plus

Similar to the Same rule. When one card is placed touching two others and the values that are touching equal the same sum, then both cards are captured. Combo rule applies.
Plus Rule Explained

Combo

This rule can only be triggered with either the Same or Plus rule. It doesn't occur on its own. The easiest way to understand this rule is to think as if the card that was captured by Same or Plus had just been placed on the board and the value of that card is compared to the value of a card adjecent to it. Take a look at the following example:
Combo Rule Explained When I place the Earth Sandwhich card into the square indicated by the arrow, it will capture both the PewDiePie Car as well as Dr. Phil cards because of the Plus rule (1+8, 1+8). Now that these two cards are captured, a Combo rule is triggered because the Galaxy Brain card that is adjecent to the Dr. Phil card (captured through Plus), has a lower value on the side that is touching the Dr. Phil card. (1 touching 8).

Remember to think as if Dr. Phil had just been placed on the board! Also in this particular example the Combo rule would be triggered through PewDiePie Car as well because the Galaxy Brain has a lower value on that side too.

Note: Combo is a very powerful rule because it doesn't stop with just one iteration. It can iterate through the whole board and capture all of the cards given that each time the next card touching the captured card has a lower value.

Current state of development

Edited on January 8th 2019

Now that the playable demo is finally out it's time to proceed with phase 2!

I've been looking more and more into the ERC721 standard, reading every possible guide and tutorial I can find. I know how to create the contract that holds all of the cards and I know how to add new cards into the contract at a later date.

In fact I'm pretty sure I have figured out the entire official ERC721 standard (yay for me!) and you can check out one of my custom implementations right here: Meme Awards 2018. It's basically a free airdrop DApp which sends you a random meme from the top 10 memes of 2018. If you pay for the transaction fees (Gas) yourself of course :P

Anyway, about the trading cards game. I've made some progress in the sense that I have most of the smart contract ready now. Obviously the next difficult step is to develop a good front-end for it. Not only that, but a lot of the game mechanics will still be off-chain. For example the functions that compare card values on the board are all off-chain and could be potentially exploited, am I right? I don't know for sure yet. I really hope not because that would mean I'd have to rewrite the entire game in Solidity. Not to mention that it would cost way more in Gas for everyone involved. For now I think it's best if we only queried the card values from the blockchain.

You may remember that I wanted to develop a fair game and not a game where you pay money and get ahead of others. I also wanted to make the minting of new cards fair so here's what I have come up with so far:

First of all there will be 0 minted cards initially. The only way the contract mints a new card is when a player opens a mystery box or wins a game round. There will be no other way to mint new cards into existence.

A first time player is offered a mystery box which contains 5 randomly chosen cards from level 1 cards (currently around 10). I know, I know. Randomness on the blockchain doesn't exist. But I think for our purposes a basic implementation will do just fine. A much bigger problem is the fact that generating random numbers 5 times and then writing the cards data for the new owner on the blockchain will cost a lot of Gas. I'm talking more than $1 with current ETH prices. So far I have not figured out a way around that. I believe the only viable option is to use the loom plasmachain, but I have not been able to run it successfully yet. Even after following the tutorials. Oof... (Would appreciate some help with this!)

A player may receive more than one of the same card. Now they're still completely unique from an ERC721 standpoint, but they can be represented by the same meme. Besides having multiple cards means that you want to trade one for some other card which is what will really make this game awesome. Players will be able to trade cards with each other and buy/sell cards using BrofistCoin.

There is also what I like to call the "ladder model" which is basically a counter from 1 to 10. What this does is, the game increments this counter for the player every time they win. A player who has only opened the mystery box, but has not yet played any rounds will start off at level 1 or at the very bottom of the ladder. On this level the opponent will only use level 1 cards and is not very smart. In other words it does stupid moves that make little sense.

As the the player wins rounds and climbs the ladder, the opponent starts to use stronger cards. On level 2 the opponent uses both level 1 and level 2 cards, on level 3 the opponent uses cards from levels 1-3 etc. Until at level 10 where the opponent uses all the cards in the game and also makes moves that are highly offensive and calculated. This will make the stronger opponents harder to beat, forcing the player to come up with a good strategy by taking advantage of the Same, Plus and Combo rules instead of simply placing strong cards all over the table.

What about rarity levels?

I thought long and hard about this and what I ended up doing is, when the player wins a round, the contract will choose a random card for them as a reward from the current hand the opponent had at the time it lost to the player. That hand can only have 5 cards so the other options are automatically ignored. Also, since the level 1 opponent uses only level 1 cards, then, when the player wins, they can only get a level 1 card. But now when they are playing on level 2, they have the chance to encounter a level 2 card in the opponent's hand. This goes all the way up to the final levels where the chance for any card to appear in the opponent's hand is reduced by the amount of total cards in the game.

I really hope all this makes sense so far!

Basically what will happen over time is that there will be a lot of low level cards and fewer high level cards in existence. But then we will be faced with another problem. Who would want to trade all of those low level cards? Thankfully Luis from our team had an answer! We will allow 3 of the same type cards to be burned in exchange for 1 random card from the level above the burned cards. For example if I manage to collect 3 of the same card that are level 5, I can choose to destroy those cards forever and get a random level 6 card in exchange. This way the supply of lower level cards will always be controlled to a certain degree and so they won't become utterly worthless over time.

Doesn't that make higher level cards not so rare though? Well, yeah. But... any time any card is minted at all, the function generates a random number between 1 and 1000. It then generates another number in the same range and compares them. If the unimaginable happens and the two generated numbers match, the card being minted will get a special mark on them. In other words it will become a gilded card. Any card can become one, but the chance for that to happen is very low. Naturally these gilded cards will look shinier and perhaps even have boosted stats!

Note: there is a better way to do this but I haven't figured it out. It's called weighted numbers and I'm not a mathematician so if you have a good formula I can use please let me know.

And finally the way I hope to force every player to "beat the game" and win a level 10 opponent is that once you win, say, a level 1 opponent, you are stuck with playing against a level 2 until you win and climb further. This is not ideal if you intended to collect all of the available level 1 cards first and then continue playing against the next level. The only way to be able to "jump into" your chosen level is to first win the game! You will need to beat a level 10 opponent before the teleportation function becomes available to you :)

Credits, etc

PewDiePie & Memes is based on the open source project of itdelatrisu's HTML5 Triple Triad available here. The original Triple Triad is an iconic minigame from the single player role playing game Final Fantasy VIII released in 1999 by Square Enix.

Powered by web3.builders