Sui 8192: How to Shake Up the Gaming Field with Sui Objects

Ethos demonstrated not only the power of objects over Sui with its Sui 8192 game , but how object-based games could powerfully shake up the gaming industry. Each player mints a new object as they move blocks in the game, similar to minting an NFT, which gives each independently played game the chance to be permanently on-chain.

The rule of the Sui 8192 game is to slide the number blocks in four directions up, down, left, and right. After the same blocks are matched, the numbers are added until the player spells out the number 8192. Every time the block moves, a transaction is triggered, changing the state of the game object.

In Sui 8192, players make numbers add up by combining identical squares, eventually reaching the highest value of 8192

Although it's a simple game, the Sui 8192 brings enormous possibilities to the gaming industry. Not only does it popularize on-chain gaming, making it playable from any device connected to the internet, but the games themselves are also persistent and exist as part of a player's digital asset. While trading or gifting a game you've already played may not be very practical right now, this feature sets an example for other apps, such as collaborative productivity tools.

object programming

Objects are the basic storage unit on Sui, everything from NFTs to trading platforms. They have infinite programmability, the only limit is the developer's imagination. Programming an object requires only a few fields, such as a unique ID. Additionally, dynamic fields enable developers to explore a wide variety of ideas.

Ethos built Sui 8192 as the first fully on-chain Sui game. The interface is written in JavaScript, CSS and HTML, and each newly minted Sui 8192 object contains game logic. Describing this programming model, Ethos writes: "With only one layer (blockchain) instead of multiple layers (e.g. server and database) as in Web2, Sui 8192 makes everything more self-contained and easier to interact and maintain."

Given the visual elements of the game, it can also be considered a dynamic NFT. In this regard, it showcases the unique feature of NFTs on Sui, which can change appearance based on user input. Sui 8192 showcased many interesting new use cases for NFTs, such as using NFTs for app interfaces.

The code below shows the base game object for Sui 8192:

struct Game8192 has key, store {
	id: UID,
	game: u64,
	player: address,
	active_board: GameBoard8192,
	move_count: u64,
	score: u64,
	top_tile: u64,
	game_over: bool
}

These fields define the basic information of the game. The player field is the owner of the object. Fields such as move_count and score reflect the current state of the game. They remain unchanged until the player makes a new move.

As a single exclusive item on Sui, players can gift their game (whether in-progress or completed) to anyone else. As an option, players can pass the game around to each other, alternating moves.

How to play

As a seemingly simple but addictive game, Sui 8192 allows players to match the same number to increase the value of the block, trying to reach the block with the number 8192. The competition is to create the final number cube in the fewest number of moves.

Each step is an instant, online-processed transaction, a testament to the high performance of the Sui network.

Sui 8192 serves as a demonstration showing the processing of real-time network transactions as each step is moved

Each game move requires a gas fee as a transaction. Ethos has integrated a pre-approval mechanism in its wallet to make the game easier. At the beginning of each game, the wallet starts and allows players to set a specific token amount to pre-approve, so that the wallet does not need to ask for approval at every step.

the future of gaming

The Sui 8192 may not be as flashy as the latest immersive world-class titles, but simple games can occasionally win global acclaim. Think how many people played Minesweeper on early Windows PCs in the 90s, or Tetris, which took the world by storm. Utilizing the power of over-the-top objects, games can quickly become popular across the globe, lowering the barrier to entry for games.

Ethos created Sui 8192 to inspire other developers and demonstrate what Sui is capable of. The company's games and leaderboards are open source , as a reference, you can always make suggestions through contact email or Twitter.

We're also just starting to see how games programmed as objects on the Sui can unlock more potential. Although Ethos puts Sui 8192 in the Sui ecosystem, each game is actually owned by the player. How players will deal with their digital assets, let us wait and see!

About Sui Network

Sui is an L1 public chain redesigned and constructed based on first principles, aiming to provide creators and developers with a development platform capable of carrying the next billion users in Web3. Applications on Sui are based on the Move smart contract language and are horizontally scalable, allowing developers to support a wide range of application development quickly and at low cost. For more information: https://linktr.ee/sui_apac

Official WebsiteTwitterDiscordEnglish Telegram GroupChinese Telegram Group

Guess you like

Origin blog.csdn.net/Sui_Network/article/details/131663370