How to Use Notifications to Build a Game in 36 Hours
Back in April, Courier sponsored the Bitcamp Hackathon from University of Maryland. It was a 36-hour hackathon and it produced one of the most interesting projects we’ve seen out of a Hackathon. Matt Graber, a new grad, created a game called Package Person with a very interesting use of Courier. The game’s objective is to deliver as many packages as possible to the package drop locations in front of the houses while avoiding the dogs that chase the player.
Let's dive into how Matt got the idea for Package person, how he built it with Courier as a part of his suite of tools, and his reflections on the project.
Planning the Project
Since the 2021 Bitcamp Hackathon would be the last of UMD senior Matt’s career as an undergrad, he was committed to finishing a project and hopefully winning something in the process. He had done hackathons several times in the past, but this was his first time doing it without a team. So finishing a project of reasonable quality by himself was the main challenge and primary goal.
Matt's game development experience began when he joined the UMD AR Club during his freshman year, which later became the XR Club after merging with the VR Club. Throughout his time with the AR/XR Club, he learned and taught other students how to use the Unity game engine to create augmented and virtual reality experiences, which often took the form of games. His initial knowledge of Unity came from that experience, and he used those skills to start making more conventional games in my spare time.
Having had the time to develop these skills, Matt was inspired to build Package Person because of his experiences during the Covid-19 pandemic. He had been making games to pass the time with his roommates and during lockdown, they started hosting mini 4-hour hackathons that they called "game jams" among themselves with some of their other friends as judges. Predictably, they got pretty good at quickly throwing together simple games using Unity.
The Development Process
The game’s objective is to deliver as many packages as possible to the package drop locations in front of the houses while avoiding the dogs that chase the player. The trick is for the player's top speed to be faster than the dogs' except when the Package Person is carrying a package. Upon losing, the player is brought to a leaderboard screen with the option to enter their contact information to be notified of any changes in their position on the leaderboard.
Package Person was developed in the Unity engine, which uses C# for scripting. For the notifications, Matt used Courier with Twilio and Mailjet as sending providers. He created the Package Person using Adobe Fuse (which is no longer supported) and rigged and animated it using Mixamo. The other 3D assets were free from the Unity Asset Store.
An auto-generated C# code-snippet was not provided by Courier because it does not yet have an SDK for C#, unlike other languages such as Python and Java. However, Matt says he found this to be more of a minor inconvenience than anything else. He instead used the Unity API’s built-in web request system to send a POST request with the necessary information. This produced the same result as the Courier SDK would have been able to do for other languages.
The games Matt and his roommates made included leaderboards that were limited to showing scores achieved on individual machines. In many ways, these games were like the classic arcade machines, which have leaderboards that can usually only be accessed by visiting the machines themselves. He wanted to give players a reminder of their scores and an incentive to return to the games on those machines by giving them updates on their leaderboard position, taunting them (quite literally) back to defend their ranking.
In Package Person, there are three types of notifications a player can receive. First, when the player gets on the leaderboard, the player will receive a notification that essentially serves as a “receipt,” just reminding them of the placement on the leaderboard that they just achieved.
The second type of notification is received by all players on the leaderboard whose scores were bested by the newcomer. This notification informs the recipient of the name of the player who beat them, any message that the triumphant player has specified to be sent to lesser players, and the new placement on the leaderboard that they now occupy.
Finally, because the leaderboard only displays the top ten players, a notification goes out to any players who get knocked off of the leaderboard as more players score higher than them. In each case, depending on whether a player entered their email, phone number, or both, they will receive an email and/or text message with the appropriate information. All of these notifications also include the “arcade name” which serves to identify the installation of the game that the notification is notifying about and is configurable in the game’s settings.
Reflections on Courier
If Courier were not an option, Matt would have had to use Twilio and Mailjet directly through their own APIs. He also would have needed to program all the logic for creating the messages in C# rather than allowing most of the logic for the message content to reside in the conditionals within the notification templates created in Courier. While it would have been doable, it would have taken much longer and he likely would have had to settle for a much simpler game due to the time constraints of the hackathon.
Thoughts for the Future
Given more time, Matt's ideal game notification experience for Package Person would include a Package Person mobile app. This app would keep track of all scores on all the machines that an individual has used and also would feature a global leaderboard for the greatest Package Person players across all installations of the game. Package Person players would receive push notifications through the app. He would do so by adding a mobile push channel to his Courier workspace.
When asked for his advice for future game creators, he said that if they have the patience and a willingness to read documentation and follow tutorials, anyone can easily get started developing games in engines such as Unity or others. The experience needed to build a game varies with the intended complexity of the game that is being built. Starting out creating small, simple games will help build the skills required for making more complex games down the line.
When Matt started learning Unity, he found the easiest way for him to learn was to think of a game idea and then just get right into attempting to create it, stopping to read documentation and searching for tutorials whenever he would hit a roadblock. By thinking of and pursuing simple game ideas that he wanted to make a reality, he was able to keep himself more invested in learning to use the engine than if he would have been following a basic tutorial series.
Overall, his takeaway from the experience is that it is important to pursue making something that you can call your own and be proud of in order to maintain your interest in continuously refreshing your skillset.
More from Notifications Landscape
From MVP to Production Ready With Serverless
In this post, we explore how we use Serverless at Courier, review some Serverless basics, and explore ho...
June 03, 2021
Best of Courier at Hackabull 2021: Speed Friender
After attending our workshop at Hackabull 2021 on setting up an application with Twitch, Discord, and Co...
May 27, 2021