Multiplayer Ultimate Tic-Tac-Toe
« Back to Blog
Back in 2014, inspired by how much time I spent playing it during finals week, I coded Ultimate Tic-Tac-Toe.
For years, like all other games on my site, it was solely client-side, meaning you had to physically sit in front of the same computer as your friend in order to play. Despite this, it was by far the most played game on my website, at least by me and the people I know. There's just something so gripping about the Chess-like strategy put in a form-factor as accessible as Tic-Tac-Toe that made everyone I showed this game immediately fall in love with it.
Well today, four years later, I'm introducing the first major update the game has ever received, and also a major milestone for my site - I've made Ultimate Tic-Tac-Toe an online multiplayer game!
The base game runs off the exact same code as my original; the game just makes a peer-to-peer connection through WebRTC, packaged together by PeerJS. I am running a custom PeerJS server instead of using theirs, because they don't support HTTPS. As of right this moment, it's running on Heroku simply because they had a one-click deploy to Heroku option, but I'm trying to migrate it to Azure at some point. Node.js is not a technology I'm intimately familiar with so I'm still trying to figure this out.
There's no cheat detection yet - if your opponent opens the developer console and starts making invalid moves, there's nothing to prevent them from winning or desyncing the game. Writing an online game in general, because I've never done it before, is taking a lot of thought because of new edge cases that can't happen on a local game.
Nonetheless, the game more or less works, and it's awesome. Try it out here, or under the Games menu, the same place it has always been, under U TTT.
I hope you have as much fun playing the game as I did making it.
« Back to Blog