ZkNoid / zknoid

https://zknoid.io
10 stars 13 forks source link

ZkNoid: the next generation games ideas #12

Closed asimaranov closed 1 day ago

asimaranov commented 3 weeks ago

Title:

ZkNoid: the next generation games ideas

Bounty Description:

Mina can prove everything.. literally. You have been chosen to prove it.

ZkNoid is a home for games that use Zero-Knowledge proofs in their mechanics. The groundbreaking cryptography approaches improve game process of the games listed on our games store. The mission of ZkNoid is to provide all the infrastructure for game developers to reach the new level of capabilities by provable parts integration. SDK for developers if offered to be easily integrated.

Our first task for the Astromina platform will require some ingenuity and imagination. To share the track reward, you need to come up the ideas for ZKP utilization in games. We accept several options of ideas. You can come up with the entire provable game or a mechanic utilizing ZKP that would improve some existed game

Core benefits of are here: 🙈 Information hiding. Imagine a battle where player can attack an opponent without revealing his hero’s skills. Zero knowledge proofs can prove literally everything while preserving the next level of data privacy control

🤝 Transparency and Trustworthiness: #zk provable games allow players to independently verify the fairness of any outcome. This transparency helps to build trust among players, as they know that the game cannot be rigged.

📜 Immutable Records: Using #blockchain technology, game outcomes and #transactions are recorded in an immutable ledger, ensuring that none of the parties involved can alter the results afterwards.

💸 Low fees. Games on ZkNoid platform require to verify not the game logic execution BUT the cryptographic PROOF of the game logic execution. Block creators spend less effort on execution making the games playing cheaper

🥞 High scalability. Cryptography allows to connect different ZK native networks using proofs. Games can launch their own #appchain solutions like @proto_kit or use @ZekoLabs. Matchmaking can be moved to appchain to be free for players. Assets from Zeko network may be used in game

To have some game idea inspirations you could check

Some ideas from our platform games:

Acceptance Criteria:

Define the criteria that must be met for the bounty to be considered complete:

Bounty Reward:

Deadline:

07.09.2024

Submission Instructions:

Provide an idea and a description of the provable part in markdown. Leave it as a comment for the issue

Additional Information:

Feel free to asks any questions in ZkNoid discord: https://discord.com/invite/aQt9HPZQ

Know more about ZkNoid in social networks Twitter: https://x.com/ZkNoid Blog: https://medium.com/@zknoid Website: https://zknoid.io/ ZkApp: https://app.zknoid.io/ Docs: https://docs.zknoid.io/docs GitHub: https://github.com/ZkNoid

Notes:

asimaranov commented 3 weeks ago

/price 600

atakancsar commented 3 weeks ago

Game Overview

At the start of the game, players will receive 2 NFT characters, each possessing one of four different elements: Fire, Water, Earth, and Air. Some elements are superior to others; for example, Water is stronger than Fire, and Fire is stronger than Earth. Players will face various bosses, each associated with a specific element. Players must strategically select characters based on their elements to defeat these bosses. If a boss is defeated, players will earn rewards based on chance, which can be staked to generate income. Additionally, players have the option to either send their characters into battle or breed them to create new types of characters. Characters can also be bought from the in-game market for a set price.

Game Systems

  1. Character Breeding
  2. Reward Staking for Income Generation
  3. Market System
  4. Energy, Age, and Element System
  5. Leveling Up and Power-Up System

Optional Systems

  1. Character Feeding
  2. Age and Death System
  3. Tournament Rewards
  4. Team and Group Formation
  5. Character Equipment
  6. Daily Quests and Special Events
akbabafurkan commented 3 weeks ago

ZKP-Based Card Collection Game: “Mystic Cards”

Game Concept:

“Mystic Cards” is a card collection game where players gather various fantastical cards, engage in strategic battles, and strive to defeat their opponents. The core feature of the game is that the power and abilities of the cards remain hidden, adding a layer of strategic depth. Zero-Knowledge Proofs (ZKP) are used to verify the validity of the players’ cards without revealing their details to the opponent. This makes the game both exciting and fair.

Game Mechanics:

