Skip to main content
  1. Writing/

Building OpenSpartan

Few weeks back I alluded to the fact that in my free time I am building a little project called OpenSpartan. I thought I’d share a bit more as to what it is. At its core, OpenSpartan is an expanded homebrew companion to the default Halo Waypoint experience. Its origin stems from my sheer curiosity for Halo stats, which goes beyond simple match details. Halo Waypoint is very nice - it offers you the leaderboards and stats at a glance; however as I kept using it to track my performance I often ran into questions that I had no answer for, such as:

  • How far I am from the Hero career rank?
  • What are the most epic medals that I’ve earned?
  • What is the team MMR over time for matches I’ve been part of?

And others, of course. For some of them I tried to create snapshots in my dedicated Halo stats page on this very site. For others I wanted a bit more ad-hoc analysis but couldn’t quite see the data easily. I should also mention that for some metrics I’ve previously relied on the Halo Waypoint applications, however those have since been sunset. But as I thought more about what I actually needed, this reminded me of Destiny and its ecosystem of companion apps (Bray.Tech being a particularly awesome example). Why not build a companion myself to help me quickly see my historical insights, especially given my past experience with the Halo Infinite API?

Enter OpenSpartan.

Screenshot of the OpenSpartan main window

It looks a bit messy, so please forgive the lack of polish on this alpha release. OpenSpartan is, at least at this point, a Windows application that I bootstrapped to help me easily peek at all relevant game stats and customization configurations.

What you see in the screenshot above is a partially working prototype - it correctly authenticates with the required services and returns all data for the logged in user. OpenSpartan also correctly pulls the visuals for the spartan ID and the current career rank, which I am especially happy about. Compare the above to the actual in-game identity:

Screenshot of Halo Infinite showing the Spartan ID

While the basics are there, a lot of the experience pieces, like the weekly deltas (those dummy percentage values you see), medal presentation, match details, and fancy graphs, are all yet to be built. It’s slowly getting there. The stack for the app is the following:

  • .NET and C#. A fairly non-adventurous choice if you’re building for Windows with cross-platform aspirations in the future.
  • WinUI. The de-facto modern framework for Windows applications. Supports XAML and all the great things that come with it.
  • Microsoft Authentication Library (MSAL) for .NET. The library helps me authenticate users with their Microsoft accounts and give them access to their Halo Infinite data.
  • SQLite. Stores stats locally so that I don’t have to ask the Halo services for all match details over and over when they are immutable.

While the stack is pretty vanilla, you might also notice that the “SQLite for data” approach is something that I am re-using - I’ve been leveraging the database for my automated stats generation. It’s versatile and lightweight enough that I feel confident using it locally. The beauty of having SQLite as the backing data store here is that users of OpenSpartan can, at any point, analyze their own snapshot data through SQL queries, whether through custom code (e.g., in Python notebooks) or through a tool like DB Browser for SQLite. Want to join some tables in SQL with some custom data you’ve acquired through a different API? Not a problem. As a bonus, the SQLite database always carries a snapshot of the full JSON response, so even if some fields are not available as their own columns, those can be extracted post-factum.

Screenshot of DB Browser for SQLite

Anyway, long story longer - I am trying to see just how useful I can make the companion client app running on Windows, and maybe see if it’s useful for others. If you haven’t yet, go to the OpenSpartan homepage and drop your email in the hat if you’d like to pilot the tool.