What APIs do I need to implement this? I think there are two:
- A real-time event API, that is telling my app what's going on in the game client right now
- A reference API, that my app can call to query general galaxy information like the government/allegiance/known stellar bodies etc
The first is the critical one: just that alone would make the app possible. I would prefer that API to be provided by the game client rather than from an internet-based API — I imagine it would be faster, more secure and use far less bandwidth to do it that way.
A reference API could be provided by the client or by a web service, because it's not specific to the player. I don't have a strong opinion on which is better for reference data.
I'm prototyping a Mac OS X app at the moment; thanks to shared code I envisage I would make it work on iPhone and iPad as well. What technical requirements does that pose?
- The real-time event API must work over the local TCP/IP network, whether it be provided by the game client or by Frontier servers. Any kind of Windows-specific protocol — such as a named pipe — would mean I cannot make this app.
- If the game client provides the API (as opposed to a public web service), it would be preferable that the client uses a common network discovery service so that my app can instantly find Elite on the network without the user having to type in arcane technical details like IP addresses and port numbers. Personally I'd suggest Zeroconf because it's free, stable and backed by the IETF... and it's popular in the Apple ecosystem so it would make my life easy!
It's better known as Apple Bonjour and so it's natively supported on OS X and iOS, and it has free libraries for Windows and Java (and thus Android).
- As for how your API provides the data — streams or discreet requests, XML or JSON, authenticated or anonymous — I don't think it really matters to me. I'm sure any reasonably common technology could be supported in an app like this.
Note finally that my prototype uses lots of images from Elite: Dangerous itself. I wouldn't want to include your images in an app that I develop, though; that's partly because of the legal difficulties that could present, and partly because it would require me to update my app with new images every time you add another thing. What I'd prefer is that your API provides images to my app in real time. What I'm hoping for is the ability to request these images to display in the app:
- Icons for stars, planets and other bodies — like the system map displays
- Icons for each station — like the vector logo that identifies a Coriolis station and distinguishes it from an Outpost on the system map
- Icons for each trading good — like the icons shown on the commodities market screen
- Superpower icons — eg Empire, Alliance, Federation
- Ship images — either wireframes like the loading screen, or fully rendered
One reason for this is, of course, that it would let our apps look much more attractive. But there is also a practical reason: helping exploration. One thing that I do as an explorer — and I suspect most other explorers do too — is look at the icons of the undiscovered bodies on the system map to decide whether they're worth going to investigate further and do a detailed surface scan on. So the icon images of stellar bodies are critical. It would be wonderful if I could display images of those unknown bodies in the app so that players can make this judgement without having to study the system map — with all the problems of interdictions, crashes and dropouts etc as I described above.
Now it would probably be a bad idea if the API provided specific details about unknown objects — eg an API that says "display the earth-like planet image for this unknown object" — but it could work if the API provides a raw image without description. It would be up to the app to display that verbatim, and up to the player to form an opinion on what the image is and want to investigate further. Some people might abuse such an API and develop image recognition to let players cheat and immediately identify unknown objects, but they could do that with the system map now and I don't think an API would make it significantly easier. Obviously an image API like this would be a lower priority than providing the basic textual data that lots of other people are clamouring for, but it's something that I'd love you to consider...