Pirates

Players navigate ships, collect gold, and engage in naval combat in a vast oceanic world.

Visit Repo
Pirates banner

About

"Pirates" is planned to be a massively multiplayer online (MMO) game that blends blockchain technology with decentralised gameplay. Players navigate ships, collect gold, and engage in naval combat in a vast oceanic world. Using zknoid, ship movements, collisions, and transactions are securely validated on-chain, while an off-chain server manages real-time game state and spawns new collectibles. This hybrid system ensures both security and efficient gameplay. Checkout concept game : https://github.com/rudrakpatra/pirate_game https://pirategame.vercel.app/

Tokenomics and Resources:

The game use a single token - PirateCoin (PC's). Player stake some PC for ensuring fair play.

The game has two in-game resources:

gold - used to buy cannon balls. cannonballs - used to attack other ships. Main Challenges: To make the game truly decentralised, we are storing all the important data on-chain. As the number of players is massive. We cannot simulate all the players and game objects every frame/block. Also, reading the game state from the chain is unoptimised.

Game Mechanics:

Each player starts with a ship spawning from a port. The player either sail in the vast ocean looking for gold, or try shooting down other players to get their loot.

Ship movement

In this game players will control their ship via blockchain transactions. The ship always move forward at constant speed. The player can turn their ship sideways by changing the turn rate (increments of 5) and submit a transaction. The change is reflected from the next block. Whenever a ship changes its turn rate. The on-chain state of the ships location gets updated. We only store shipLocation, currentDirection & turn rate of the ship. This is enough to compute the future location of the ship at some time t.

Ship Combat:

Ships can fire cannonballs at other ships. When a player wants to fire. He commits a shoot order. After the order gets filed, he must wait for some W blocks (W is the wait time). After W blocks he must reveal the location where had shot. This way some cannon shots are revealed every block. If some ship is hit by a cannon at time t, to prove it we can show that the ship position lies inside the cannon ball's damage circle.(ZKP) Ships will have a health. The ship is destroyed if health reaches 0. It is possible that a collision may remain unreported. We get around this by making the reporting beneficial for at least some actor, incentivising him/her to report it.

Collectibles:

Ships can collect gold from the ocean. Each gold collectible has a random value. The value is determined randomly upon collection and stays hidden to the player who collects it.(ZKP) Say player A's ship is destroyed by player B. A must reveal the gold he collected (A has staked some PC) and collected by B.(ZKP) New gold can be spawned by a transaction. New gold should spawn at a random location.(ZKP)

Staying in the ocean is dangerous. Other players can destroy your ship and take your gold.

Ports:

Simply speaking, ports are marked circular areas in the game world. If your ship moves inside such an area, you can visit that port.(ZKP) On visiting, you will be taken to the port menu to do the following:

Buy cannonballs with gold. Leave the port and start sailing (collected gold -> PC). Leave the game (collected gold -> PC). When you play the game for the first time you will be asked to buy a ship (using PC). You can buy a ship from any port you like but the price of a ship is different at each port. Advantages of ZKP: Security: zknoid ensures that all transactions and actions are securely validated and recorded on-chain, preventing tampering and ensuring fair play.

Efficiency:

To reduce the no. of reads from the chain. We will maintain an indexer server which will look for changes in the game state. This server will simulate the game off-chain (report the collisions). For each correct report you will get a small commission in form of PC. You can burn 1 PC to spawn R gold collectibles at random locations in the game world.

The hybrid approach of using an off-chain server for real-time game state management reduces blockchain load and improves performance, making gameplay smoother and more responsive.

Conclusion:

"Pirates" offers an immersive MMO experience with secure, self-balancing and efficient blockchain integration, providing a thrilling naval adventure in a decentralised world.

Prizes

  • Mina Protocol · zkGaming on Mina · 1st place

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Power Clash

Step into the world of fair gaming with our blockchain-powered game which is built on top of ZkNoid SDK

ZiBet

ZiBet is a next-gen Web3 gaming and betting platform built on the robust foundation of Zircuit. It seamlessly blends competitive games with secure betting mechanisms, offering a fair, engaging, and entertaining experience.