---
# System prepended metadata

title: Pirates Growth Proposal

---

# Pirates Growth Proposal

## Project Background

Tags: `protokit` `arcade` `MMO` `realtime`

**Pirates** is an exciting multiplayer strategy game where players command their own ships, sailing across a vast ocean to gather gold, battle other players, and navigate through dynamic, unpredictable environments.

### Game Mechanics

#### Start by buying a ship

In order to start a player must buy a ship with `gold`(a token tradable with *MINA*).

#### Collect Loot

You collect `loot` that spawn on the ocean and battle with other players to destroy them and get their `loot`.


#### Ship movement

The ship moves forward at a constant pace, and you can turn the ship by setting its `turn rate`. The ship path looks like a series of connected circular arcs.

#### Fire Cannonballs

The ship is equipped with a cannon that can fire in all directions upto some max `range`.
After the cannon is `aimed` their is a short `delay` before it actually shoots.

#### Islands
Players can dock at islands to purchase `cannonballs` or cash in their gold for rewards. 

___

The seas are treacherous, and losing a battle means dropping your loot for others to claim. The game will feature an expansive world filled with both risk and reward, where players must decide whether to press their luck for more gold or retreat to safety with what they’ve earned. 

The idea & concept of this game is conceived Eth Online 2024 Hackathon where it secured *1st* Place for zkGaming on Mina using zknoid.

### Testing

Unit tests for the contract will be written.
We will beta test the game once the game is playable.

### Modular code

The game will be designed to be modular, allowing developers to reuse and adapt its code for similar MMO games. By offering an engaging, easy-to-play experience, "Pirates" plans to demonstrate the potential of onchain gaming using mina and attract both players and developers.


## Architecture & Design
**Pirates** is designed as a zk rollup using proto-kit and zknoid. To maintain the feel of real-time strategy gameplay while operating within the constraints of blockchain technology, the game progresses in 1-second blocks. Each block represents a new step in the game, where player actions are submitted as transactions, processed, and all game states verifiable on-chain.

Diagram:
![image](https://hackmd.io/_uploads/ryFoWyI0C.png)




The game avoids the traditional approach of updating all game entities (such as ships and World states, NPCs etc) with every step. Instead, game states—like a ship’s position, direction, health, and cannon cooldown—are verified and updated on-chain only when necessary. For example, we can accurately calculate a ships position at a future time step using just its current position and velocity information, So when a collision happens we can easily verify it from the existing game object states. This design reduces the number of game object updates required, lowering the costs and making the system more scalable.

However, we also need another system (`World Tracker`) which players can query to see nearby enemy ships, loot crates, and islands in real time. Querying the blockchain for this information repeatedly would be inefficient, especially when players only care about entities close to them.
#### Key Components

- Runtime modules
- World Tracker
- Web Frontend


### Vision
We believe that introducing fun, engaging mechanics can make pirates more exciting while inspiring other developers to create innovative MMOs in Web3.

Some of the mechanics that could be added in pirates are -
- Islands can produce resources and can defend themselves from hostile pirates.
- Islands can send voyager ships for trade or expansion.
- Players can attack islands or voyagers for loot but will be banned by the corresponding island.
- Relics provide special abilities like fast sailing or enhanced loot.
- Uncharted zones contain powerful sea-monsters that must be defeated to expand into new islands.

A more detailed description of all these ideas are listed in this separate markdown.
[Read more about the new ideas here](https://hackmd.io/@bv9uIPaRQn-x9t-Ll6FRng/rJKG7J4AA#New-Ideas-in-Consideration).

**Note:** We will only make the basic gameplay in this proposal.
### Existing Work
- [showcase (eth global)](https://ethglobal.com/showcase/pirates-84j7d)
- [source code on github](https://github.com/rudrakpatra/zknoid)
- [game concept demo](https://pirategame.vercel.app/) & it's [source code](https://github.com/rudrakpatra/pirate_game)

<!-- ### Production Timeline

We plan to beta test the game with a community of players.
 -->

##  Budget & milestones

- **Deliverables**:
    - a *Landing Page* for the game, with smooth onboarding experience.
    - improve the Game UI. add new components for docking/undocking from islands, shop, exit menu, etc.
    - implement runtime logic for islands, weapons and other things like exchanging gold to cannons etc.
    - implement `World Tracker`.

#### **Mid-Point milestones:**
* Contract (with Unit Testing)
* Backend Server (World Tracker)
* UI & Game Design

#### **Project Timeline :** 3 Months
| Subtasks        | Est. Time |
| :---------------- | :------: |
| Contract (with Unit Testing)|   1 month   |
| Backend Server (World Tracker) | 1 month |
| Frontend | 2 months  |
| UI & Game Design | 2 weeks |
| Game Assets & Sound Design | 2 weeks |
| Setup Community Play Test  | 2 weeks |
| DevOps & Cloud hosting | 1 week |

*Note: All subtasks run in parallel as per project needs.*

#### **Budget Requested :** 55,000 MINA


####  **Budget Breakdown:** 
| Subtasks        | Price (in *MINA*)|
| :---------------- | :------: |
| Contract & Unit Testing|   10000   |
| Backend Server (World Tracker) | 10000 |
| Frontend |   20000   |
| Game Assets & Sound Design | 2000 |
| Community Beta Test |  8000  |
| DevOps, Cloud hosting and other  | 5000 |

####  **Wallet Address:** 

`B62qmQBqt6QyBvgXU4HtyNr5Jx1CP5Pk8TsZPJp7weTtXVcdoxM5im2`

## Team Info
-  **Team Members**: 
    -  Rudrak Patra(Proposer)  (dragonlord2712) [Github](https://github.com/rudrakpatra)
        -  Web developer, 1yr experience working with mina
        -  build [zkchess](https://github.com/rudrakpatra/zkchess) as part of mina Navigator season 1
        -  Secured 1st Place in Eth Online 2024 for zkGaming on Mina using zknoid
    
    -  Raunaque Patra (thedude_og) [Github](https://github.com/Raunaque97)
        -  Was part of mina Navigator season 1 and completed zkIgnite cohort 2 succesfully [link](https://zkignite.minaprotocol.com/zkignite/zkapp-track-cohort-2/funded/suggestion/547)

## Risks & Mitigations

#### Real-Time Data Sync Issues
Risk: Delays or mismatches between real-time off-chain data and on-chain game state might cause inconsistencies.

Mitigation: Use optimized World Tracker queries for minimal delay.

#### Blockchain Scalability
Risk: High player activity could overwhelm the zk rollup system, leading to slower processing times.

Mitigation: May use zkCloudWorker to scale horizontally.

## Conclusion
This proposal presents a promising opportunity to elevate Pirates to new heights of engagement and community involvement within the Mina ecosystem. By enhancing gameplay, driving community-led initiatives, and deepening ecosystem integration, Pirates has the potential to become a standout application for Mina, showcasing the capabilities and future of real-time on-chain gaming.

Our modular system will empower other developers to use **mina** network to build on-chain MMO games. The requested funding will enable our team to fully dedicate ourselves to this vision, driving innovation and community growth in the coming months.

