Pinball Arcade: Bugs and Understanding our Tables

The fact that this was hidden in someone’s room had nothing to do with this outcome.

With the lighting being fixed, I could go back to smaller bug fixes. But these smaller bugs would force me to jump into TPA‘s code in a way different than before.

A lot of the bugs I had fixed before were just platform specific bugs. The PS4 had the old UI, so any bugs with that were on my plate. And all the crashes that were brought up over time from other people’s code or from my own were my problem.

But because I had fixed a lot of the bugs that were platform specific (case in point, the lighting), I decided to move onto bugs that plagued every platform: table and emulation bugs.

The table bugs would be my first real introduction to how the front end and back end of the pinball tables worked in our game. The front end is basically an XML that handles every single object on the table, and the back end is code implementing specifics for that table as well as basic things that every table in the game needs to do. While I had interacted with the XML before, this would be my real first dive into understanding it.

This is because certain bugs (here’s the thread for patch 1.22) were caused by the XML. Take for example, “Gorgar pop bumpers now light up properly”. From what I remember of this bug, doing something on the table caused one of the pop bumpers to light up. Doing that same thing would light up the second one. And doing that same thing again would light up the last bumper. But the order was wrong (i.e., the wrong bumper would light up first).

I had no clue why, because the XML relies on a lot of different things to understand. So I went up to Scott, who had taken over the job of adding both the front and back end of the tables. I asked him about my problem. In hindsight, it was a pretty easy problem. But at the time, I had no clue what switches were, which are crucial to understand here.

Wire rollovers

In pinball, switches are basically a physical boolean. These can be represented by rollovers (is a ball colliding with this?), gates (did I a ball pass through this gate?), targets (did a ball hit this?), etc. And Scott told me that the problem with with Gorgar’s bumpers was that the bumpers either had the wrong switch numbers attached to them or that the some light numbers were wrong. I honestly forget which of these was the problem, but I looked into it further and fixed it. It was a big moment for me.

I would go on to fix more bugs like this in patch 1.23. But I also would fix emulation related bugs, which were even more complicated than table bugs.

The majority of our tables are emulated, which means that we are running the original software that runs the real table, but we are interpreting that software to run our game. This provides less work on our end to get an experience equivalent to what that table provided in its hey day.

And sometimes the things that we used to represent how something works in the emulation is broken. And that brings me to “Pistol Poker now ends after match game”.

At the end of pretty much all non-EM pinball tables, there is a match game of some sorts—it takes two digits from your score and compares it to a random number, and if they match, you get a free game. For Pistol Poker, before that could even finish, an overlay would pop up saying your score, which obscured the match game DMD animation.

It’s a tiny thing, but fans like the match game. So I needed to make the game wait for the match game to end before the game ended and brought up that overlay. Well, the problem was that the game was ending on a certain sound. This was a sound that was found to be tied in to the ending. But it was a sound that played before the match game. So what I had to do was find a sound that played after the match game was over and was exclusively tied into the match game! And sure enough, once I did that, the problem was fixed. This is very typical in our game for how we deal with analyzing the emulation.

All of this was here to say that I gained some real insight on how the tables were created in TPA. And because of this, it would make sense that I could take a huge burden off of Scott’s shoulders in the future.