Thursday, November 7, 2024

Pinball Machine: Cloud-Connected Retro Sandbox Gameplay

- Advertisement -

Pinball Machines

Google cloud frequently take for granted how simple it is to link apps with a wide range of robust cloud services in today’s cloud-centric world. Nonetheless, integration remains difficult in a great number of legacy systems and other restricted situations.

When creating Backlogged Pinball, a unique pinball game that created as a demonstration for integrating cloud services in unusual locations, they took on this difficulty head-on. A real pinball machine called Backlogged Pinball can be connected to the cloud for a number of purposes, such as updating leaderboards and tracking information about finished and ongoing games.

- Advertisement -

In order to concentrate on game coding and cloud integration, built it on the foundation of a commercially available programmable pinball machine. The computer’s software environment was constrained, though, as it was using a sandboxed version of the.NET Framework 3.5, which was initially made available 17 years ago. In practice, this meant that were unable to install tools like gcloud to facilitate communication with the cloud and utilize any of the current Google cloud SDKs that were available for C#.

There’s a catch

It knew wanted to use the cloud for logging of game events and results, databases for high scores and game statistics, and a custom service to modify the game experience on the fly. However, creating software for such a limited setting came with a number of difficulties that you may be familiar with:

Limited library support: There are plenty of excellent libraries available to assist you in connecting to cloud services if you have complete control over your stack. However, there are instances when you are unable to choose where your software runs. Finding appropriate libraries to connect Google cloud pinball machine to the desired cloud services proved to be challenging.

For instance, they were aware that in order to power a real-time display of every event occurring in the game, needed to add entries into a Firestore database. Although Firestore has excellent SDKs, they were unable to handle anything prior to the 8.-year-old.NET Framework 4.6.2. Google could have been able to use a TCP connection to access a conventional relational database, but didn’t want to be restricted in Google cloud options for cloud services and tools. Building a real-time web application with MySQL instead of Firestore, which is built from the ground up to push data to the browser in real-time, is obviously far less viable.

- Advertisement -

Difficult deployment process: You may wish to add new features and cloud integrations, but updating your on-device software may be challenging due to various constraints. Google cloud had to use a USB stick to manually install every version of game while it was being developed because third-party developers. Testing, deploying, and shipping new versions of your code is slowed down by this type of restriction, which is never good. In a contemporary, adaptable cloud platform, adding new features is far simpler.

In essence, discovered that utilizing contemporary cloud services in an unpredictable legacy setting was difficult.

Flipper-ing the script

Initially, it seemed impossible to incorporate all of the services desired into the code that would operate on the pinball machine. However, what if there was an alternative? What if it gave the pinball machine a single simple integration and transformed it into a service? They might then arrange the outcomes in a contemporary cloud environment and have it send a message each time something occurred in the game.

Google cloud concluded that Pub/Sub would be a great approach to accomplish this. It offered a simple method of transferring data to the cloud via a single interface. It was really a simple HTTP POST with any message format desired.

Flipper-ing the script
Image credit to Google cloud

It created a unique Pub/Sub messaging mechanism to accomplish this. To manage authentication and message delivery via the REST API, created a lightweight Pub/Sub framework just for the pinball machine. This made it incredibly simple to submit events anytime a player struck a target, fired a ball, or even pressed a flipper button.

Google cloud team processed these events in real time on the cloud side by using numerous Cloud Run subscribers. Additionally, stored data and powered visualizations using Firestore.

Jackpot! Benefits of the cloud

There were many benefits of pushing integration complexity into the cloud:

One interface: Authentication alone might be a blog entry in and of itself, so creating own Pub/Sub client was no easy feat. But when it was finished, it was finished! After it was operational, Google could concentrate on employing whichever contemporary client libraries and tools desired to process every event in the cloud.

Real-time updates: At Google Cloud Next, assisted users in creating custom Cloud Run services that can process pinball machine, send messages back to the machine, and receive them. You could theoretically alter the game while a friend was playing it because it took less than a minute to build and deploy these services!

Rich insights from data: In the end, they had a detailed record of every event that took place throughout a game. Playtest-based scoring adjustments and development-related troubleshooting were greatly aided by this.

Leaping ahead

The next version of Backlogged Pinball is already in the works, and it will include features hadn’t initially thought of. For instance, its’re including AI-driven Gameplay and player-style-based recommendations. Instead of struggling with dependencies on a historical system, nearly all of the work will be done in a contemporary cloud environment because of this adaptable cloud-based design.

Furthermore, any limited environment can benefit from the lessonsz learnt from this project. You can overcome the constraints of your environment and realize the full potential of the cloud by utilizing Pub/Sub messaging and embracing a cloud-first mindset, regardless matter whether it’s an embedded system, an Internet of Things device, or an outdated server running older software.

- Advertisement -
Thota nithya
Thota nithya
Thota Nithya has been writing Cloud Computing articles for govindhtech from APR 2023. She was a science graduate. She was an enthusiast of cloud computing.
RELATED ARTICLES

Recent Posts

Popular Post

Govindhtech.com Would you like to receive notifications on latest updates? No Yes