Code Monkey home page Code Monkey logo

book's Introduction

Decentralised Gaming Book

The goal of this book is to serve as a useful source of information on decentralied blockchain gaming. The content is for developers, although the first section should be intelligible by non-technical readers.

The ultimate goal is to encourage the production of complex online games that have the same complexity as games we already play, but with a decentralised architecture.

The information will serve as a great point of reference for understanding the technology and design decisions required to make decentralised games. The intent is not to provide a guide of how to build a game, but rather to guide the overall strategy of development.

The following list is the proposed structure of the book. Currently, it is a work in progress.

Structure

non-technical

technical

back-end

front-end

  • 1X_user_experience_(gameplay)
  • 1X_user_interace_and_graphics
  • 1X_wallets

appendices

  • glossary

book's People

Contributors

decentralisedgaming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

book's Issues

Proposed Structure

This is the proposed structure of the book.

Structure

non-technical

technical

back-end

front-end

  • 12_user_experience_(gameplay)
  • 13_user_interace_and_graphics
  • 14_wallets

appendices

  • glossary

Decentralized gaming vs blockchain gaming

"The goal of this book is to be a useful source of information on blockchain game technology. " .

I think we could try to discuss about other kind of decentralized gaming too, not necessary only blockchain. Eg. TOR and torrents are good decentralized systems too. I am not aware of any decentralized games not using blockchain tech thought. But I think that could be an interesting topic that could be explored.

Add references for every claim

There's a lot claims in the book without references, eg .btc/ethereum prices in 2017, I think we should have references for these.

Brainstorm: Governance - network + meta-game mechanics

Brainstorm on governance

Network governance

  • Forking a way to pick upgrades / rollbacks, or to split off and start fresh. Classic blockchain technique.
  • On-chain governance / DAOs as way of formalising the governance of upgrades or rollbacks.
  • It is worth providing a definition of DAOs. Just to aid clarity. Perhaps examples too.

Meta-game governance

  • Guilds as companies -- Guilds can become for-profit DAOs where ownership is distributed globally.
  • Guilds as DAOs, e.g. MetaClan (see also)
  • Enforcing social contracts -- codifying the social contract between players to be an actual codified (i.e., computationally enforceable) one. For example, a guild member who is power-levelled by the guild (receiving free ores to gain xp) should have skin-in-game and not be able to just leave the guild once levelled.
    • thesis: the more decentralised protections you can offer, the greater the monetary value will flow through the system.

Brainstorm: Advantages of decentralised gaming

We have a couple of documents made in Google docs that list the advantages, but I figure let's put them here and have people collaborate. I will put the pain points into a separate issue, although the two lists may end up in the same chapter.

Brainstorm of terms / ideas

Here is a list of key ideas. Some of these may apply to any blockchain game and not just decentralised ones.

  • Anti-cheating
  • Transparent economics
  • True ownership
  • Reduced hosting costs
  • Reduced bandwidth cots
  • Easier fundraising
  • Increased loyalty by having a stake in the game
  • Forking to preserve community and game state (if OSS)
  • Player Governance (not just DAOs)
  • Provenance (Provably fair item acquisition)
  • Difficult to hack
  • High fault tolerance
  • Censorship resistance (Unstoppable)
  • Permissionless
  • 24/7 Up-time

Add definition what is a blockchain

I have noticed that people mean different thing with a "blockchain". We should have a definition for blockchain what we mean in the book and then use that in the book. For example some considers proof of authorities as blockchains and some do not.

How can clever gameplay design hide technological inadequacies?

We know that blockchain technology isn't the best for speed right now, although there are some interesting innovations in the R&D stage (rollups etc). Until these technologies are widely tested and deployed, we might need to come up with gameplay reasons why a game is slow at certain times. Basically, coming up with a story as a reason for keeping a player immersed even though the real problem is technology.

Let's brainstorm ideas where and see if we can whittle them into something useful for the book.

Slowness / block time

  • Abstract network lag as a need-to-wait story element, such as "strong wind in a desert so you have to wait it out".
  • Abstract block confirmation time as some maturation time story line for an in-game item. E.g. smithing an item will take time, so the character graphic can be hard at work while the human player waits on the next block.

