The Xbox One Goal

The game is buggy, and there’s more I’d like to do, but I’ve put off getting back to the thing I told myself time and time again to never get too far away from.

Oops

There’s probably a bunch I can’t talk about due to secret agreements and NDAs but I can talk in general about porting to a new platform. After all, I ported Super Slam Dunk Touchdown early on to the Nvidia Shield. I created a (very, very specific) Linux port to run the Arcade Edition. And of course, I have demoed the Xbox One build at Microsoft’s Pre-PAX and GDC. So, it ran on Xbox One. Let’s get that out of the way, I only mention it because it hurts.

I got too far away from my Xbox One build! Since I last ported the code to Xbox One, I’ve replaced my primary development computer, built an arcade cabinet and finished Season Mode. If I was playing half court: I’ve crossed the line and gone a bit into the parking lot on the other side of the fence, and it is time to turn around and head back to the goal. Sports metaphor!

A Moving Target

The thing is, the PC platform is pretty stable. Steam might introduce a new feature once in a while, and other stores may have their own, but you can really make a PC game with no achievements, no controller support, no instructions, no rating and put it out into the wild. It’s a very kind platform for indie development.

Other platforms have their own requirements which gives them an advantage in user experience. For example, most platforms would require you to have some achievements in your game. But over time platform requirements can change. The very notion of building a forward-compatible game platform is pretty new (and awesome). So suffice to say in the time since I had last pushed code to the Xbox One, things had changed. Had it really been over a year?

Finding the tracks to get back on

My first goal was to get the game running at all. Since the last known build had worked great, I started there. I had to track down all the correct versions of all the plugins and install files, wondering if any of it would still work. I didn’t want to start from scratch but it was a possibility I would have to.

I couldn’t find anything online as all my old bookmarks longer resolved. The platform website went under some kind of revision. So I dug out my old broken computer’s hard drives and went about locating the last installs. At least I had enough foresight to put everything together in its own folder, but the files were too huge to have backed up online.

With everything installed, the game ran! But I had errors with storage. This was a configuration issue on the new platform website. Once I figured out how to do the thing I needed to do to configure things correctly, I got to the title screen!

The latest or greatest

This was a big win because it means I could finish the game with this setup. My other issue is Unity went to a subscription platform. I’d already spent the money on Unity 5, and dang it I don’t want to “upgrade” anything else! I paid to not have a Unity logo at the start of the game. I paid to be able to publish to Xbox One. Now Unity has some absurdly priced subscription for these features. This may not be a real issue but one of personal pride? And an empty bank account?

I just want to finish it and release it. But if I have to upgrade, at least it can be the last thing I do while I grumble about it. If the game launches on Xbox One with a Unity logo on startup, you’ll know it’s because I lost this battle and had to “upgrade” to some latest free version. As a gamer I hate logo screens you can’t skip and I spent good money to not have one on my game. I wonder what happens if I had released 2 years ago and had to push an update this year? I would hope I can still use a “slightly out of date” version of Unity.

The next step was to get my latest code running. A lot has changed. Arcade mode brought new code optimizations and organization. Finishing Season Mode carried over new and better coding habits while cleanup and code organization improved. New game modes were added. And all that adds up to new bugs. I was prepared for problems.

The game ran, everything looked great. I created a new Season Mode save slot! Season Mode began and coach led me to the soccer player’s Floor Target tryouts. Except, no, black screen and crash.

a black rectangle
crash

Problems

I noticed A) my Season Mode save file did in fact save (HOORAY!) and B) I could cause the crash in credits mode too, just by hitting A. It was proving tough to nail down, but using a Debug build got me this crazy error:

Ran out of trampolines of type 2. As opposed to type 1.
oh

Googling Unity and this error led me to the solution to add “nimt-trampolines=512” into the AOT Compliation Options under Build->Player Settings. The weird trampoline error appears to have happened from me getting too Linq-happy. I could replace a bunch of the Linq stuff with a bunch of for-loops, but ugh. Avoiding that was the whole point of using Linq.

Trampolines. I am pretty close to swearing off technology and going Amish at this point.

More Problems

I noticed during testing that if the controller powered on after the game had loaded on Xbox, you could move the cursor but not actually start by pressing A. Weirder still, when I dug into it the joystick hardware was reporting the button press, but not Rewired (the input system that drives everything in the game).

Now on PC I would just attach the Visual Studio debugger and see what’s up, but I don’t know how to do that on Xbox. There’s supposed to be some way, but one of the drawbacks of coding in outdated tools is it’s hard to find outdated help. So back to my old friend the Debug.Log. And my new friend – I am alarmed I didn’t know about sooner — Debug.LogFormat!

If Action A is the ShootFight action why is it false if Button 0 is true? The answer is highlighted for you. This is not on the test.

Thankfully, the online help for Rewired is extremely robust and I was able to use the provided debug code to dig into everything that was going on.

The issue turned out to be the controller map not enabled for that controller. It only happened if the controller was off when the game loaded up. Something specific with my Xbox code, but it was easy to turn the map back on. Fortunately I was able to not only solve it, but uncover an additional bug in this process.

A lifetime ago there was this controller image. Anyway.
anybody remember this?

Another issue to come up was hard to figure out as well, but boiled down to me removing a button from the game! Since developing Arcade Edition, it’s been clear that four action buttons was too many for this game. Also, the CPU team members on human teams took a lot of the fun out of the game when they were the only ones scoring. Making “control ball carrier” the default behavior, and moving the Switch Player action to the Pass button, everything is much simpler now to learn and use. However, I learned the hard way that Rewired’s action IDs are NOT indexes!

     A = 2, B = 3, C = 4, ignore=5, start = 6,

So I fixed it with a hammer. Sometimes that’s the best solution for moving on from an annoyingly long-held, assumption!

Beyond that I’ve been fixing a lot of bugs. Some things I broke on PC and are easy to test, other things only break on Xbox One and it’s harder to nail down. Then the fixes can introduce new bugs and around and around we go! Some highlights:

  • Cleaning up/fixing bugs and inconsistencies between the “classic” player selection and halftimes screens
  • Removing any notion of a “Start” button to start the game, this is now the “menu” button. Pressing A (or whatever Shoot/Fight is mapped to) is the button to start a match/confirm/etc.
  • Adding better instructions, catching controller disconnects, QoL stuff
  • Getting all save/loads working everywhere on Xbox One
  • Getting a nice solid build so I can start adding all the Xbox One platform stuff like Achievements!

Progress?

Slow but steady…

First Xbox One match since 2018!

Long story short, this important milestone means I’m back developing on the Xbox One hardware, and I’m gonna be banging my head against new and exciting roadblocks until I’ve gotten it all done!

I needed a better graph, but I think I made a worse one.

Add a Comment