In Space, no-one can hear you scream “Dude, where’s my car?”

Source: +

As the witty title may have forewarned you, this post is indeed about a tracking system I developed for spaceships. Not real spaceships mind… It’s for the game Star Wars Combine , and was the request of a personal friend who also has a website.

Okay but can we talk about that title first?

What about it?


Oh, well it’s a combination of the phrase “In space, no-one can hear you scream” (which refers to the vast emptiness of space, and by logical extension how hard it is to find things that are lost in it), and the phrase “Dude, where’s my car?” from the movie of the same name (in which a man loses his car and goes through a series of wacky hijinks trying to find it again).
Put them together and you get “Crap I’ve not only lost my mode of transport, but I’ve lost it in the vast emptiness of space… That will exponentially increase the hijinks required to find it, what am I going to do? :'(”
To which I can now reply. I have an app for that!*

Oh okay I get it… So you built a neat app that people can use to locate their fictional spaceships in a videogame… That’s cool I guess, but why is there an Asterisk there?

Oh well that’s because I didn’t do that at all! It’s actually a simple website not an app, and it doesn’t help you find your own spaceships, it helps you find other people’s!

Oh I get it, you’re a space car thief!

Don’t be silly, there are many valid reasons for wanting to know where other people’s stuff is!
For example, while the game is perfectly content to tell you where your own stuff is, if your gizmo is inside someone else’s vehicle, it could be anywhere in the galaxy for all you know! You can’t see where the vehicle that has your gizmo in it is, because the vehicle isn’t yours.

So it’s still a thing to help you find your stuff…?

It can be! But it can also be more!
Another example, suppose you really really really have a burning passionate desire to buy a certain KIND of spaceship…
Well you can search for that kind of spaceship and contact their owners asking if they’re wanting to sell theirs!

So it’s just a tool for finding things in general?

Yep! But only space things! Ground things are different.

Okay cool! Give me the run-down!

The Structure

The whole thing consists of a website and an SQL Database.

The web site wraps the database to allow people to search it with a variety of criteria, and to apply updates to it via XML scans produced by the game. The database stores a wealth of space-entity related data (Position, Owner, Type, Name, etc) which it provides to the web site as search results AND to assist in the search in the first place.
Unfortunately, this last aspect is not particularly scale-able, but is very cool.

The UI

(Main Input Section)

The UI is of course, terrible. It’s simple and hopefully straightforward, and it gets the job done. But it won’t win any awards.

Yes you do need to use the right button for the search type you want. No it won’t combine them.

XML File is single-upload.

Entity Attributes boxes are all drop-down complete, ie:

(Each field has suggestions from the DB)

The Results

If you upload a file, it’ll just say thanks.
But if you search. It will tell you a whole bunch of things!

(Space Entity Data as search results, numbers are fudged for testing purposes)

Entity Name, Image url associated with it, time last seen/updated, Galaxy/System Position, Owner, and Type.

Everything except the Image and time can be searched for/by.

I’m pretty happy with it, though as you can see it does have a problem with text encoding (`ZÅ«n` should read `Zūn`), but that’s mostly me being too lazy to comb through the whole encoding pipeline to find out why it’s changing. Either way, the new encoding will show up in the dropdown if you get the part before it right.

The Backend

The Database itself is pretty simple.

The Types, Owners, and Positions are all split out into their own tables as they are being searched on (Matching the owner’s name once in one presumably smaller table and matching by ID in the bigger one for all the stuff they own is probably faster). While the position itself is split into two tables (to save adding two arbitrary 0-21 numbers onto EVERY galactic co-ordinate).

Realistically string lengths could be shortened to share the same values as Combine uses, and the datetimes could also be encoded in a single-unit format to cut down the DB, but I’m not quite that picky.


Cool, cool, now what?

As usual, I’ve created a page for it, I’ve source controlled it in a public repo, and I don’t really expect anyone to use it (excepting the person that asked for it).
It was a fun little project but now it’s over I’ve gotta go find another one…

Stay tuned!