1 Sep 2014
August 2014 - Junk Shot
unityspaceretrogravityasteroidsdigital

Occasionally, frequently, really almost all the time, my ambition exceeds my time and abilities. Such was this month for my 1GAM project. I've got a tabletop idea that I think has a lot of potential, but it became apparent that I wasn't going to get it into a workable state by the end of the month. So, time for Plan B - do the exact opposite of what I was doing. Take someone else's idea, crank it out game-jam-style in less than 24 hours of dev time, and get it wrapped and shipped.

So when I saw this tweet from The Daily Challenge (@DailyGameDev):

This week's #weeklydevchallenge; make a game where the main mechanic is using player-placed gravity fields. #gamedev #gamedesign 7 days left

— The Daily Challenge (@DailyGameDev) August 25, 2014

...I figured that was my place to start, and shortly thereafter, I had Junk Shot.

Junk Shot

I also wanted to at least walk past the 1GAM theme for this month, Fire, on my way to this game, so I was thinking about fire as a verb, and what you could fire other than the obvious guns and gun-like weapons, while also coming up with a way to incorporate gravity. A quick prototype later of creating a stream of objects and using gravity fields to change their course, and I came up with the basic idea of Junk Shot.

In a relatively near-future setting, a space-faring mining vessel in the asteroid belt belt suffers an unspecified calamity, leaving many of the ship's systems disabled as it drifts among the asteroids. To defend themselves, and the shield that protects the ship from impacts but can only absorb a limited amount of energy, the crew uses a "mass driver" tool which fires debris from the mining operation straight ahead. Since the mass driver isn't intended as a weapon, it has no method of aiming, so the crew uses a "gravity grapple" device which can manipulate gravity in small areas, allowing them to redirect their mass driver projectiles into the paths of approaching asteroids. When an asteroid is destroyed, it may leave behind small bits of debris suitable for use in the mass driver, or it may leave behind exotic hadronic matter, which can help replenish the ship's energy and keep the shield operating longer, so the gravity grapple can also switch to a "capture" mode, which flings debris and energy toward collectors on the ship. Once I realized the game involved firing a stream of trash in an attempt to avert disaster, only one name seemed appropriate.


Make no mistake, this is a very old school scenario, and the similarities to Missile Command and Asteroids are not lost on me. This is not a situation that you are going to survive. In the end, the asteroids will always win. I decided to embrace the simplicity and use the same motivator as those classics - good old-fashioned scoring. You're awarded points for every asteroid cleared, and in the end your score and total survival time are all you have.

As usual, when I have music, we have Ben Freund to thank for his smooth, soothing sounds of impending destruction in the cold near-vacuum of space.

The Verdict

Probably just what I needed - get out of my head and game jam something out quick, rushing to get it done ahead of a looming deadline days away. I got to experiment with some new things, which is generally a good idea - I'd never done a "bullet hell" style game so I'd never worked with this kind of pervasive object pooling, and I used the beta of Unity 4.6 to try out the new UI tools. Overall, it's playable, it has a certain nostalgic simplicity to it, it's possible to learn it and improve at it, and it can get pretty challenging even for me after a while. I think we've got a game here.

Note: the following builds are available for testing purposes but I don't have the ability to test them. These are Unity builds so I don't anticipate any serious issues, but I can't vouch for correctness or performance of these builds.