【Workshop 0x01 Summary】 Generate Game Map based on Blockchain Data

1 Participating Members

  • DM (Dungeon Master)
    • ledduckgo: Cool-Oriented Programming.
  • Players (Offline)
    • 叶开: A developer with a teacher certificate who wrote this book on Go language and blockchain
    • 小林小林能不能行: PhD students who hope to graduate on time
    • Ray: A wage earner, a block chain noob, is studying hard
    • Adastra: One of the heads of a university blockchain association, wage earner in web2
    • Brian Seong: Vice President of a University Blockchain Association, an evangelist who is keen on blockchain technology education
    • 饼: A member of the Blockchain Association of a certain university, an enthusiastic blockchain evangelist
  • Players (Online)
    • 追忆似水年华: a web engineer who can only write JavaScript
    • fengfeng: a small developer of blockchain
    • Henry
    • Hqwangningbo: Blockchain development mastermind
  • Player (Async)
    • Msfew: front-end rookie, ruthless research report collection machine

2 Introduction of Workshop

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!

2.1 Background

"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:

  • A distributed consensus system with unlimited increase of nodes without performance degradation
  • A Gaussian Timer
  • A Web3 system

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.

  • Verifiable

Because both the "metadata" and "conversion rules" of the data on the chain are "verifiable".

  • free

It's free to read blockchain data , so it is equivalent to the free data source we have!

2.2 Planning of Workshop

0x0) Introduction of Web3 dApp Dev Workshop@NonceGeek

Cool-Oriented Programming.

0x1) Introduction to IDEA

0x2) Brainstorming

Thinking points:

  • The logic of the source IDEA——

Does the IDEA of the on-chain data source make sense?

  • A map generated based on blockchain data——
    • What are the amazing possibilities of maps generated from on-chain data sources?
    • Based on the generated map, what kind of Amazing gameplay (DAO/NFT/GAME/Others) might we have?
  • Diffuse thinking ——
    • Based on the data source on the chain, will we have other interesting branches?

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!

3 Summary

3.1 Introduction of Web3 dApp Dev Camp & Workshop

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:

The supporting open source cloud teaching platform WeLightOS won the second prize of the China Blockchain Competition:

WeLightOS: http://sgchanhui.gitee.io/welightblockchainos/

Web3 dApp Dev Workshop is an offline version, an offline practice activity based on the "desktop game concept". The current plan is:

  • Offline Workshops are held at multiple locations every half a month. The workshop members are mainly members of Nonce Geek Studio, which adopts a semi-open format and invites a small number of external members to participate (targeted invitations and open paid places).
  • In the future planning, Workshop will gradually open its bases in New York, Hangzhou, Shenzhen, Shanghai, Nanjing and other cities.

3.2 NonceGeek 2022 Exploration

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.

3.3 TaiShang World Generator Brainstorm

TaiShang World Generator Introduction

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

Map generation

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.

Generation rules

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.

For the game, the question of which elements are on the chain

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.

Map modification

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.

Map expansion

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.

The economic model of the map

  • Randomly generated maps with better terrain or higher rarity will have higher value.
  • After the game player interacts on the map, the owner of the map will receive revenue.
  • The map owned by the player can be spliced by the player to form a new terrain.
  • The value of the map can fall on the player interaction on the map, which can form an ecology.

3.4 Free Chat

Discussion on NFT Art

  • NFT art still relies on storytelling and requires consensus;
  • The aborigines of Crypto prefer Geek styles such as pixel style;
  • This is the level of appreciation that the aboriginal people of Crypto have brought to the computer's pre-knowledge.

NFT cross-chain

  • FX Portal can achieve decentralized cross-chain and communication between cross-chain contracts. Lock the NFT on one chain, and cast the NFT on the other chain.

3.5 Other talks about Blockchain

Polygon

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.

Web3Games

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

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.

Random number problem

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.

Tsinghua University Blockchain Association

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.

WeLightBlockchainOS

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.

4 Photo of Workshop 0x01

WechatIMG38
WechatIMG38

Authors:

! For Chinese User, You can connect us by WeChat ID: 197626581

msfew
msfew
leeduckgo
leeduckgo
Subscribe to Web3dAppDevCamp
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.