In Cosmocadia, NFTs Farm the Land

Lucky Kat Studios used dynamic, composable NFTs on Sui for the playable characters in Cosmocadia, a casual farming game.

In Cosmocadia, NFTs Farm the Land

Cosmocadia, a new game from Lucky Kat Studios, demonstrates how Sui NFTs can walk around an environment, plant and harvest vegetables, and make tools and furniture at a workbench. Future updates leverage NFTs such as private lands, and even let players bring their SuiFrens NFTs into the game.

Described as a "casual farming game" by Bente Bolland, Product Manager at Lucky Kat Studios, Cosmocadia bears some similarity to Nintendo's Animal Crossing. As a game built on Sui, however, Cosmocadia will be accessible to anyone with a computer. A mobile version is also on the roadmap.

Cosmocadia avatars lie on the grass
Cosmocadia's playable avatars are NFTs, and can be traded outside of the game.

Cosmocadia launched with an initial mint of 5,500 NFT avatars, the characters used to play the game. The portability of NFTs means that many of the original recipients have made their NFT avatars available to trade for SUI tokens on the Clutchy NFT marketplace. The game designers also introduced the concept of rarity to the NFT avatars, with rarer avatars including specialized skills such as being more effective farmers.

Lucky Kat Studios offers a playable demo of the game for those who want to try it, and expect to launch a free-to-play version of the full game in 2024.

Gameplay

Cosmocadia players move their avatar around a simple landscape using arrow or WASD keys in a browser window, and take actions using mouse buttons. The landscape includes grass, dirt, plowed land, and resources such as boulders and trees. Players store tools, crafted items, seeds, and other resources in their inventory. A store lets players buy items using the in-game currency while a workbench serves as a crafting station.

Players use an axe to cut down trees, a pick to break apart boulders, and a hoe to prepare any open ground for planting. Trees and boulders give the player resources and recipes to build things at the workbench. A typical way to earn coins involves planting seeds, then harvesting the resultant crop and selling it at the store. Quests give the player opportunities to earn more in-game currency.

Beyond earning coins, player goals involve learning to build new things at the craft station, accessorizing their avatars, and customizing their environments.

The character inventory screen, showing slots for accessories
Players can equip up to 10 accessories on their avatars, giving them a unique look.

At launch, Cosmocadia includes 10 equipment slots players can use to customize their avatars. Rare avatars get special perks, such as having their crops grow quicker.

NFTs and Smart Contracts

Lucky Kat Studios built the game on the Unity engine, a cross-platform game engine using C# and C++. The browser-based version uses a WebGL front-end built with HTML and JavaScript. The game's NFT functionality, including the avatars' composability, was programmed in Move. On Sui, NFTs are essentially objects with a visual appearance. Lucky Kat Studio developers pushed the boundaries in making these NFTs expressive and functional.

The entire Cosmocadia world, including the exploitable trees and boulders, could have been programmed as objects. However, doing so would result in each interaction being written on the blockchain as a transaction, driving up costs for the user and making the game very expensive to play. Given this consideration, the team decided to keep such behaviors off-chain for the foreseeable future.

Cosmocadia avatars farm a field
Players plant seeds that grow into crops in Cosmocadia, although instead of NFTs, those seeds and crops are saved as game data instead of on the blockchain to reduce transaction costs.

The Lucky Kat Studios team built smart contracts on Sui to manage some of the in-game interactions, such as accessorizing an avatar with a shirt or backpack. The smart contract alters the NFT, adding the existing equipment data to it. Building these smart contracts was no easy task, considering that the developers were coding in a very new language and environment.

"As one of the first gaming projects on Sui, one of the challenges was creating smart contracts that could define the complex relationships between objects that we envisioned," said Bente. However, she also pointed out that Sui was designed from the ground up for gaming. "Developing smart contracts for games has never been as natural and intuitive as with Move on Sui."

Future Updates

At present, Cosmocadia players will find a solitary environment where they can complete quests, acquire in-game currency, and learn the game mechanics. However, the game's future roadmap includes many exciting new features, and some innovations only possible on Sui.

The next big challenge, according to Bente, will be turning the game into a multiplayer world. The developers will need to set up a shared game world and introduce rules on how players interact with other avatars and lands. The multiplayer experience will include a marketplace where players can trade in-game resources.

Along with turning Cosmocadia into a multiplayer world, the next big update will involve letting players have their own private areas. These private lands, as they are called, will be built and minted as NFTs. The player can customize their private land and invite other players to join them in these areas.

One of the most exciting updates will introduce external NFTs into the Cosmocadia world, demonstrating one of Sui's powerful and unique features. Players will be able to bring their SuiFrens, collectible NFTs created by Mysten Labs, into Cosmocadia. SuiFrens won't have the same capabilities as the Cosmocadia avatars, instead acting as companions to the avatar. They follow the player avatar, and can help with quests.

animation showing SuiFrens Capys following a Cosmocadia avatar
Capys from SuiFrens follow the Cosmocadia avatar and assist it on quests.

Lucky Kat Studios’ plan for SuiFrens in Cosmocadia extends to future updates where players might explore new areas outside of their own land with the help of their SuiFrens, although ultimately the team wants to preserve the idea of a calm experience where players can build and take ownership of their digital assets.

Gaming Revolution

Blockchains originated as transactional networks, limiting their general functionality. With Cosmocadia, Lucky Kat Studios demonstrates how skilled game developers can make use of Sui's next generation blockchain technology to deliver a game-first experience. At the same time, Cosmocadia benefits from the blockchain’s unique features, such as NFT portability and asset ownership, to surpass other projects on existing gaming platforms.

Many industries will benefit from Sui's networking technology, but gaming seems to be an early winner. Sui allows pioneering developers such as Lucky Kat Studios to work together with others in the ecosystem and focus on converting Web2 players to Web3 in a gamified manner. Games built on Sui allow for unique interoperability and trading networks, both in and outside of gaming worlds. Builders only need to understand Sui's capabilities to let their imaginations run free.