Quipped is a word game inspired by popular word games like Wordle and less popular word games like Glib. It was also inspired by the Python web app workflows offered by Microsoft Azure's App Service, which informed design decisions like using Flask and Gunicorn as the combination of these tools made going from development to production easy and fast!
What it does
Quipped is a word game for friends powered by Python and Microsoft Azure. Every day a unique set of letters is generated – the same for every player in the world. The goal is to create the longest word or words that involve the most unique letters to score the most points. Vowels, for example, are worth a single point while more exotic letters like Q and Z are worth 10. You get as many attempts as you want, and can easily share your score with friends and social media. Social sharing is easy and hides the actual letters used by the player, while showing their scores. This is designed to increase the virality of the game.
Quipped is a progressive web app, which means in major web browsers like Edge, Chrome, and Safari users can install Quipped like an app. It will appear on their homescreen and even allow them to play offline. This is because it caches content for offline use when the user first visits Quipped. Deploying Quipped as a PWA opens the opportunity to submit the game to the major app stores, which is typically difficult for Python-based games as they are difficult to compile into an APK or other format typically accepted by app stores.
How we built it
Quipped uses Python’s Flask framework and Gunicorn for its webserver. This pairs well with the off-the-shelf configuration of Azure’s App Service for Python webapps. During development every time I made a new commit GitHub actions would trigger a workflow where a virtual environment would be constructed of my whole Python webapp project. This virtual environment contains all of the Python dependencies pre-installed and is setup to work with Azure’s existing gunicorn start command. Azure then automatically pulls and deploys the latest version of the game to production, which you can access at quipped.app.
While the game is a web app the game you see is actually generated by Python. From the PWA components to the actual gameplay, Python is working in the background via Flask routes to orchestrate gameplay. Python gets todays date and creates a seed from it which is used by all players to generate the random letters of the day. It checks if there are playable words and iterates this seed until words in its English dictionary are found. Functions linked to the submit button check if the word is valid and even handle wildcards, which are like blank tiles in Scrabble. We use Python to determine if the use of a wildcard is valid by pre-solving all possible words that can be made with the tiles and the correct number of wildcard characters before the user starts playing. We can then simply look up if the user’s input is in this set of pre-solved solutions. We can also iterate over the user’s submission in Python to return their score based on a weighting of the letters used, again similar to Scrabble. Python made writing the game logic fun, easy, and performant.
Challenges we ran into
Accomplishments that we're proud of
Quipped's PWA integration combined with being deployed to Azure bode well for the app being scalable if it becomes popular. Additionally it is not common to develop PWAs in Python, so I am proud that I was able to make it work with the tools I selected. I am particularly proud that the game is fun and addicting- during play testing my friends and family started sharing their scores to our group chats which was rewarding to see.
What we learned
Continuous integration does not have to be scary! GitHub actions and Azure's App Service made getting to production easy. Additionally I learned how to build PWAs with Python, whereas before I mainly used the .NET framework and Blazor. I also learned how to use Python to build a game, which is something I had never done before. I found that it is a great language for describing game logic as it helps you write code that is human-readable and easy to find bugs and holes that would ruin gameplay.
What's next for Quipped
Quipped is designed for virality. The goal is to market the game and also encourage network effects to build a user base, similar to how Wordle gained traction. Submissions to the app stores are also on the roadmap, as well as UI polishing and tweaking!