MINESWEEPER FLѦGS: ARK’s first PvP blockchain game

ArkFun.io
4 min readNov 15, 2019

--

Minesweeper Flags inside the ARK Desktop Wallet!

Hello! Been a while.

Although there have not been any new games released for a while, I have been working on the backend system to facilitate PvP blockchain games and today, the first ever interactive ARK PvP game took place on the ARK mainnet! Sam Harper-Pittam beat me, so the less said about that, the better :)

So, delegate fun is pleased to announce the launch of Minesweeper Flags, ARK’s first public player-vs-player game, which is a two-player variant of Minesweeper, where the objective is to discover 26 out of 51 mines before your opponent. This is a contrast to the normal rules of Minesweeper where you are meant to avoid the mines. You can play against a real-life opponent to win tokens on any supported ARK-powered network or bridgechain; although at the moment only the ARK Public Network (mainnet) is supported, though if you would like to see the game on another ARK-powered chain, let me know!

The game host sets a wager which the opponent matches before the game begins, and the winner automatically receives 95% of the pot, with 5% kept back for the costs associated with running the backend of the game.

It is based on the old MSN Messenger game of the same name, and tries to emulate the style of that game as much as possible for nostalgic reasons. Each player takes it in turns to choose a square on the map, which triggers a macrotransaction with the coordinate of that square embedded in the smartbridge field. If that coordinate is a mine, the player earns a point and may make another move; otherwise, the number of mines in any of the immediately adjacent squares (top left, top, top right, left, right, bottom left and bottom right) is revealed and the turn passes to the opponent. An exception is when there are no mines in any of those adjacent squares, in which case more squares on the map are revealed automatically until it reaches adjacent mines. If a player is currently losing against their opponent, they may deploy a bomb which uncovers a 5x5 grid rather than a single square. This bomb can only be used once per player, per game.

A game host can also cancel their game at any time if no opponent has matched their wager. Once the wager has been matched, the game can no longer be cancelled. However, a player can resign a game during their turn if they wish to concede defeat. If an opponent does not make their move for 12 hours, the player can choose to claim victory to prevent the possibility of their tokens being locked up forever in an unfinished or abandoned game.

There is also scope for wider scale tournaments with a prize pot at the end, and the backend will support hybrid on-chain/off-chain PvP games too. Who knows, maybe we can organise a Minesweeper Flags tournament among participants to win a substantial pot. Reach out if you might be interested!

This could also lead to other turn based games in future, for example, Checkers, Battleships, Connect 4 and so on, which could all potentially run inside the Desktop Wallet as well as via the browser. Depending on feedback I may pivot the delegate to focus on these turn-based PvP games rather than single player off-chain games.

From a technical perspective, the backend game logic runs entirely within an ARK Core plugin, compatible with Core 2.5 and Core 2.6.

Please be aware that, at present, Windows users running the latest stable version of the Desktop Wallet (2.6.2) may experience an “Invalid URI” error in the wallet while trying to play. To resolve this, close the wallet before taking each action. I know it’s cumbersome, but it’s already been fixed in the development branch (which you can use instead by installing the development version available here for Windows, Linux or macOS). At the moment you can’t play on mobile because the ARK Mobile Wallet doesn’t yet support deep linking. I may also introduce a QR code mechanism when you trigger an action so you can scan the code in the mobile wallet to make the transaction rather than using the Desktop Wallet, but I need to research this more before committing to it.

You can either play it in the browser or in the Desktop Wallet.

I hope you enjoy the game! All feedback is welcome.

--

--

ArkFun.io

We give away Ark cryptocurrency every day to the winners of our games.