← Back to home

Connect4

Connect4 X ZkNoid: A blockchain-powered twist on the classic game! Built on Mina Protocol with ZkNoid, it features provable fairness, gasless transactions, and ZKPs for secure gameplay. Real-time matchmaking & leaderboards bring competitive gaming to the decentralized future!

Screenshots

Connect4 screenshot 1
Connect4 screenshot 2
Connect4 screenshot 3
Connect4 screenshot 4
Connect4 screenshot 5
Connect4 screenshot 6

Problem Statement

Connect4 X ZkNoid is a cutting-edge reimagination of the classic two-player strategy game, seamlessly integrating blockchain technology to enhance transparency, security, and fairness. Built using the ZkNoid platform on the Mina Protocol, this project showcases the transformative potential of Zero-Knowledge Proofs (ZKPs) in gaming.At its core, Connect4 retains the simplicity and addictive gameplay of the original game: players alternate turns, dropping colored discs into a vertical seven-column, six-row grid to align four discs in a row—horizontally, vertically, or diagonally—while blocking their opponent. However, this modern adaptation takes the gaming experience to a new level by ensuring that every move is cryptographically verified, maintaining fairness without revealing player strategies.Key Features:Provable Fairness with ZKPs: Every player's move is verified using Zero-Knowledge Proofs, ensuring that gameplay remains secure and tamper-proof. Strategies are hidden, providing an added layer of privacy while maintaining full transparency.Gasless Transactions: Built on the Mina Protocol, Connect4 eliminates transaction fees, enabling seamless and cost-free interactions for players.Competitive Ecosystem: Includes a robust matchmaking system for real-time player pairing and a global leaderboard that tracks performance, encouraging healthy competition.Blockchain Integration: Smart contracts handle move validation, results, and leaderboards, creating a trustless system that eliminates the need for intermediaries.Modular Infrastructure: Designed using ZkNoid’s modular framework, the project offers scalability and extensibility, allowing developers to customize and build additional features or new games using the same platform.Seamless Gameplay: Despite leveraging complex blockchain technology, Connect4 ensures a smooth and familiar gaming experience with a responsive UI and intuitive design.

Solution

The game logic of Connect4 posed significant challenges, especially in determining the winning player after each move on-chain. Handling wins conditions dynamically in a decentralized environment required careful implementation. We also encountered issues with handling negative numbers during computations, which we resolved through optimized logic and modular adjustments. Protokit, being a zk-library provider, played a crucial role by offering tools to transform the game logic into a fully functional, zero-knowledge proof system, maintaining privacy and security throughout the gameplay.

Hackathon

ETHGlobal Bangkok

2024

Prizes

  • 🏆

    zkGaming on Mina1st place

    Mina Protocol

Contributors