Transactions Fees / Costs

  • Can be disguised as food (cf. http://ethernal.world/). You need to buy food to play. If you run out of food you are hungry and can no longer move.
  • In a multi-chain game, the fees to play could be different. So different kings exert different taxes. It could perhaps be one chain too.... although it might be strange if gas costs are not the same everywhere.
  • Perhaps high loot areas have higher tx fees / gas costs? Some of these tx fees can go to a pool that then subsidizes the costs for new players to join. Having a free-to-play solution in a decentralised game is tough. This is perhaps one mechanic.

Staking

  • If players owned an inn, they could have NPC guests that pay rent. You need to stake(?) to buy the inn perhaps, and the NPCs pay you a reward (inflation for staking).

Fundraising

  • Devs need funding, but that's tricky for a decentralised game that's already running. ICOs/pre-sales are probably not a long term solution. Perhaps some of the block reward goes to the developers. This could be like a King taking some tax from the citizens.
  • If food = tx fees, then some of that food could also be paid to the monarch.
  • A popular game has a lot of eyeballs on it. A real-world company could pay for advertising to the player base, which could be outside of the game, but the company could donate money to each player to cover some transaction fees. The gameplay reason is that crop yields were good this year so everyone has more food. An in-game company / guild, might want advertising too!
  • Filecoin mechanism to incentivise full-nodes. The story justification is something like: the player is a land owner who receives a tax from NPC residents.

(anti-)Botting

  • Bots can be a problem and require careful consideration to combat. However, there might be a way to include bots in a good way that also has a gameplay aspect: Players could just buy or rent the bot script and in the game, which controls an NPC. Naturally they need food in order to work. - h/t: @Codie-Petersen
  • Allowing for PVP can help to reduce bots too. Players tend to be better at PVP than bots.

Moderation

I think we could also have a section about moderation. This is lesser issue in centralized platforms where we can have moderators taking care of cheaters/botters/abusers/griefers etc. But in a decentralized games these are harder to combat.

These could be combated with some kind of sybil resistance (this could be a topic on its own too) or somekind of voting DAO.

A list of issues to address

  • DAOs should be explained. They are just mentioned but not talked what they are. Molochdao could be mentioned too.
  • blockchain gaming also makes it possible for everyone to keep track of the history far in the future (as long as even one blockchain node stays online)
  • talk about emergent behaviour of online games: Simple game mechanics can emerge into very complex games because of complex humans interacting with them. Trading is a good example of that (the trading itself is really simple, but humans make it complex)
  • Give more examples about current decentralized games

2_online_gaming_problems.md

  • in current client-server design of traditional games, the players never "own" the game. Like we used to buy the game from store and always have access to the game, this is no longer true. When the company stops running the servers, the game is gone for good and can never played again. This wouldnt be the case with blockcain gaming
  • Discuss about magic the gathering reserved list
  • Game companies are often interested in hearing what their players think of the game and where to develop it further, but assessing community opinion is difficult. In blockchainspace the game could be forked. Runescape is somewhat good example of that, as the developer kept the old versions of the game going while developing new version.

05_blockchain_gaming_architecture.md

  • Mention benefits of each model. Eg in Monolithic the advantage is that the game can easily issue rewards based on user actions as the system already knows the real state of players.
  • " Huntercoin was essentially the first blockchain." -> " Huntercoin was essentially the first monolithic gaming blockchain."?
  • Add optimistic rollup type: players actions are by default trusted, but if someone detects a cheating attempt, such actor can be punished.
  • Other kinds of snark models could also be incorporated. So that only merkle proofs are stored on chain. ( I guess its somewhat layered approach). This could enable really complex game to run on chain while having the chain know the state of the game at all times.
  • Corrupt community server operators tended to be a problem in mmorpgs I used to play. If you bribed the admins, you got very good items, which was quite unfair.

Brainstorm: Funding

I have some things written on this already, but it is worth brainstorming ideas to see what else we can come up with. A blog on this topic (link), which outlined some of the relationship between old funding models and new, also the link between decentralised funding and governance.

This is not necessarily related to having an in-game reason for raising money, as that is for a separate thread. ( #8 ).

It is worth looking traditional payment methods for ideas.

Funding models of traditional games

  • Boxed game
  • Kickstarter
  • Subscriptions
  • Freemium

Funding models of blockchain projects

  • Bitcoin: none.
  • Ethereum: ICO (presale)
  • Zcash: fraction of block reward.

Funding models of blockchain gaming projects

Having on-going funding is tough in a decentralised model. If a player wants to fund their account with a credit card they need to buy something that already exists (i.e. tokens from another player). Typically, new players buying tokens shouldn't be purchasing funds out of thin air. If the game is centralised, then it is possible, but no entity within the network is supposed to be privileged.

  • Xaya: ICO + Optional Tx fee (goes as a reward to the devs, or otherwise burnt)
  • Decentraland / Sandbox / CryptoVoxels: ICO (?).
  • CryptoKitties: claim not to have held an ICO, but I thought they sold tokens to raise money.

Future possibilities for blockchain gaming projects

Having on-going funding is tough in a decentralised model. If a player wants to fund their account with a credit card they need to buy something that already exists (i.e. tokens from another player). Typically, new players buying tokens shouldn't be purchasing funds out of thin air. If the game is centralised, then it is possible, but no entity within the network is supposed to be privileged.

Player Subscriptions in crypto (basically depletes some supply of funds. ERC-1337) requires the players buying tokens in the first place, but what advantage would a player have to support the developers? There needs to be a reason to send money to the devs and not just buy tokens from another player.

  • Block reward, like with Z-Cash.
    • Transparent but places some privilege on the dev team. Certainly, the community would be free to fork the code, but they might lose out on the network efforts (everyone on the same chain).
  • Tx fee, but with variable cost.
    • High reward areas have higher fees, of which some portion can go to the developers, some portion could seed a pool for new players. This means higher level areas will generate more fees for devs, which incentivises the devs to help players get to high levels.
  • Transmutation
    • devs convert tokens into new items and inject those into the game. Those items could be sold for profit. This means that the supply of such new items is transparent and part of (say) the block reward model.
  • Ad model.
    • Popular projects will have a lot of eyeballs on them. Placing ads inside the official game client could help with funding, but need to be mindful not to break privacy. An open source game client will naturally be forked.
  • Offline swag.
    • Although probably doesn't generate enough revenue.
  • Exchange with fees.
    • Although probably presents a bunch of legal hassles.
  • Filecoin mechanism to incentivise full-nodes.

References

Brainstorm: Freemium

How to do free-to-play in a blockchain game?

Normally, saving anything to a blockchain requires a fee for spam protection. However, a common method to fund an online game is with the freemium model. New players can play for free to learn the game and see if they like it, while premium players pay a fee to get access to new content / new skills / new activities.

Some suggestions

  • it's open-source software, so players could run a demo locally, but this means they are not playing the proper game.
  • the devs host a demo server that's reset.
  • players could perform some task to get free credits from the dev. Perhaps assist in marketing and then the devs provide some tokens from their own stash. The more manual this is, the worse it will scale. Players could provide email addresses of friends in order to earn credits: it is a form of marketing that's easy to automate, but not poor for privacy.
  • devs can also provide credits from their own stash, but this is not necessarily sustainable and possibly hard to make sybil resistant (unless doing KYC).
  • Allow for gifting of credits (player to player).
  • Allow players to pay a monthly sub with in-game work. They collect tokens from in-game activities but need to pay some of this to the devs, or potentially burn it. A problem here that free actions are a problem for spam.
  • Is there a reliable way to prove that a player runs a full-node? If so, perhaps they should be credited with a number of actions (or tokens) on a pro-rata basis (thinking on Filecoin).

Early levels free, but later levels cost

New players could potentially play a free version that's centralised, or on a side-chain. In either case, the considerations for spam protection will be different. The sidechains could be located in strategic geographic locations too. As a related aside, sidechains could perhaps be used for instancing.

In this free version, new players will get access to very limited content. Perhaps only access to levels 1 - 10. If they want to pay then they can access the full content in the decentralised game. Any items gathered in the free version could be burnt and that value transferred to the full game.

New premium players would have the option of starting from level 10 and can have a start set of items. This means a premium player is just paying for convenience (a jump start).

F2P Pool of funds

Potentially there is a pool of funding that players could contribute to that allows new players to play for free, but naturally there needs to be a limit to their actions and there needs to be considerations for sybil resistance.

Brainstorm: (Token) economics

tl;dr: we might need/ want 3 currencies

Executive Summary

  1. One coin for chain security.
  2. One coin that scales with player base (and is somehow correlated to player base growth and player activity)
  3. Perhaps also a stable coin. I suspect some players may prefer to hold (USD / EUR) rather than coin 1 (which is BTC or ETH like) or coin 2 (which inflates a lot). The stablecoin is the middle path. Coin 1. may rise in value over-time but it could also be highly volatile given what we see in current crypto markets. Coin 2 probably isn't so volatile and is the defacto norm for MMOs right now. I think this third option is a nice addition to MMOs.

Background

These topics have come up before but I had some more crystallized thoughts recently. Let me brain dump some thoughts and then eventually tidy it up into a proper chapter.

For simplicity, I think we probably have to separate the in-game economics from that of the token economics. Not that they are independent, but rather the game economy itself can be complex but we need some way to deal with the token economics as an extra layer. We can gain insight from looking at existing online games and from looking at existing cryptocurrencies.

In addition, I think the economic concerns for a "NFT-game" will be slighty different than for a "fully decentralised game". I think we might need 3 currencies in a decentralised game. This is mainly due to the different purposes of each currency and the coupling between the underlying economies.

I'll split this into:

  • Traditional games,
  • NFT Games, and
  • Dentralised games.

Traditional games

The traditional approach to MMO economies is to have an ever inflating supply of gold coins such that each coin is worth less in dollar terms each year. Obviously, this goes against what we see with crypto prices where people believe that the price of a crypto token should increase over time since they are scarce. Whenever I sold a rare gaming item to another player I was always interested in the USD price. When I was selling ores I didn't think about USD, but I think that mindset will change with decentralised games.

An inflating supply can also be an annoyance. In a game I played, I listed an item for 100,000 gp. That was a few years ago. The item didn't sell, but it is still listed. However, over that time the supply of gp has increased and is easier to obtain. Consequently, the item has been devalued since each gold piece is now worth less in dollar terms. So you really want to hold items in your inventory which don't suffer from inflation like gold pieces tend to do.

However, an inflating supply isn't totally insane. When new players join the game they want to start fighting monsters and collecting gp. They want to feel like progress is being made. If they rarely pick up gp then they will feel deflated (sorry, was an easy pun). I saw this in the same game I was just thinking on. During the testing phrase gp was hard to come by. Item pricing was all over the places and no one could really get a grasp on what prices should be. I think there is an argument for including an inflating currency, as we see in traditional MMOs, BUT players should also have a means of wealth protection at their disposal. Forcing players to hoard rares or "harder assets" is what MMOs implicitly do now but I'm not convinced that is a fair way to do it. This is an implied 'rule' that not everyone necessarily gets.

So how can things be different?

NFT Game

These are blockchain games which are mostly centralised but have their assets represented by tokens then I think the in-game economics are basically the same as for a traditional online game. There is some concern required for the underlying chain, of course, but less so. If the price of Ethereum changes the the value of those NFT items could change but I don't think it is a guarantee by any means.

(I mostly skip analysis of these games for this book)

Decentralised games

For decentralised games I think the main economic concerns to address should be split into two factors:

  1. the economics of the blockchain itself. Here the economics are about security.
  2. the in-game economics, which is about the health of the player economy.

I think these two economies should probably be decoupled from each other. In other words, I think the token for securing the chain should not be the main game currency or you need an extra mechanism (see below).

Why?
The currency for securing the chain should probably have low inflation. People should want to hold these tokens since they are scarce / rare and believe the tokens will go up in value (especially if the ecosystem grows and more players join). We see this most notably with Bitcoin but also with Ethereum. While the former has a pre-determined rate of issuance, the latter has a more ad-hoc rate that changes with "governance".

However, items in the game should be denominated in a different currency. Here is my thinking.
Just because the value of the underlying blockchain currency has appreciated it doesnt mean that the intrinsic utility of the item has improved. We've seen big jumps in crypto prices recently, so in gaming terms this could translate into items listed on an auction house becoming overvalued by (say) 50% over night in dollar terms. Utility didn't change, so it isn't like you can mine more rocks with the same pick axe. The ore that you collect doesn't give any better bonuses than it did before the underlying crypto token rocketed against the dollar. If you are a big holder of the underlying crypto token you won't care, but this could create a problem for new players.

But, there is a 'fix': players could just go the auction house and re-adjust all their prices! But that's a huge pain in the ass if it is manual. Given that blockchain games tend to be about relating in-game items to real values, then it could make sense to have auction houses denominated in USD / EUR etc. That wouldn't necessitate the introduction of a new currency, but it might be worth to include a stablecoin that's pegged to the USD as a means of exchange. Everyone knows the value of a dollar and it doesn't fluctuate like crypto does. I think it will be a headache to have an FX calculator open all the time if you price items in the network token and you just want to trade peer-to-peer (unless you include a USD price inside the trade window?)

So this potentially gives us two currencies to think about: the token for the network which is for security and performing actions, and a token that's pegged to fiat for in-game transactions. The first currency can be 'easily' printed by the network, while the second is not something that developers can really have much control over (although perhaps there is a monetisation angle in here for devs? that thought just occurred to me).

This leads me to think that there should be a third currency, which is basically a traditional MMO style currency which is inflationary by design. It will be easy to obtain and let's players get trading. Players wouldn't necessarily want to hold it long-term since the expectation is inflationary. It would be wiser to convert to the stabelcoin. The underlying network token may not necessarily increase in price either, so converting back player money back to that currency isn't necessarily wise. It isnt wise to pretend that players should hold that token as a means of protecting their wealth.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.