Machines for Pinball
In today's cloud-centric environment, Google Cloud often takes for granted how easy it is to connect apps with a variety of reliable cloud services. However, integration is still challenging in many older systems and other constrained scenarios.They tackled this challenge head-on when developing Backlogged Pinball, a distinctive pinball game designed as an example of integrating cloud services in odd places. Backlogged Pinball is a real pinball machine that can be linked to the cloud for several functions, including tracking data about completed and current games and updating leaderboards.
It was constructed on top of a commercially available programmable pinball machine so that the focus could be on game code and cloud integration. However, because it was running a sandboxed version of the.NET Framework 3.5, which was first released 17 years ago, the computer's software environment was limited. In actuality, this meant that they couldn't use any of the Google cloud SDKs that were currently available for C# or install utilities like gcloud to help with cloud communication.
There's a catch
It was aware that it wanted to employ databases for high scores and game statistics, the cloud to log game events and results, and a custom service to make real-time changes to the gaming experience. But developing software for such a constrained environment presented several challenges, some of which you may already be aware of:Limited library support: If you have total control over your stack, there are many great libraries that can help you connect to cloud services. There are times, though, when you can't pick where your program runs. It was difficult to locate the right libraries to link the Google Cloud Pinball machine to the required cloud services.
For example, they knew that they needed to add entries into a Firestore database to power a real-time display of every event that happened in the game. Despite having great SDKs, Firestore couldn't support anything before the.NET Framework 4.6.2, which was released eight years ago. Google didn't want to be limited in its choices for cloud services and tools, even though it could have accessed a traditional relational database over a TCP connection. It is obviously far less feasible to build a real-time web application using MySQL rather than Firestore, which is designed from the ground up to push data to the browser in real-time.
Difficult deployment process: Despite your desire to incorporate new features and cloud integrations, there are a number of limitations that may make it difficult to update your on-device software. While the game was being created, Google Cloud had to manually install each version using a USB stick due to third-party developers. This kind of restriction slows down the testing, deployment, and shipping of new versions of your code, which is never ideal. It is much easier to add new features to a modern, flexible cloud platform.
Essentially, it was found that it was challenging to use modern cloud services in an uncertain legacy environment.
Changing the script
Incorporating all of the needed services into the code that would run on the pinball machine first appeared to be difficult. But what if there was another way? What if it turned the pinball machine into a service with just one straightforward integration? They could then set up the results in a modern cloud system and have it notify them if something happened throughout the game.Google Cloud decided that the best way to achieve this would be to use Pub/Sub. It provides a straightforward means of moving data to the cloud via a single interface. It was simply a simple HTTP POST with whatever message format desired.
Changing the script
To do this, it developed a special Pub/Sub messaging system. A lightweight Pub/Sub framework was developed specifically for the pinball machine to handle authentication and message delivery using the REST API. When a player hit a target, fired a ball, or even clicked a flipper button, it was very easy to report events.The Google Cloud team used a large number of Cloud Run subscribers to handle these events in real time on the cloud side. Additionally, Firestore was used to power visualizations and store data.
Jackpot! The cloud's advantages
Pushing integration complexity to the cloud had several advantages:One interface: It was difficult to create your own Pub/Sub client because authentication alone could be a blog post in and of itself. However, once it was done, it was done! Once it was up and running, Google could focus on using any modern client libraries and tools it wanted to handle all cloud events.
Real-time updates: At Google Cloud Next, I helped users build custom Cloud Run services that can interpret messages sent to and received from pinball machines. Because it takes less than a minute to construct and deploy these services, you could potentially change the game while a friend was playing!
Rich data insights: Ultimately, they had a thorough log of every action that happened throughout a game. This considerably facilitated development-related troubleshooting and playtest-based scoring modifications.
Leaping forward
Backlogged Pinball's future edition is now under development and will have features that weren't previously considered. For example, it incorporates player-style-based recommendations with AI-driven gameplay. Because of this flexible cloud-based design, almost all of the work will be completed in a modern cloud environment rather than battling dependence on an outdated system.Furthermore, the principles learned from this project can be applied to any confined context. Whether it's an Internet of Things device, an embedded system, or an old server running older software, you can use Pub/Sub messaging and adopt a cloud-first mindset to overcome the limitations of your environment and fully utilize the cloud.
0 Comments