Sponsored By

Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs.

Galactic Tactics – A Game Jam Story

A rambling on the creation of a Microsoft game jam winning entry. Galactic Tactics took a whole 8 hours to make, won best new game as well as the ready to ship award. It is now available on the Windows 8 App store and the Windows Phone 8 store.

Ben Clavin, Blogger

October 11, 2013

4 Min Read

It was a cold, wet morning and we weren’t exactly confident. We had won the first game jam we had entered a month ago and this would be our second attempt. No theme was announced to us as we stared around at the 2001: A Space Odyssey-like building that is Microsoft Ireland. We had talked before about how fun local multiplayer was on mobile devices and knew this was the direction we wanted to take it. The Microsoft staff were incredibly helpful and supportive with each team. We’re not entirely sure where the idea for a competitive space invaders style game came from but we ran with it fast. I dove straight in to coding the behaviours of our player characters, aliens, barriers and bullets.

Image

Within reason, I like to code my games without instantiating any new game objects while the game is running. Perhaps it’s because I’ve only been coding for a year or so, but I prefer treating mobile games like a puppet show where the action takes place on the stage, and different actors wait for their moment in the spotlight behind the curtain. This proves to be a useful approach for optimizing performance on the less powerful devices. In Galactic Tactics, everything that you see in the game is hiding somewhere off screen. In order to fire, the shooters run through their array of available bullets, move a ready bullet to their position and send it on its path of destruction. The same theory lies behind the spawning of aliens. This keeps the code relatively simple.

for (int i = 0; i < bullets.Length; i++)

{

Bullet check = bullets[i].GetComponent();

if (check.shot == false)

{

bullets[i].transform.position = this.transform.position;

if (player1 == true)

{

AudioManager play = myAudio.GetComponent();

play.PlayLaser();

check.myPlayer = this.gameObject;

check.ShootRight();

}

 

else if (player2 == true)

{

AudioManager play = myAudio.GetComponent();

play.PlayLaser();

check.myPlayer = this.gameObject;

check.ShootLeft();

}

break;

}

}

However, with the deadline of eight hours to deliver the game, obviously some short cuts were taken. The “player1” and “player2” bools, and the repeated audio code above are proof of this. I find the true challenge in coding not necessarily being how to implement a feature, but more so how to implement one that is reusable, tight and fast. Sometimes I achieve this and sometimes I don’t. However, in a game jam, the rule of thumb should be if it looks like it works to the user, then move on. This way a lot of the code was successful the first time, if a little un-sexy if one looked under the hood.

Taking a brief respite from coding, I was able to do up some music and sound effects for the game. Audio always feels like a break for me. It’s too much fun to be considered work and I’m relatively happy with the music I made on this day. Obviously more time would have meant a higher quality but it serves its purpose well.

After the audio was implemented, it was then time to build the project out to our Windows Tablet and get testing. This was relatively painless and simply involved building it out from Unity, opening the Windows Solution file, finding our device and hitting build. The one major roadblock we encountered was that my code had not been written in a way to allow multiple inputs at the same time. This meant that if two players hit shoot at exactly the same time, only one would actually fire. This wasn’t a major issue but it was a fairly obvious oversight on my behalf that should have been avoided. I didn’t have much experience with multi-touch input at the time so I had to learn fast.

After we had finished and the judges had given the games a look over, we ended up winning the “Ready to Ship” category. We were quite content with this and strolled back to our table. However, before we were able to check out our goody bags we got called up again. We had won “Best New Game”. Our polite smiles of thanks were replaced with our very sincere laughter. It was an honour to be handed the award and it gave us the incentive we needed to bring the game to the public. But that’s another post…

http://apps.microsoft.com/windows/en-us/app/galactic-tactics/d397eb91-2f32-4bb8-b206-51da3e69e821

Read more about:

Featured Blogs

About the Author(s)

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like