About the project

I started Spacejunk as a spare time project in 2005 after reading "The Martian Way" by Isaac Asimov. Originally, I wanted to make a game about traveling long distances in a space with gravitational fields, competing for collecting debris and using various tools to aid navigation.

At some time during 2006 I got notice of an upcoming national contest of video games in Uruguay (where I live). The video game industry in Uruguay was incipient, so the contest came as a novel mechanism to test acceptance of Spacejunk.

During the preparation time for the contest Mario and Fernando joined the project and provided the artwork. After a long and stressful time, the game was submitted over the deadline, and we earned the second place!

Then the project freezed for a while until I decided to release it with a few touch ups. One of the things I changed was the background story, originally influenced by "The Martian Way", to the ecological problem of junk in space, which I discovered after making of the game and found much more interesting than the piece of fiction I had written.

My thanks to Mario and Fernando who kindly provided the artwork for the game and their consent to publish their work. I also must thank my girlfriend LucĂ­a and my parents for their support during all the Spacejunk creation process.

Some design and implementation notes

The first implemented thing was the physical simulation system. In a first attempt, simple step-by-step updates did not worked because numerical errors made the objects revolve in spirals around planets rather than in ellipses. After some other attempts I got stable ellipses, but the step-by-step updates where expensive to calculate for every frame of animation. The final solution was calculating the updates every few frames of animation, and interpolate the object positions in between.

After harnessing the physics, I turned to decide how to best display the world on the screen. It became evident that I needed a scrolling view in a bigger world because of the long distances in relation to the size of the objects. After playing a bit it was also clear that zooming in/out was necessary to accomplish different tasks (e.g. capturing debris vs jumping from one planet orbit to another).

So I wanted a scrolling view, but Einstein, which body should it follow? Was there an ideal reference frame? What about following the ship? That's the object the player controls. Isn't it? Well, yes ... but it was not such a good idea. When following the ship in orbit around a planet, the planet will look like spinning around the ship, and everything else orbiting around the planet will seem to go in dazzling and difficult to understand paths. The solution taken in Spacejunk was enabling the player to choose which object should be followed, this object was called the Point of View. At a given time the best point of view may be a planet, but at another time the best point of view may be the star the planet is revolving around.

Next, the ship path system was developed. I made an attempt to offer more tools to aid navigation, but it turned out that the path tool solved pretty well the problem of capturing the junk while leaving some degree of freedom for the player to think. Drawing the path presented again the selection problem of a reference frame. The path of the ship seen from a nearby planet may look like a circle or an ellipse,

ship around planet

but if observed from a central star it may look like a sinuous envelope.

ship around star

Given the solution for the scrolling view, it was most natural to draw the path as seen from the Point of View. This allowed to capture debris by selecting them as the Point of View and have the ship path intersect them.

ship for junk

The score system was inspired in that of Maelstrom, a game by Andrew Welch. Spacejunk, though, attempts to reward finishing a mission by economizing actions and fuel rather than fast play.

Here there are some ideas that did not go into the final game.

Facundo Domínguez, June, 2009.