1.  Card Types and Features:
•   Card Types: The cards are divided into different classes: Warriors, Mages, Healers, Beasts, etc. Each card has a specific power level and special abilities.
•   Privacy: The power and abilities of each card are known only to the player who owns them. Opponents can see the general category of the card (e.g., Warrior, Mage), but they cannot see the detailed information.
2.  ZKP Utilization:
•   Protection of Private Information: Players prove the validity of their cards using ZKP. For instance, when a player uses a “Warrior” card to attack, they can prove that the attack is valid without revealing the card’s exact power or special abilities.
•   Verification of Battle Outcomes: At the end of each battle, the winner and loser are determined using ZKP, ensuring that the battle was fair and within the rules.
3.  Gameplay Loop:
•   Drawing Cards: At the start of each turn, players draw a certain number of cards. The type and power of the drawn cards are random, but their features remain hidden.
•   Placing Cards: Players place their cards on the board and take turns making moves. Each move is verified using ZKP.
•   Attack and Defense: Players attack their opponent’s cards or perform defensive maneuvers. During this process, ZKP is used to verify the validity of the moves, but the specifics remain hidden.
•   End of Game: The game ends when all cards are used or one player’s cards are all defeated. The winner is determined using ZKP, and the results are recorded immutably on the blockchain.
4.  Scoring and Rewards:
•   Scoring: Players earn points for each victory. Points are awarded based on the power of the cards, strategic moves, and the battles won.
•   Leaderboard: Earned points are added to a leaderboard, and the achievements of all players can be transparently viewed on the blockchain.
•   Special Rewards: Players who achieve specific milestones receive rare cards or special abilities as rewards, which are also verified using ZKP.

Advantages of ZKP in the Game:

•   Strategic Depth: ZKP allows players to keep the details of their cards hidden, adding strategic depth to the game. Players must predict their opponent’s moves.
•   Privacy and Security: Players can gain an advantage by keeping the true power of their cards hidden. However, ZKP ensures that the cards are still valid.
•   Fair Play: ZKP ensures that the game is conducted fairly, as all moves and outcomes can be verified and immutably recorded.
•   Expandability: The game can be continually developed with new card types, abilities, and strategies. ZKP ensures that these new additions are integrated securely and fairly.

Conclusion:

“Mystic Cards” is an exciting card collection game that leverages the power and flexibility of ZKP. Players must strategically place their cards while predicting their opponent’s moves. The game offers an engaging and challenging experience for both newcomers and experienced players. The privacy and security provided by ZKP ensure that the game is conducted fairly and transparently.

Tayfun545455 commented 2 weeks ago

/600

kerem6790 commented 2 weeks ago

I believe one of the worst parts of online gambling is that you have to trust the dealer. How do they ensure the randomness? Are they legit? I think ZKPs can solve these. By securing randomness via ZKPs can remove the need for trust in GambleFi games. These can include all kinds of card games to any game including luck. But there are already ZKP powered games like poker etc. My inovation is to bring ZK powered KYC in into these games. Because nowadays bots can manipulate the games and just play by the book. Maybe KYC wouldn't fully solve this but i believe it would be very useful. onchain randomness + zk KYC + proving players moves with ZKP is the most secure way possible for a gambler. This idea can be implemented for every kinds of card games.

Pfed-prog commented 2 weeks ago

I believe one of the worst parts of online gambling is that you have to trust the dealer. How do they ensure the randomness? Are they legit? I think ZKPs can solve these. By securing randomness via ZKPs can remove the need for trust in GambleFi games. These can include all kinds of card games to any game including luck. But there are already ZKP powered games like poker etc. My inovation is to bring ZK powered KYC in into these games. Because nowadays bots can manipulate the games and just play by the book. Maybe KYC wouldn't fully solve this but i believe it would be very useful. onchain randomness + zk KYC + proving players moves with ZKP is the most secure way possible for a gambler. This idea can be implemented for every kinds of card games.

This is where Baccarat and Black jack are the ideal casino games for ZKPs

Ranaco commented 2 weeks ago

Guess Who(GW)

A zk adaptation of the classic Guess Who game, implemented in Mina protocol using ZKnoid (and Protokit).

Game Overview

"Guess Who" is a two-player game where each player tries to guess the identity of the other player's hidden character by asking a series of yes or no questions. By integrating with ZKnoid, the game would offer fast, gasless transactions and secure gameplay where each player's moves are verified without exposing their strategy by creating runtime modules for the game logic.

