Monad
@monad-xyz
Your onchain game doesn’t need to be slow We built Monad2048 - a fully onchain version of 2048 - to show how to build fast and button-mashable gameplay while keeping all game logic on chain If you're building responsive, high-throughput dapps, this thread is your blueprint 🧵
179 replies
538 recasts
1531 reactions
Monad
@monad-xyz
Monad2048 runs entirely onchain: every move is a transaction and is validated by a smart contract. No servers involved. Play the game at 2048.monad.xyz and read about the build process at https://blog.monad.xyz/blog/build-2048
18 replies
62 recasts
253 reactions
Monad
@monad-xyz
We aimed to prevent cheating while keeping moves instant. A deterministic seed generates new tiles, discouraging cheating without slowing gameplay. Here’s how we designed it. Contracts: https://github.com/monad-developers/2048-contracts
1 reply
3 recasts
38 reactions
Monad
@monad-xyz
The Monad2048 contract stores the 4x4 board in one uint256. Each tile’s value is encoded in 8 bits. This function reads a tile’s value:
1 reply
2 recasts
33 reactions
Monad
@monad-xyz
Gameplay works in two steps: 1. startGame: Submit four initial boards to begin, and a seed. 2. play: Submit a move and the resultant board. The seed is used in a deterministic formula to determine where new tiles spawn upon new moves.
1 reply
2 recasts
24 reactions