district0x / district-proposals

Proposals for new districts to be built by the district0x Team.
https://vote.district0x.io/
212 stars 36 forks source link

Meme Trading Card Game #281

Open BroFistIO opened 5 years ago

BroFistIO commented 5 years ago

Name: Meme Trading Card Game

The Meme Trading Cards game is a turn based, peer-to-peer board game played on a 3x3 grid using provably rare ERC721 crypto collectible memes (cards) that are issued in the Meme Factory’s Token Curated Registry (TCR). While not playing, the owners of the memes can train their cards to be stronger in a process called “working” which borrows elements from MMORPG games, namely the logic behind allocating experience points for time spent working on the card.

alt text

Purpose:

The goal of this project is to help build a solid ecosystem around provably rare memes that originate from the TCR. This is beneficial to the Meme Factory platform as the game provides an incentive for meme authors to create new content. It is also beneficial to the meme authors who can train their owned meme cards to be stronger and play against each other in a peer-to-peer matching system so their memes are put to actual real use in a way which will increase the meme’s value instead of laying dormant in their crypto wallet collecting virtual dust.

Description:

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.

A more thorough description of the game rules as well as a playable demo can be found here.

Registering a card:

The owners of memes issued in the Meme Factory TCR are able to register their card in the Meme Trading Cards game platform giving each new card the initial value of 1 on all of the corresponding card sides (top, right, bottom, left). The registration procedure is straightforward as the DApp will only have to call the ownerOf function on the Meme Factory smart contract and check whether the msg.sender matches the response. The game progress, card statistics and highscores are all kept in the Meme Trading Cards smart contract.

After successfully registering and proving ownership of a card, the player can then choose which side of the card they wish to work on. Once the choice is made, the player will be able to start working on the chosen side. The smart contract will take note of the current timestamp which will be used later. The entire process of working is AFK (Away From Keyboard) so it doesn’t require much effort, but it will take quite some time to train the card side’s value all the way up to A (level 10).

The process of working:

There is no limit to the amount of cards the player can concurrently work with, but each card can only gain experience to one chosen side at a time.

The process of working consists of mainly two actions: starting and stopping the work session.

A work session is considered successful when the player calls the start working function followed by the stop working function. While there is no particular limit to how long the card can be working, a successful work day is registered only when the card has been working consecutively for at least the duration of the work day dictated by a variable that holds a unix timestamp (ie. the default is 28800 or 8 hours).

Experience for the card is calculated by first dividing the duration of the work session by a global xp modifier that the community will agree upon and then multiplying the result by the card’s individual xp multiplier. The individual xp multiplier for each card is increased by an increment of 1 only after a successful work day.

The duration of time spent working is calculated by the smart contract by subtracting the current timestamp from the timestamp when the card started working. The timestamps are in unix format which makes the calculation very simple.

Experience points will be counted only upon a successful and uninterrupted work session where the stop working function is called by the player. The completion of a work day is not required to earn experience so the player can stop working at any time without penalty.

Levels for each of the card’s sides are increased according to the following table:

Level 1: 1154 xp Level 2: 4470 xp Level 3: 13363 xp Level 4: 37224 xp Level 5: 101333 xp Level 6: 273742 xp Level 7: 737627 xp Level 8: 1986068 xp Level 9: 5346332 xp Level A: 14391160 xp

Notice how the first 4 levels are easily attainable by working for just 24 hours while in contrast the maximum level is reached after 14391160 seconds or approximately 166 days. Using this formula we ensure that the higher leveled cards are more difficult to get which in turn make them more valuable should the player wish to sell their cards on a decentralized marketplace like OpenSea.

Card level restrictions:

Maxing up all the card’s sides would take a while, but would effectively make the card invincible in the game. In order to avoid that there is a limit to how strong each card can get.

These checks are performed each time a player calls the function to stop working on a card. If the card stops working and the sum of all sides would exceed 29, the overflow experience can instead be allocated to another card in the player’s deck.

Card tiers:

Card tiers are the overall levels for each card. Tiers indicate the overall strength of a card and a different cosmetic appearance is applied as an overlay on the cards based on their tiers. Higher tier cards will look more appealing than lower tier cards.

Card tiers are determined by the sum of the square values of each of the card’s sides divided by 2.

For example if we have a card with the following levels: 5,5,6,6 then 5^2 + 5^2 + 6^2 + 6^2 / 2 is 61 which makes it a tier 5 card based on the Tiers Table below.

Tier 1: (18 to 22.5) Tier 2: (26.5 to 31.5) Tier 3: (38.5 to 43.5) Tier 4: (47.5 to 52.5) Tier 5: (57 to 62.5) Tier 6: (68 to 74) Tier 7: (78.5 to 84.5) Tier 8: (87.5 to 95.5) Tier 9: (98 to 106.5) Tier 10: (107.5 to 116.5)

The copystrike ability:

The copystrike ability is a laugh at Youtube’s expense where anyone can claim someone else’s video and take all the revenue. Copystriking in the Meme Trading Cards game follows the same general principle, but it’s essentially a form of attack that can be performed on any player’s card which is currently working or leveling up.

