Skip to main content

A (Not Quite So) Elite Board Computer

On the Nostromo, Ripley could speak with MOTHER, the Discovery One had the infamous HAL 9000 onboard in 2001, and Luke casually chatted with R2-D2. All in natural language (though the return channel sounded rather technical in the latter case).

And what am I doing? Jumping to the year 3309 in the Elite Dangerous universe. Me in the cockpit… clicking around on a screen! Navigation… click… scrolling through the solar system list… click… planet selected… click… destination set.

Admittedly, it’s actually pretty cool. I’m still amazed at how Elite’s board computer is virtually “physically” integrated into the cockpit. Very immersive. But what if I could talk to the computer? The idea appeals to me. I’m considering writing a small program, a virtual co-pilot.

Today We Build Ourselves a Board Computer #

What do I need for this? Voice input? Let’s do it with Sphinx. Voice output? Mary comes into play there. Then the digital colleague should naturally know something about the game, ideally even receive real-time information. Luckily, that hasn’t been a problem for a while now. In the first years after Elite Dangerous’s release, clever hackers eavesdropped on Elite’s network logs, laboriously extracted information from screenshots, or even snooped around directly in memory. Since 2016, all that is history: Developer Frontier introduced the Player Journal. Relevant in-game events are conveniently written to JSON files there.

The journal contains current events, for example when the player takes off, lands, approaches a planet, scans a celestial body, jumps from one star system to the next, and much more. Here’s a small problem: Because only current events are logged, it takes time until my board computer can build a complete picture of its surroundings. That’s where EDSM (Elite Dangerous Star Map) comes in. Through it, I can load a complete map of my environment with lots of useful additional information.

My board computer is then pieced together with Java and libGDX. Why libGDX? I picture running this fun on a second monitor while I play on the main screen. My little digital co-pilot could then, for example, also display a star map, show the planned route, or display some text. LibGDX is a game development framework for Java, which I’m currently also using for another project.

The Build Instructions #

So, the final plan looks like this:

  • Java forms the foundation
  • Sphinx listens to my voice commands
  • Through the Player Journal, we access Elite
  • LibGDX puts something on the screen
  • Mary generates a spoken answer

For the Elite connection, I find a small library on GitHub. It lets you register small event listeners for all kinds of events. Despite this helpful library, I unfortunately can’t avoid writing many small Java mappers for data about stars, planets, etc. Maybe I should have used Python. There’s also a lot of manual work going into the spoken texts. After all, everything needs to fit the situation. At one point I try out ChatGPT’s programming skills: I have it write a method to convert stellar classes into colors.

Tell Me About the Stars #

To address the board computer, I need to come up with an activation word. In a fit of maximum creativity, I decide on “Computer”. Then it records my voice for a few seconds and compares what I said with a command palette. My first version of the command palette is still very manageable. Besides a few options to zoom and rotate the star map, it can mainly analyze the current target. I’m currently in the ‘Harpulidna’ system, and this is what it looks like on my “board computer”:

screenshot.png
The star map follows the color scheme of the spaceship displays in Elite Dangerous.

And it announces the following text on the audio track:

‘Harpulidna 4 d’ is a Icy body. The gravity is 0.50 G. Your ship is able to land on this planet. Material analysis shows a composition of 27 percent sulphur, 22 percent carbon, 14 percent phosphorus, 12 percent iron, 9 percent nickel, 5 percent chromium, 5 percent manganese, 3 percent vanadium, 1 percent tellurium, 1 percent niobium and 1 percent tin. Atmosphere detected. It consists of 100 percent Argon. The average temperature on surface level is about 52 Kelvin.

Most of it is pretty useless to the player and pure fluff. Exactly right, then! Wonderfully suited for some atmospheric background noise as I fly through what is otherwise much too silent space. And that doesn’t have to be all: The journal has much more to offer for further shenanigans. From here on, this little project starts to feel like work. Crafting text for speech output is tedious work, especially when you want some variation. Otherwise, everything sounds the same, like a broken record. Maybe I’ll leave it as is for now. And if I ever decide to ride my Diamondback to Beagle Point, I’m sure I’ll still find the occasional hour to build some fresh dialogues.

I did have to quickly implement a new voice command, though: Shut up! Sometimes I just want to enjoy the silence of the void.