-
-
Fishin' Friends - a fully on-chain mmo lite where players sail the Cozyverse in search for fish and treasure!
-
A smart contract ecosystem replaces traditional game microservice architecture. E.g. The world grid and travel is managed on-chain
-
Contract architecture for Fishin' Friends. Boxes highlighted in orange were completed in the hackathon
-
Players can equip boat and rod skins (NFTs) to customize their experience. Skins are acquired in the Cozy Shop
-
Cozy Islands - a fully on-chain island experience where players can create their dream virtual getaway
-
Players mint land NFTs and are able to decorate their islands with items (NFTs) found around the Cozyverse
-
On-chain architecture that will support playing on 3rd party land NFTs & dynamic asset generation
-
Cozy Items is an ERC1155 contract that manages all Cozyverse playable items
-
Play in the Cozyverse with your favorite NFT. We have 15+ projects integrated and counting
-
Bring back the WAGMI meta!
-
The Cozyverse is built by a passionate group of game industry vets who want to take advantage of what blockchain tech offers to gameplay
Note to Judges: our staging environment requires players to own one of 15+ integrated NFTs to join. Please email/DM Zoogie to receive a Cozy Penguin to test out the ecosystem in a live environment.
2022-08-22 edit: cleaned up mark down formatting in the project summary
Inspiration
The Cozyverse is an ecosystem of fully on-chain games on Polygon, where we aim to build games that take advantage of the unique gameplay that blockchain technology offers. We are focusing on fun as a first principle, and are recreating the experiences and emotions we had playing flash games and Neopets growing up but with a strong metaverse twist. Players can join and play as their favorite NFT (15 NFT integrations and counting).
For the Polygon BUIDL IT: Summer 2022 hackathon we focused on developing our upcoming two games, Fishin Frens and Cozy Islands.
Fishin Frens is a fishing mmo lite game where you sail across different regions in the Cozyverse to catch a variety of fish and treasure. We were inspired to build this game as a response to the “Great Blizzard” of Q4 2021 when the Pudgy Penguin community expressed frustration towards the team not delivering a promised fishing game. From a technical perspective, we are excited to deliver a game with a fair amount of depth that replaces traditional online game microservice architecture with smart contracts (personalization, world grid, inventory, quests, etc…).
Cozy Islands is our take on NFT lands. A player can mint a Cozy Island, decorate it with items they acquire in the Cozyverse, and invite their friends to come hang out. The inspiration to build this game came from a crossover of Animal Crossing x gather.town, where the player can build their island imaginatively and can host a virtual social experience with their friends. We also saw several opportunities to test innovative mechanics, including on-chain configuration management, burning smaller islands to mint larger island NFTs and dynamic asset generation as players combine islands.
Where we started
The Cozyverse ecosystem existed prior to the start of this hackathon. Key achievements we’ve made so far:
- Launched Cozy Penguins, a free mint 10,000 NFT collection that are the first playable characters in the Cozyverse. The project minted out within 2 minutes of public sale and was the top traded NFT for 24+ hours post launch. Read more
- Launched Slingshot Sailors, our first fully on-chain game, to Polygon mainnet. Slingshot Sailors is a game where players pick slings to try to outrun the killer. The more players that join a sling the further it fires, however the chance of the sling snapping increases! We used Chainlink Keepers as the game manager and VRF to determine round outcomes. Read more
- Built and deployed a cross chain verification system using Chainlink oracles to verify NFT ownership in different chains. This allowed us to integrate NFT projects to our ecosystem outside of Polygon without custodial risk. At the start of the hackathon we integrated 5 NFT projects to the Cozyverse using this system. Read more
- Prototyped several game mechanics (fishing, movement) for our fishing game. This code was entirely scrapped at the start of the Polygon BUIDL IT hackathon to build with a production ready approach.
What we built / accomplishments
Fishin Frens
In the last two months our main focus has been to build out the core components of the fishing game and work towards a complete game experience.
- Built contracts from the ground up, focusing on solid contract architecture
- Built out the high risk component - personalization, where a player can equip different skins for their loadout (e.g. a boat and rod skin which are NFTs)
- Built a flexible game engine that combines React, PIXI, and ether contract handling so we can quickly develop the game, game UI, and be properly integrated with contract state
- Used the aforementioned game engine to build out our two core game scenes the ocean for the first biome, CozyReef, and the first port within the biome CozyPort.
- Integrated our cosmetics contracts into the CozyPort, which allows a player to swap out cosmetics they will be able to purchase from our store and play with the cosmetics in the game.
Cozy Islands
We successfully built an MVP of the Cozy Islands, where:
- The player can mint a one of many base island NFTs
- Place Cozyverse items on their island and save it to a personalization smart contract
- Walk around their custom designed island
Cozy Shops
In order to test out the personalization contracts in both Fishin Friends (equipping boat and rod skins) and Cozy Islands (adding items to your island) we built Cozy Shops that sell Cozy item NFTs in exchange for Cozy Coins, our ERC20 token. This included several shop types:
- Shop that sold welcome “bundles” to players from newly integrated NFT projects
- Shop that sells basic items (similar to a “general” store in your favorite RPG)
- Shop that sells allowlist spots to upcoming sought after NFT sales
Integrations
During the span of the hackathon, we integrated an additional 10 projects to the ecosystem, giving up to 100,000 players access to our ecosystem.
How we built it
Fishin Frens
Smart contracts: with the exception of a webserver to show real time movement (non stateful interactions), all game logic for Fishin Frens will be managed on-chain through a composition of smart contracts that mimic current day microservice architecture. While we didn’t finish all the components for a complete game, we built:
- World contract - manages the world grid and each players’ location
- Player contract - manages the state of each player
- Biomes - manages each unique region, such as the drop table of the fish
- Cosmetics - manages personalization, such as a boat and rod skin that changes the aesthetic
Scenes: We built out several scenes with transitions, which include:
- Sailing scene - where the player is on the ocean in their boat
- Port - the player can walk around the port to check quests, sell fish, and configure their boat. For the hackathon we only enabled boat configuration
Game engine: we invested a fair bit of effort into building a web based game engine using PIXIjs and React, alongside ether for on-chain state management. We’re extremely pleased to create a developer experience for ourselves that feels similar to non-web game dev such as Unity
Cozy Islands
Smart Contracts: There are several smart contracts that support Cozy Islands:
- Cozy Islands - ERC721 contract that represents each island
- Verifier / Registry - registers the Island NFT to the Cozyverse. This gives us flexibility to do cross chain verification in the event we want to integrate other projects’ land (e.g. Otherdeeds, Squishilands, etc…)
- Personalization - allows the player to place Cozy items onto the island and “bind” it, giving custody those items to the personalization contract
UI: The gameplay UI was built using react components. This will be migrated to use the PIXI/React game engine that was developed in the fishing game
Minting site: We built an early version of the minting site for Cozy Islands
Cozy Shops
Smart Contracts: We aim to have all items in the Cozyverse come from a single ERC1155 contract. We built the contracts with the following pattern:
- CozyItem - a single ERC1155 contract representing all Cozyverse items
- Bundle Store - a store contract that manages the sale and distribution of item bundles. This contract has permission to mint from the CozyItem contract
- Permanent Store - a store contract that manages the sale and distribution to fixed price no limit “basic” items. This contract has permission to mint from the CozyItem contract
UI: The UI was built in React
Integrations
We integrated 10+ NFT projects to the Cozyverse during the hackathon period. In order to streamline this process we built a lot of tooling that cut engineering time down to 30 minutes per project integration:
- Tools to quickly sync and cache the metadata and assets of the NFT project
- CLI commands to register the project to the ecosystem & cross chain verifier
- Generic loaders that will load the NFTs an address owns based on the contract type (ERC721 vs 721Enumerable vs 721a etc…)
Infrastructure
Our deployments are managed through github actions and our infrastructure is deployed to AWS:
- dApps are hosted on S3, with route53 entries and cloudfront distribution
- Secrets are managed in SSM parameters
- Services are managed via ECS fargate clusters (Chainlink oracle, slingshot sailors server)
- All AWS infrastructure is managed in terraform
Challenges & Lessons
The main challenges the team faced were all scaling issues. As individual members worked faster and the code base grew we ran into several instances where lack of architectural foresight slowed us down. We have action items to address all the challenges presented below and will do so post hackathon!
As the number of websites in the ecosystem increased (Cozyverse, Cozy Penguins, Cozy Lands, Cozy Labs), it became very apparent that we needed a design system to standardize the look and feel of all our apps. The UI is disjointed across our ecosystem and if we had a single design system we can quickly evolve the UI of all our apps at once
With the number of assets increased, the need for a robust content management system became apparent. We would greatly benefit from tooling that kept all on-chain assets in sync, as well as how those NFTs would be represented in our game. We’ve run into several instances where it became difficult to keep track of shared assets across the games, such as the animated characters
Our minting site for Cozyland was built in a separate repo than the Cozyverse app. We had syncing issues with the Cozyland ERC721 contract where we’d update the contract code in one repo but not update it in the other, which caused unclear runtime errors during testing. We need to better think out how to organize code across different product spaces in the Cozyverse as well as better code sharing / package management processes
What's next for Cozyverse
Fishin Frens
We’ll continue building out the remaining components to deliver a full game experience where the player can explore various regions and fish. The remaining technical work here are:
- Attributes contract to manage configurations on the boat & rod. An example is adding a storage augment that increases the number of fish you can carry before needing to return to port
- Inventory contract to manage the fish that you catch as you sail the seas
- Quest contract to manage… quests! Completions of quests will unlock new regions and boat upgrades
After we launch the v1 of the game to Polygon mainnet - we will continue to build out the depth of the game through new regions and fish. We’re also excited to explore “boss fights” where multiple players need to participate to catch legendary creatures.
Cozy Islands
The last piece of core tech we’d like to prove out is the player’s ability to burn existing land tokens to create larger land. Afterwards, we’ll be adding more polish to the UX & the game experience and prepare to launch to mainnet!
- Build the v1 recipes contract, which will have pre-configured land upgrades with specific base land costs. This allows us to pre-load the metadata & asset
- Polish the UX, making it more intuitive for a player to mint the land, optionally combine, then load into the Cozyverse to play
- Polish gameplay, such as managing cleaner object collision and build on different vertical heights on the island
Post mainnet launch deliverables:
- Built the v2 recipes contract, which allows users to create custom island shapes and dynamically generate the NFT assets using Chainlink oracles
- Build webserver to allow real time interactions on your island with your friends Add intractability with the items you put on your island. E.g. If you interact with your arcade a mini game will load up
New Regions
Our long term vision for the Cozyverse is to build out several regions that have unique aesthetic, story, and games. With the delivery of Cozy Islands and Fishin Frens we’ll have concluded development of our first region, Cozy Reef.
We’re beginning to storyboard our next region, which will be a cursed island where players will need to solve the mystery and save the residents through playing a series of blockchain games!
Built With
- amazon-web-services
- hardhat
- pixi
- react
- solidity


Log in or sign up for Devpost to join the conversation.