Analyzing game resource management and future financialization strategies

5fLK...31co
18 Jan 2024
52

Translator's preface: "This article is compiled from a long tweet by two of Primodium's founders, systematically describing how the Primodium team reduces gas consumption during game development, stores resources in player games. and why financialization is equally indispensable for full-chain games."

01.How Primodium does Lazy Update

A fully chained game is bound to consume a lot of gas, so we have to find ways to reduce the number of transactions signed by players. with the introduction of lazy update, we only compute the required game resources when a player performs an action.
In the first version of Primodium, players had to place miners next to nodes before they could place conveyor belts to transport resources to the main base.
When players claim resources from their home bases, we have to figure out the following:
How to keep track of the miners owned by each player;
Get these miners connected to the right processing plant;
Our first scheme is a depth-first search from a player's home base as he extracts resources. players can place up to four miners next to each block.
When we introduced factories that take resources from miners, players started to build more complex structures to optimize resource output. for example, player @CincauHangus created a factory design like the one below:
After @AlirezaN95 joined our team, he redesigned our MUD-based development of the resource component.In version v0.6.0, we provided each player with a global resource production rate, which increases every time a miner is built on a resource.
This makes updates atomic, and for every action a player performs, we can quickly calculate the total amount of resources by their productivity, and when they build a factory and consume resources to produce an item, the portion of consumed resources is simply deducted from the global productivity.
In subsequent releases, we've noticed a decrease in player engagement after building miners, possibly because the mineral conveyor belt construction mechanic is confusing some players.
By setting a global resource productivity rate, we can remove the mineral conveyor belts and teleportation nodes altogether, allowing for the more complex gameplay found in Primodium today.
In our latest release, we've redesigned the way we store and calculate resource productivity in smart contracts, laying the groundwork for exciting new features to come.

02. How Primodium stores player resources


In Primodium, you'll be born on a resource-rich asteroid, harvest resources by building miners, and use those resources to fortify buildings, train armies, and attack other players.
Miner and mineable resources can be seen above
In the initial version of Primodium, built using Lattice's MUD version V1 engine, all smart contracts were developed around the Entity Component System (ECS) architecture.
At first, I designed a separate new contract for each resource. this approach allowed the client to track the amount of each resource individually, but as the complexity of the game increased, he incurred overhead that was difficult to deal with.
For example, Primodium v0.0 (eleven versions ago!) required 63 contracts just to store player items.@l_udens proposed an efficient solution: use a hash of the resource name and the player address as a uniform component key to simplify everything into a single component.
Over the next few months, we continued to add content and complexity to the game. more resource items enriched the player experience, which in turn increased player retention.
The image below shows a complex base built by an enthusiastic player in the current beta version of Primodium!
We also upgraded the game engine to the MUD V2 version, which meant we had to refactor the contractual architecture of our resources.
@0xhank redesigned the contract to use a table with entity and resource as key schema, avoiding the extra hash calculation step.
When a player builds a factory or a mine, the productivity of the resource in question increases. for example, building an iron mine increases the productivity of iron. similarly, building a factory that uses iron (such as an iron plate factory) increases the rate of iron consumption.
With the store hooks system built by @AlirezaN95, the game is able to update productivity and consumption rates in real time, which in turn changes the amount of resources available to the player.The resource count is updated every time the player acts.
The client displays predicted resource values in a panel designed by @0xNAB5 well in advance of the player executing the transaction.In future versions of Primodium, we plan to explore the technology in greater depth and open up our contracts to facilitate the community's exploration of new gameplay.

03. why financialization is equally indispensable for full-chain gaming


Because Play to Earn games have had so many disastrous consequences in the past, developers have turned to full-chain games, looking for different ways to incorporate Crypto into their games.The main argument for full-chain games is that they increase the composability and permanence of the game, while the financialization part is often strongly resisted.
But I think financialization is still very important:
Financialization is the fundamental reason why cryptocurrencies exist as underlying architectures. imagine if i ran the bitcoin protocol on my personal computer, he could show that you have 1 BTC and i have 5 BTC, and no one would assign a true value to bitcoin that lacks a decentralized consensus. because i could just tamper with the backend data and say that i actually have 50 btc.
It can be seen that running the bitcoin protocol on a centralized server relies on trusting the centralized server. and in the crypto world, the decentralized consensus makes it necessary for the matter of who holds 1 BTC to be verified by a certain number of nodes. in a way, decentralization constitutes the basis for assigning real-world value to cryptocurrencies. under the protection of decentralized consensus, people are willing to assign value to cryptocurrencies.
Whether that value is $1 or $40,000 is not the point of today's discussion; the point is that the limitations of block space and decentralized consensus make things recorded on the chain scarce, and that scarcity gives them real value, which is unheard of in other industries, which can't create things of real value out of thin air.
You might argue that gaming companies can create billion-dollar items in games without cryptocurrencies. yes, but those companies have a consensus that has been built up over years of player trust. and it will be much tougher for startups to make that happen. this is similar to the way that dollar fiat currencies and cryptocurrencies get their value.
For full on-chain games, imagine if not just some of the assets, but the entire game was put on the chain -- then every item, every unit, decision, building would gain real value because they are all scarce resources guarded by decentralized consensus.
And providing such a scarce resource is one of the many goals of primodium. based on this value-empowering process, you can build real economies, which is an exciting thing (I'll explain in another thread why web2.5 games don't work, and one of the main reasons for that is that they have to deal with a very large number of regulatory and compliance issues).
You might counter: but Mr. tax cuts, financialization means that everyone tries to extract benefits from the system and make money, so the system will eventually collapse!
But my point is that every participant in the BTC mining process is also trying to make money, and as long as the system has external value, he'll be able to keep going. and it's obvious that the key to keeping going is balance, so the game will provide enough fun to make sure that he's able to live up to expectations for most people.
The in-game resource marketplace introduced in Primodium V0.9 is a step in that direction, but there is much, much more work to be done.

Write & Read to Earn with BULB

Learn More

Enjoy this blog? Subscribe to ned692000

5 Comments

B
No comments yet.
Most relevant comments are displayed, so some may have been filtered out.