“全链” 的定义我在早先的文档里已有阐述,就是一个应用的所有逻辑都放在链上,没有设置额外的服务器,就可以被定义为全链应用,套用到游戏板块里,也是同样的定义逻辑:没有连接任何第三方游戏服务器,所有逻辑都在链上进行的游戏,就是全链游戏。
The definition of "fully on-chain" has been explained in earlier documentation: an application can be defined as fully on-chain if all its logic is placed on the blockchain without relying on additional servers. Applied to the gaming sector, the same logic applies: a game that does not connect to any third-party game servers and conducts all its logic on-chain is a fully on-chain game.
每个区块链的账户模型和编程范式都有特定的差别(除了那些 Fork 链),针对 CKB 来说,CKB 采用 UTXO 账户模型及 “链下计算、链上验证” 的编程范式,账户模型和编程范式决定了在这条区块链上构建的游戏应该如何达到全链状态。
Each blockchain has its own distinct account model and programming paradigm (except for those that are direct forks). In the case of CKB, it adopts the UTXO account model and follows a programming paradigm of "off-chain computation, on-chain verification." The account model and programming paradigm together determine how games built on this blockchain can achieve a fully on-chain state.
从账户模型和编程范式两个角度分析如何在 CKB 上构建全链游戏:
Analyzing how to build a fully on-chain game on CKB from the perspectives of its account model and programming paradigm:
PVE(Player vs Environment)是指玩家与环境对抗的游戏模式,所谓的环境即表示所有能与玩家发生对抗性互动的游戏实体的集合。在这个模式里,玩家独自与游戏系统进行交互,所以 PVE 模式在设计的时候只需考虑与单个玩家的交互场景,即只设计玩家的所有交互选项和对应的系统反馈。
PVE (Player vs Environment) refers to a game mode where players engage in adversarial interactions with the game's environment. Here, "environment" represents the collective set of all game entities that can enter into confrontational interactions with the player. In this mode, the player interacts solely with the game system. Therefore, when designing PVE, the focus lies on scenarios involving a single player—specifically, designing all possible player interaction options and the corresponding feedback from the system.
如果把玩家对系统的交互看作输入,系统对玩家的反馈看作输出,在系统参数完全相同的情况下,对于相同的玩家输入系统都会给予完全相同的反馈,那这个系统就是 “可验证” 的。这个特性很重要,因为只有在游戏系统是可验证的情况下,我们才能在 CKB 上验证玩家的系统交互操作的合法性。 If we consider player interactions with the system as input and the system's responses to the player as output, then a system is considered "verifiable" when, given identical system parameters, the same player input will always produce the same system output. This characteristic is crucial because only when the game system is verifiable can we validate the legitimacy of a player's interactions with the system on CKB.
WarSpore · Saga 游戏的 PVE 模式虽然是基于 Roguelike 原则设计的,也就是玩家的每局游戏体验会被一个初始随机数种子所影响,但因为游戏采用的是 VRF(可验证随机数函数)技术,即通过伪随机的方式来实现 PVE 模式的可验证性。 Although the PVE mode of WarSpore · Saga is designed around Roguelike principles—meaning each player's session is influenced by an initial random seed—the game employs VRF (Verifiable Random Function) technology. This means that even with its pseudo-random mechanics, the PVE mode remains fully verifiable.