Game Logic

In this game, each player selects their character, verified using ZK proofs. Players take turns asking yes-or-no questions about the physical characteristics of the hidden character (e.g., "Does your character wear glasses?"). Based on the opponent's answer, players eliminate characters from their board that do not match the description.

GW's runtime module ensures that all questions and answers are processed within a zero-knowledge circuit, meaning that no sensitive information is revealed during gameplay. It also maintains the record for each game, the player's score, and the reproducible state of the game.

Expected features

Game Preview

Image

Edit:

PS: We're building this game for EthGlobal Online 2024 hackathon.

AlexanderYudin commented 1 week ago

Mafia on the Blockchain: Transparent Gameplay with Preserved Anonymity

Game Concept:

"Mafia on the Blockchain" is a digital adaptation of the popular social deduction game "Mafia," where players take on the roles of innocent townsfolk or hidden mafia members. The primary objective is for the townsfolk to identify and eliminate the mafia before they overtake the town. A crucial aspect of the game is the secrecy of player roles and actions. By utilizing Zero-Knowledge Proofs (ZKP), the game ensures fairness and anonymity, keeping the suspense alive until the very end.

Game Mechanics:

1. Role Assignment:

At the start of the game, each player is randomly assigned a role (e.g., townsfolk, mafia, doctor, detective). The role assignment is verified using ZKP, ensuring that no one, including the players, knows each other's roles, but everyone can trust that roles were assigned fairly.

2. Night Actions:

During the night phase, each player performs actions according to their role (e.g., the mafia select a target to eliminate, the doctor chooses someone to save, the detective investigates a player's role). All actions are confirmed using ZKP, guaranteeing their validity without revealing any information to other players.

3. Discussion and Voting:

In the daytime phase, players discuss and vote to try to identify the mafia. ZKP can be used to facilitate anonymous voting, ensuring that the vote count is accurate while keeping individual votes secret.

4. Determining the Winner:

The game ends when either all mafia members are eliminated or they achieve numerical parity with the townsfolk. The winner is determined based on ZKP, which ensures a fair and transparent outcome without revealing unnecessary information until the game is over.

Game Systems:

Advantages of ZKP in the Game:

Conclusion:

"Mafia on the Blockchain" offers a fresh take on the classic game by leveraging ZKP to ensure fairness and anonymity. The game provides a thrilling and intense gameplay experience where each player can trust in the security and privacy of their actions. The integration of ZKP adds a new layer of trust and strategic depth, making the game even more engaging for participants.

rudrakpatra commented 1 week ago

Pirates.io

Game Concept:

Pirates.io is 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.

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:

  1. gold - used to buy cannon balls.
  2. 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. The more you collect, the higher is your bounty, compelling others to shoot you.

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:

  1. Buy cannonballs with gold.
  2. Leave the port and start sailing (collected gold -> PC).
  3. 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.io offers an immersive MMO experience with secure, self-balancing and efficient blockchain integration, providing a thrilling naval adventure in a decentralised world.

Pratham1812 commented 1 week ago

ZkNoid Monopoly

Introduction

I propose to develop a next-generation version of the classic Monopoly board game on the ZkNoid platform. This version will harness the power of Zero-Knowledge Proofs (ZKP) to bring transparency, fairness, and efficiency to all gameplay mechanics, ensuring an engaging and trustworthy experience for players. With ZkNoid's unique SDK and infrastructure, we can not only use a lot of the prewritten code but also we can elevate Monopoly into the blockchain era, incorporating NFTs, decentralized transactions, and provable randomness.

Core Game Mechanics

Player NFT Pieces

Each player in the game will be represented by an NFT, similar to how traditional Monopoly uses game pieces like the top hat or the car. This NFT will serve as the player's unique identity in the game, and it will be tradable outside of the game for a metaverse experience.

Property NFTs

When a player purchases a property in the game, a corresponding NFT will be minted, representing ownership of that property. This property NFT will be utilized to:

Customizable Lobbies

Leveraging ZkNoid’s inbuilt matchmaking functionality, players will have the option to create custom lobbies, allowing them to play with friends or random players from around the world. These lobbies will take full advantage of ZK-based matchmaking and be customizable for different game rules, making the experience flexible and unique to each group of players. The lobby mechanism will be similar to the ones implemented in Randzu for instance.

Truly Multiplayer

Enhancing the current ZKNoid functionality of 2 player game to include more than 6 players. Also creating provision for multiple games running simultaneously on App chain will have to be thought upon. This will not only increase security but also protkit will also increase the speed of transactions.

How ZKP Will Be Used

Property Transactions

Each time a player purchases a property, the transaction will be verified using ZKP to ensure that:

This guarantees that no party can cheat during the transaction, increasing transparency and trust between players.

Rent Collection

When another player lands on a property, rent must be paid. Here, ZKP will be used to ensure:

Random Number Generation for Dice Rolls

The ZkNoid platform's ZKP-based randomness generation, similar to the implementation in the Lottery game, will be used to generate dice rolls at each player’s turn. This ensures that dice rolls are genuinely random and cannot be tampered with by players or external parties. We can easily use the current implementation of random.tsx contract to achieve this.

Benefits of ZkNoid Monopoly

🙈 Information Hiding

In traditional Monopoly, all information is public. However, with ZKP, certain game mechanics could be improved through information hiding. For example, players could trade properties or perform deals without revealing exact amounts of money involved, thanks to ZKP. This adds a strategic layer to the game while maintaining fairness.

🤝 Transparency and Trustworthiness

By using ZKP for every transaction and game mechanic, we ensure that the game is transparent, fair, and impossible to rig. Players can independently verify the fairness of any game event. We will be using power of Homomorphic encryption to maintain the state of the monopoly board providing enhanced protection.

💸 Low Fees and super fast!

ZkNoid’s infrastructure minimizes fees by verifying cryptographic proofs of game actions rather than the entire logic execution. This significantly reduces the computational load, making game transactions more affordable for players.

🥞 High Scalability

ZkNoid's scalable infrastructure allows this game to be played seamlessly across various appchains due to protokit , including custom-built solutions for matchmaking and asset integration. Property NFTs and other in-game assets could even be used across multiple games within the ZkNoid ecosystem.

Conclusion

The ZkNoid platform provides a perfect foundation for transforming Monopoly into a cutting-edge blockchain-based game that incorporates NFTs and Zero-Knowledge Proofs. By developing this new version of Monopoly, we’ll create a fairer, more secure, and scalable game that players can enjoy with trust and confidence. From the random number generation of dice rolls to the verification of property transactions and rent collections, ZKP will be central to ensuring transparency and enhancing gameplay.

This ZkNoid-powered Monopoly will be a revolution in board gaming, combining the familiarity of a beloved classic with the future of decentralized, verifiable, and scalable technology.

MariaAlexsandrovna commented 1 week ago

Long backgammon on the blockchain

The concept

Backgammon is a two–player game that requires participants to think strategically and be able to conduct a combination fight. The player must go through all the checkers in a full circle counterclockwise, enter them into the "house" (house is the last quarter of the playing field (the near right quarter for each of the players) and "throw out" (make a move with a checker so that it turns out to be outside the board) them before the opponent does it. Whoever reaches the goal first wins.

Game mechanics

  1. Preparation

Each has 15 checkers. All of them are located in the 24th point. The 24th point is the far right corner field for each of the players.

  1. Game process

The place of the initial location of the checkers, each of the players is called the head, and the move from the initial position is called "out of the head". Only one checker can be taken from the head in one move. The only exception is the first roll in the game. If one checker that can be removed from the head passes, then you can remove the second one. The player rolls two dice at the same time. Moves any of his checkers by the number of points, according to the value dropped on one of the dice. Then any other (or the same) checker is also moved by the number of points according to the value on the other die. That is, if there is a "3" at one dawn and a "5" at the other, you can move one checker by three points and the other by five points. Or one by eight points. It is impossible to move two checkers by the number of cells shown by one cube. I.e. if there are six or five dice on the dice, the player cannot go with one checker, for example, to three and the other to three squares, so that together they get six, and then go "five". If two dice have the same number of points, you can make four moves. The players take turns doing this, after each roll of the dice.

  1. Tactical rules

You cannot put your checker in a square occupied by the opponent's checker. If a checker falls on an occupied square, then they say about it that it "does not go". If the opponent's checkers occupy six squares in front of a checker, then such a checker turns out to be locked. It is impossible to lock all fifteen opponent's checkers. That is, it is possible to build a barrier of six checkers in a row only if at least one opponent's checker is in front of this barrier. If a player cannot make a single move for the number of points that fell on each die, i.e. if the checkers do not go, then the points disappear, and the checkers do not move. If a player can make a move for the number of points that fell on one of the dice, and cannot make a move for the number of points that fell on the second die, he makes only the move that is possible, and the remaining points disappear. As the game progresses, you can build a wall of your checkers, i.e. a blockade. Since in long backgammon a field occupied by even one checker cannot be occupied by an opponent, a wall of six checkers is a strong technique leading to victory. At the same time, the rules stipulate that a wall of six checkers in a row can be built only if at least one opponent's checker has passed this zone.

  1. Removing chips from the game at the end of the game

The player can remove a piece from the board, which stands at the point corresponding to the number of points thrown on the dice. If "6" and "3" are dropped, the player can remove one checker from the sixth field and one checker from the third field from the board. Each participant has the right to use the points that fell on the dice at his discretion: to play a checker in the house or throw it away. It is allowed to withdraw checkers from the fields of the lowest rank, if there are no checkers in the fields of the highest rank. For example, "6" and "5" fell out, but these fields are empty — then the player can take two checkers out of the house from the next in order, the fourth field. If there is nothing there, then from the third, etc. When all the checkers are withdrawn, the game ends.

ZK proofs usage

ZKP and VRF allow you to hide the discarded number on the dice until it is necessary to disclose it, which protects the game from cheaters and robots that can be found on most Backgammon playgrounds

NFT integration

All people like to bring personality to the things they interact with, from their own houses to games. The ability to customize backgammon chips, game boards and avatars inside the game can give the user a sense of self-contribution to the game and attachment to it, and also contributes well to the profit model.

Lobbies usage

Due to the fact that backgammon is a multiplayer game, users will need to find each other somehow, ZkNoid offers an excellent tool for users to find each other - lobby. There can be nothing better than playing backgammon with friends!

game

aryandharwa commented 1 week ago

Battleships: Zero-Knowledge Edition

"Battleships: Zero-Knowledge Edition" is a Web3-inspired version of the classic Battleships game where players strategically place their fleets on a grid and attempt to sink each other's ships. The game integrates blockchain technology, NFTs, and zero-knowledge proofs (ZKPs).

Game Mechanics

1. Board and Fleet Setup

2. In-Game Currency and Treasure Mechanics

3. Power-Up Mechanics

Power-Up Examples:

  1. Random Bombs: Launch 4 random bombs on the opponent's grid.
  2. Missiles: Launch 5 bombs in a '+' pattern (one in the center and one in each direction).
  3. Nuke: Destroy a ship with one direct hit.
  4. Sonar Pulse: Reveal if a ships exists or not in 3x3 area chosen by the player, without revealing its exact position.
  5. Stealth Cloak: Makes a ship invisible for the next three turns; reveals the hits after a set number of moves.
  6. Fog of War: Creates a fog that hides both hits and misses for a few turns.
  7. Storm Surge: Shifts all ships on the board randomly by one square in any direction.
  8. Reinforced Hull: Allows a ship to withstand two hits instead of one.

4. Power-Up Activation and Strategy

Game Modes

1. Two-Player Mode

2. Battle Royale (Multiplayer Mode)

zknoid and ZKP Integration

  1. Zknoid SDK:

    • Multiplayer mechanic can be achieved by using Lobbymanager and Matchmaking logic.
    • Randomness function for treasure.
  2. Power-Up Verification:

    • ZKPs can be used to verify power-up activation without revealing the player’s strategy.
  3. Sonar Pulse:

    • using ZKP, we can prove that a ships exists or not in a 3x3 area.
  4. Treasure Discovery:

    • The psuedorandomness can be used by zknoid for randomly placing the treasure on the grid
  5. Fairness and Transparency:

    • The ships placement will be locked and will be signed by the player for generating a proof that players did not change the placement in between the game.
    • All moves, attacks, and power-up activations are logged on-chain. However, the specifics (like exact ship placements or hidden treasures) remain private until revealed by game mechanics.
  6. NFT Marketplace for Ships and Power-Ups:

    • Players can buy, sell, and trade their NFT ships and power-ups on a decentralized marketplace, giving it a trading cards touch.