Project of this Workshop:
https://github.com/WeLightProject/Web3-dApp-Camp/discussions/26
Topic: Generate game maps based on blockchain data!
Using the data on blockchain as the data source, trying to generate a 2D game map is exploring the possibility of "blockchain game" happily!
"Verifiable Self-growing Distributed Data Source: A New Perspective on Blockchain"
The blockchain system is a comprehensive product of a variety of complex technologies. Therefore, the system can be viewed from many different interesting perspectives:
However, this project attempts to start from a brand new perspective and treat the blockchain as a verifiable self-growing distributed data source.
This data source has the following characteristics:
Self-growing
Data self-grows at a fixed frequency. Therefore, under the deterministic rules, a series of objects from metadata such as regions, treasures, monsters, etc. are also self-growth!
Distributed
The metadata comes from the blockchain, so there is no need to worry about the loss and tampering of metadata.
Because both the "metadata" and "conversion rules" of the data on the chain are "verifiable".
It's free to read blockchain data , so it is equivalent to the free data source we have!
0x0) Introduction of Web3 dApp Dev Workshop@NonceGeek
Cool-Oriented Programming.
0x1) Introduction to IDEA
0x2) Brainstorming
Thinking points:
Does the IDEA of the on-chain data source make sense?
0x3) A small goal to be completed by this WorkShop
Given the backend interface:
https://github.com/WeLightProject/tai-shang-world-generator/wiki/API-Doc
Carry out a front-end implementation and deploy to Github-Pages!
0x4) Summary + Brainstorming again!
Perform a second brain storm on the basis of the above.
0x5) Free chat
Let's talk about anything about blockchain!
Both Web3 dApp Dev Camp and Web3 dApp Dev Workshop were initiated by the NonceGeek team.
The Web3.0 dApp training camp includes both a project-oriented online training camp based on Github Discussion. The Purpose of Web3.0 dApp Dev Camp is to let the traditional developers, students and blockchain developers quickly acquire web3.0 dApp development skills.
Web3 Dev Camp Information Collection:
Github: https://github.com/WeLightProject/Web3-dApp-Camp/discussions
Twitter: https://twitter.com/Web3dAppCamp
Hackerlink: https://hackerlink.io/buidl/1807
The supporting open source cloud teaching platform WeLightOS won the second prize of the China Blockchain Competition:
Web3 dApp Dev Workshop is an offline version, an offline practice activity based on the "desktop game concept". The current plan is:
NonceGeek explored the field of NFT in 2021, the Combination&Decomposition of NFT (TaiShang NFT Combinator), and infrastructures for abstract(loot-liked) NFT(TaiShang NFT Wallet& TaiShang NFT Renderer).
At the end of 2021, WeLight launched a new direction of exploration, such as exploring the possibility of Function-as-a-service on the Arweave blockchain network.
In 2022, NonceGeek will actively try the Metaverse Project, make differentiation in such a hot but vague concept of meta-universe, and find the right direction.
At present, random map generation on the market is to randomly generate the map offline, and then upload the object coordinates in the map to the blockchain. Since there is no repeatability, the resulting world is not so Web3. Users cannot generate a world like the Sandbox by themselves, and the ownership of the world is still in the hands of the Sandbox.
Therefore, this project decided to proceed from this point, and directly use the data that cannot be tampered with on the chain (such as block data, tx data) as a seed to generate an abstract map. The abstract map can be further mint into NFT, and explore more ways to play with it.
Repo: https://github.com/WeLightProject/tai-shang-world-generator
At present, TaiShang World Generator can use each block as the data source, combined with the generation rules stored on Arweave that can be loaded into the runtime of the program, and finally generate different two-dimensional matrices containing different elements.
It should be noted that the chain (Polygon+Arweave) is responsible for determining the abstract two-dimensional map, and the rendering of the abstract two-dimensional map into the final map is the responsibility of the game operator under the chain.
From a bunch of random data to the map, there are actually precedents in traditional games——
Take Minecraft as an example, the map generation rules are determined before compilation, and the map will be generated and rendered according to the rules during the game.
If you "re-engrave" the map generation in Web3, you need to make sure: "The rule code is small" and "The programming language supports dynamic loading code". In this way, the rule code itself can be stored on a blockchain such as Arweave, and users are allowed to Load on the server, just like a FaaS service.
A common practice in games is to store configuration such as generation rules in Celeste's cloud function container.
Smaller games will store the rules on the chain, but there are problems that are difficult to modify.
For big games, only data that needs to be modified, such as generation rules or game materials, will be uploaded to the chain, and most of the important data is placed off-chain.
The actual game map is actually upgraded after the player performs the operation. How to deal with this problem in this project?
Since the source data of the map is stored on the chain, it cannot be tampered with, and the original map (the genesis map) is generated.
The source map cannot be modified, but subsequent users can destroy or build the map like Minecraft. The revised map is a brand new unique map. The user can save some interactions and modifications to the map by casting the form of NFT. This kind of thinking is similar to Bitcoin's UTXO or Arweave's SCP.
The user can choose to directly save the newly revised map or the operation log of the map.
Due to the self-growth of blockchain data, all generated maps can be spliced together to form a huge map.
But this will cause a problem that if the growth rate of players in the game is less than the growth rate of the map, then most of the map will be idle.
This problem can only make sense through Mint's maps, or it can be solved by designing restriction rules.
In the process, everyone talked about Polygon. Polygon is an expansion solution for Ethereum.
The expansion of Ethereum will not be limited to one protocol, but there will be various expansion, sharding and Layer 2 solutions. Polygon is currently a PoS (Proof of Stake) Ethereum sidechain, which is basically the same as the Ethereum network in terms of use. In addition, Polygon also provides an SDK that allows developers to build a simple blockchain network by themselves. Polygon is currently studying zkEVM and is expected to launch zk and other related functions at the end of 2023.
Members shared their own Web3Games organization. Web3Games is a blockchain game development service company.
The ecology of Web3Games includes blockchain games, NFT and DeFi. Web3Games provides chain game DID solutions, API-as-a-service service agreement, one-stop blockchain portal, and resources of various chain game development studios.
Web3Games provides a dedicated blockchain network for games based on Substrate, supports multi-environment and multi-smart contract operation, and supports WASM and EVM virtual machines. In addition, this blockchain also supports multi-project communication, allowing two-way interaction in different execution environments.
Substrate did not convert macros into Rust native code before version 3.0, encapsulating a lot of low-level details. At present, under the maintenance of the official team, more and more non-low-level macros have been opened up. The update speed of Substrate is about 15 days faster than Polkadot, and the update is relatively fast. It has many experimental features and is suitable for developers to learn.
Traditional smart contracts cannot get external random numbers, and can only be generated by current or future chain information in the contract. When the source code of the contract is made public, it is easy to be attacked by hackers, or the block information used to generate random numbers is obtained in advance by large mining pools, which interferes with randomness.
One example is that on the Solana chain, as a chain that goes down from time to time, the random number function is likely to be compromised after being attacked by DDoS.
There are two main current plans of the Blockchain Association:
One is to preach, let more people understand the blockchain;
The second is to organize more activities and get in touch with more members who already know blockchain.
In the self-introduction session, some members asked about the WeLightBlockchainOS project that the Web3 dApp Dev Camp did before. WeLightBlockchainOS is a cloud-based blockchain development toolbox that uses an operating system-like interface to help developers quickly and easily get started with blockchain development.
In the daily teaching process, the commonly used collaborative teaching operation solution is to use VNS to connect to the actual host remotely, but it cannot solve the large number of students. WeLightBlockchainOS realizes the integration of various blockchain development tools through the front-end iframe, and realizes the function of document sharing in the teaching process and remote code writing.
Authors:
! For Chinese User, You can connect us by WeChat ID: 197626581