tic tac toe

From IndieWeb


tic tac toe is a game where two players aim to make a line on a grid and was played using Webmentions at 2022/Berlin IndieWebCamp.

IndieWeb Examples

capjamesg, Sven Knebel, and Barnaby Walters participated in a game of tic tac toe over Webmention.

To do this, James set up a page on his website called "tic tac toe" and sent a Webmention to Sven Knebel inviting him to play. Then, each player was asked to monitor the page, refresh it when a player indicated they had made a move, and add their icon (in this game, blue hexagon, bird, and coffee emojis) onto the grid in their own Webmention.

The player who made the final move declared their win.

This example contained no validation logic, trusting the players to follow the rules of the game.

The results of the game were displayed in a comments feed using webmention.js on James' site.

The result of the game was a draw.

Improving the game

A few opportunities for improvement were observed:

  • Add custom styles to make the grids appear better on the root game page.
  • Validation to ensure only two parties can participate in the game may be optimal, although one may want to support webmentions from more recipients so commentary can happen alongside the game play on the same page. A new page for commentary could optionally be created to separate the discussion and the gameplay.

See Also