project screenshot 1
project screenshot 2
project screenshot 3

Criss Cross

CrissCross is a super-simple, addictive game where you transfer dice numbers to a grid. The goal is to group identical numbers to score more points. It's easy to learn, like Sudoku, and perfect for solo play. Carefully plan each move to maximize your score and fill the grid!

Criss Cross

Created At

ETHOnline 2024

Winner of

Stackr Labs - Best "Proof of Gameplay" Implementation with Micro-Rollups

Avail - Build with Avail

Prize Pool

Project Description

Criss Cross integrates with Stackr to store proofs of gameplay. By using Stackr, we ensure that each move in the game is securely logged and verified, making the gameplay transparent, tamper-proof, and auditable. This setup is particularly useful for ensuring fairness and trust in multiplayer games or any application where verifiable actions are crucial.

  1. State Machine on Stackr:

    • State Machine: A state machine is a computational model used to design algorithms and control logic where an application or system transitions between various states based on inputs and rules. In the context of our game, the state machine on Stackr likely governs the progression of the game, ensuring that each player's move is valid and that the game transitions smoothly from one state to the next.
    • Stackr Integration: By building this state machine on Stackr, we're leveraging its capabilities to ensure that all transitions and states are recorded. This means that every action (e.g., each move in the game) is stored in a verifiable and immutable manner.
  2. Storing Moves:

    • Each time a player makes a move, the move's details (e.g., the value placed, the row and column on the game board) are sent to the backend.
    • The backend, using a method like move() (as seen in your code), logs this move into Stackr. This logging process could involve creating a transaction or a record on Stackr that includes all the move details.
  3. Proof of Gameplay:

    • Every logged move serves as a proof of gameplay. This proof is publicly verifiable, meaning anyone with access to the Stackr ledger can see the sequence of moves, verify their authenticity, and ensure that the game was played fairly.
    • The decentralized nature of Stackr ensures that no single entity can alter or delete these records, making the gameplay data immutable.

Advantages:

  • Transparency: Players can trust that the game is fair because each move is independently verifiable on Stackr.
  • Auditability: In cases where disputes arise (e.g., one player claims another cheated), the entire history of moves can be reviewed and verified against the records on Stackr.
  • Immutability: Once a move is stored on Stackr, it cannot be changed, ensuring that the game history remains intact.

Example Flow

  1. Game Initialization: When the game is initialized (/init-game endpoint), the initial state of the game is set up and possibly recorded on Stackr as the starting point.

  2. Player Move: Each time a player makes a move (/move endpoint), the move is logged onto Stackr, transitioning the game to the next state.

  3. State Transition: The state machine on Stackr ensures that each move adheres to the game's rules. For instance, it checks if the move is valid.

  4. Verification and Continuation: After the move is recorded and the state is updated on Stackr, the game continues. Players can view the history of moves, and at the end of the game, the final state is recorded as well.

How it's Made

To achieve this we used the following technical components :

  • Define a smart contract or state logic on Stackr to handle game states and transitions.
  • Integrate your backend (Node.js/Express) with Stackr’s API or SDK to log each move.
  • Manage the state transitions within the state machine and ensure that each move conforms to the game's rules before it's logged on Stackr.
background image mobile

Join the mailing list

Get the latest news and updates