When a card gets copystriked all of the earned experience from since the card started working to the point when the copystrike attack took place will be given to the player performing the attack and the experience gained will be allocated to the attacker’s chosen card. Note that this does not reduce the already “locked” card levels on the victim’s card that were earned when the player successfully ended a work session.

The xp multiplier for the victim’s card will not be increased when copystriked even if the card had otherwise been working for at least a work day. This makes copystriking your enemies useful if you wish to disrupt their progress because the lower their xp multiplier, the less experience they earn per work session.

Restrictions to the copystrike ability:

An attacker can only perform the copystrike on cards that are currently in an active work session. Additionally the attacker’s card must have a chosen card side they wish to gain experience in and the attacker’s card must not currently be in an active work session.

In order to prevent abuse and make earning experience through working more relevant than simply stealing it, there are certain restrictions applied to the copystrike ability. For this we have introduced two additional variables: the cooldown modifier and the total work hours count.

The cooldown modifier is triggered after each attack preventing the player from performing any additional attacks with their card during the time period dictated by the global cooldown time variable.

The total work hours counter keeps track on how long each card has worked in total since they were first registered in the game. Unlike experience points that can be stolen, the total work hours will always stack up on the victim’s card total work hours counter despite being copystrike attacked.

By implementing the total work hours counter we can stop the attacking card from performing the copystrike attack on cards that have a higher total work hours count than them. In other words new players with no work hours cannot simply start copystriking other cards to gain free experience points. And at the same time, since the total work hours always stacks up on the victim's counter, we reduce the number of times an attacker can consecutively copystrike one single card. They'd simply have to start working at one point in order to increase their work hours to be allowed to attack again.

Benefits of the copystrike ability:

The copystrike ability, while not as useful as earning experience through working and ending a successful work session after a work day has passed, can still be beneficial in some cases. For example the attacker can potentially earn huge amounts of experience points by copystriking cards that have been forgotten by their owners.

This is possible because a card that is forgotten and working (stop working function is not called) has not yet accumulated the total work hours in the smart contract so if the attacker’s total work hours is greater than the victim’s card, they can successfully perform the copystrike and earn a massive experience boost.

This will force the player to return to the game to check up on their card’s progress regularly. If they don’t, they risk losing a lot of experience points to the attacker’s who listen in on the public Events on the Blockchain to find potential victims with long work session duration that have not called the stop working function for a while.

Additionally the copystrike attack can be used to disrupt a player’s progress towards incrementing the xp modifier. This allows for the formation of malicious teams who copystrike their competitors systematically and make earning experience points more difficult for their victims.

Hiring a lawyer:

Finally there is a feature in the game called hire a lawyer which is essentially a way to gain temporary immunity towards any copystrike attacks.

The way it works is a player can pay a fixed lawyer fee in BrofistCoin at any time and once assigned to a player’s card the smart contract will not allow any copystrike attacks to be performed on the card for the duration of one work day + 1 hours. The additional hour is added to protect players should the Ethereum network transactions take too long to get mined and give the player enough time to call the stop working function before being copystriked by someone.

Peer-to-Peer mode:

The Peer-to-Peer mode is where the game gets really fun and exciting! This is where the players can show off their hard worked stats and battle against each other in a peer-to-peer matching system. In essence we will have a casual lobby type chatroom where players can show off their stats and invite other players to stake a card and play against them.

Staking a card:

Before a peer-to-peer match can begin, both players have to come to an agreement on which card they are going to stake. A player can also choose to stake a card before any match has been initiated and continue chatting in the lobby to let other players know that they are ready for a match.

The staked card will be temporarily given to the Meme Trading Cards game smart contract and after the match is over, the loser will simply not regain ownership of that card. It will instead be delivered to the winner along with their staked card.

BrofistCoin introduction:

BrofistCoin is an unofficial fan-made ERC20 cryptocurrency inspired by PewDiePie also known as the great Meme Lord. BrofistCoin can be earned by having your memes that you submit in the PewDiePieSubmissions subreddit appear in a LWIAY(Last Week I Asked You) episode in which PewDiePie reviews the most upvoted memes from his subreddit weekly.

Each week after the episode we take the top 3 memes based on Reddit upvotes and allocate 100 BrofistCoin between them by considering the overall percentage of upvotes within the top 3. For example 25 BrofistCoin is rewarded to the meme author who got 25% of the combined upvotes of the top 3 memes.

Statistics The total supply of BrofistCoin is 50 million coins out of which 40 million were airdropped for free (receiver only paid for Gas) to more than 70,000 different addresses within 3 months after the announcement.

The remaining 10 million coins have been distributed in a way which leaves 2,5 million coins to both PewDiePie’s wallet and the developer’s fund and the remaining 5 million coins is held in the Meme Fund which we use to reward LWIAY winners and potentially will use in the Meme Trading Card game to reward players as well.

BrofistCoin has no financial value as it has not been listed on any official exchange other than ForkDelta where the trading volume is minimal.

Conversion of experience points to BrofistCoin:

