Have you ever wondered what fun things could be built with pure Ampscript?
Yeah, Neither have I. I only thought about it for work.
Inspiration
Last year I was inspired by a documentary about video game creators in the 80’s and was amazed how they had to creatively work around the limitations of the hardware available at that time.
This got me thinking if I could build a game running purely on Ampscript. Sure, it’s not as robust as Server-Side JavaScript, but hey, it has loops and conditional statements, so I guessed that’s enough to tackle this challenge.
Didn’t want to burn too many supermessages along the way, so the game had to be simple in scope and would need to be resolved with just a few clicks (with no script running client-side responding to the player) resulting in page reloads. Tic-Tac-Toe seemed like perfect choice for this, so I began coding and ended up with something like this:

Features
For a limited time, you can also just go straight to the game and play it in two modes:
- Single Player against the super clever yourself “AI” I stitched together with a bunch of conditional statements
- Local Multiplayer against another player at your device or yourself.
Obstacles
- representing the board in Ampscript
- checking if the game is finished resulting in a win or draw
- creating an opponent that will play against you