While not yet official we have been considering the option which would allow the player who has earned experience points from working with a card to exchange their experience to BrofistCoin instead of allocating it to their card levels.

The exchange rate would have to be carefully considered, but one of the reasons we implemented the hire a lawyer feature is to bring a solid stream of BrofistCoin back into the game which would allow us to transfer it back to the players again making the rewarding process economically viable in the long run.

Please note that the economics of this have not yet been thoroughly thought through as this would require some form of a community vote from the players themselves.

PewDiePie’s non-involvement and a disclaimer:

BrofistCoin is a fan-made project. We are not working with PewDiePie and we have never been in contact with him although we have tried to reach him numerous times before.

The private keys for the PewDiePie’s BrofistCoin wallet mentioned above are currently under my possession, but should Felix ever be interested in claiming these funds I will release the private key to him immediately. After all it was his idea that started it all and even though it was just a joke, BrofistCoin has grown to be one of the biggest ERC20 tokens out there in terms of transaction volume.

We never encouraged anyone to get the airdrop even though it was free which shows just how powerful his reputation is within the internet community. People still wanted BrofistCoin even though it was essentially a useless token (we never did promote it to be anything other than that) and some have even stated that because of this it is “more legit than all the other ****coins out there”.

I’m more than happy to bend the knee should the Meme Lord ever be interested in taking over this community driven project and lead the way towards an epic and decentralized future in where memes are not banned and the copystriking problem is nothing more than something to laugh about in a Meme Trading Cards game.

Current state of development:

I would like to stress the fact that just a year ago I had no experience in developing anything on Ethereum. The project has been more of a hobby for me because I am deeply fascinated about the potential that Ethereum and DApps have to offer to the world and I would definitely want to be included in the decentralized revolution that’s upon us in one way or another.

That said, we have a rough mockup of the the game available as a playable demo. It has nothing to do with the blockchain or smart contracts as of yet. Interested parties can however try out the game right now just to get a general feel for the game mechanics.

Ideally this game would run on its own sidechain and I have been looking into the Loom Network's SDK, but unfortunately, even after following their tutorials and guides, I have been unable to successfully run the sidechain locally. I'm not sure what I am doing wrong, but I'm looking forward for new and improved documentation from Loom Network in the near future.

I have also been reading up on peer-to-peer solutions and I experimented with a library called PeerJS, but the whole peer-to-peer networking aspect is still confusing to me. Perhaps this would also easily be solved with a sidechain implementation.

For now I have started working on the smart contract that will be responsible for the training and leveling of cards, but there is currently no front-end for any of that. It will take a lot of fine tuning to get the initial concept game out on testnet and we don’t yet have an ETA for any of this.

I am pretty confident that the idea for the game has at least been thought out well enough. Other than that it's still a long way from becoming a reality.

Most of the work so far has been done by me alone in my spare time while having to read countless guides, documentations and tutorials on how to build smart contracts and DApps in the first place. What I’m trying to say is, if we could have volunteer developers join our cause, this would all be done a lot faster and more efficiently.

Ethereum Address:

0xa8B8DE18b2dC12e755aD9B5805f7aac3d9489C05

Bradymck commented 5 years ago

Hey! You got the account back up!

Sweet. Now this I am very excited about. I will go over it on next stream

BroFistIO commented 5 years ago

Hey, thanks! Yeah I got the account back, but it was only temporary. Someone from Github emailed me and told me it was a mistake and can sometimes happen. And now it just happened again lol. This time I'm not even sure why because I didn't update/submit anything during the period.

Bradymck commented 5 years ago

Hey, don't forget to check out Game of Memes, I think we have a lot of synergy with our goals. Would love you to work your ideas in.

Bradymck commented 4 years ago

Hey! Just a reminder. We just launched the District Registry.

If you are still working on this project, be sure to submit it to the registry if you want to see it built as one of the next districts.

We will be deprecating the old voting app and Github proposal system now that the registry is live.

If you aren't working on this be sure to stake your DNT into the districts you want to see remain in the Registry. https://registry.district0x.io/

Your staked tokens act as an 'Upvote' within the registry. Similar to any TCR, you will also receive a portion of the challenge rewards if anyone ever challenges the district. So be sure to migrate any tokens you used in the old voting app.

I will be streaming today now that the registry looks stable and people are beginning to stake DNT. We will dive in, answer all your questions and help get you started. Hope to see you later today!

Stream: https://www.twitch.tv/district0x

Bradymck commented 4 years ago

Hey @BroFistIO

I'm not sure if you're aware but we recently launched a new bounty to migrate your proposals to the actual District Registry: https://registry.district0x.io/

We're replacing the old voting app with the registry. Let me know if you need help but I would love to see you migrate this over so you can claim your DNT.

It does take a 10,000 DNT submit to submit your proposal but this gives you an extra 2000 you can stake in the registry beyond the deposit amount.

Hit me up on Telegram or Discord if you need help or have questions.

Telegram: https://t.me/district0x/75217 Discord: https://discord.gg/P9RQejv

PS, please excuse the canned response. I am encouraging everyone here to start migrating so they can claim their 12000 DNT.