Gunjoust – Postmortem

Posted by (twitter: @_Tangrin_)
August 29th, 2013 4:25 am


Gunning & Jousting, when?

Ok, so this is the story behind Gunjoust. I was on holiday for two weeks in Austria and returned last weekend. I live in the Netherlands, so the drive back takes about 10 hours if you don’t stop and are very lucky, but during summer you are never lucky on saturdays on the road, ever! So while being stuck in one-lane traphic hell in the beautiful Austrian alps I was thinking, would it really be wise to enter LD when I get home? So on the way back I tanked up on Mc. Donalds and Red Bull and when I got home around 1AM on a saturday night/sunday morning, I somehow wasn’t tired (caffeine overdose), or at least I had convinced my brain I wasn’t, and so Gunjoust started.

Gunjoust, what?

Having only about 24 hours left to LD I knew this was not a smart plan, but I had the Gunjousting idea in my head all day. What if you have ten seconds to spear, humiliate and annihilate your opponent? You need something to do while riding up to your target, so why not dodge and shoot at him, right, right? RIGHT! So that is how it started.

Gunjoust, how?

This is a 3d game and having quite some experience with unity I decides to go with that. I also wanted to try this new Mecanim stuff for character animation, which turns out to be pretty damn sweet. For the characters I just don’t have the time to make real human beings and horses, so I knew it would be mechanical. I was not sure if I should go with horses though. I was thinking, maybe I should go with dinosaurs. Does anybody remember dinoriders?

Ok, so maybe it is from before your time, I don’t know, but that was such a cool idea. Look at it, dinos with lasers! Can you imagine jousting on one of those velociraptors? But it would be too much work! So I went with steampunk robots instead. The horse modeling and animation was done on saturday night, I went to bed around 5-6 am I think feeling very satisfied, but also worried because all I had was a horse and not a single line of code. I told myself, you are doing it again, art before code, bad, bad idea.

Sunday, sunday, gotta get down on sunday!

So I get up on sunday around 10am I guess. Got some breakfast, coffee, coffee…And then I started coding! So basically building the game was quite straight forward at first.

  1. Import model
  2. Have the model play the walk animation and walk down the lane
  3. Duplicate model, have it walk down the lane from the other side(this is your enemy)
  4. Setup triggers/physics so that you can detect where hits happen, then have callbacks on those components to some main class that handles all these different impacts gracefully.
  5. Dock the camera to the model, have a look around script that is limited, I was kind of in doubt here. It is currently clamped to a rectangular area in front of you, but I thought rounding the corners might feel better. Messed around with this a bit, decided it wasn’t worth the time.

So at this point I basically had the characters running down the lane and you could detect impacts. I still had the shooting part left. Now, the shooting was a bit tricky. Normally a gun is in a fixed spot on the player, aligned to the bullet direction and the crosshair. But in this case the lance is going all over the place so aligning the aim is a pain, bullets go where you don’t want them to go. So what do you do? Fake it! I am not shooting the bullets from the lance at all, but from position a little to the side/in front of the camera. This way the bullet always travels a good path that makes sense to the player.

After this it was pretty much polishing the game as much as I could with the couple of hours I had left. One part that had me stuck for a while was the dodging. The lance arm is setup with Inverse Kinematics. Which basically means you move the lance and the arm will follow. But, when you are also dodging left and right it becomes more tricky. Mecanim is in control of all the bones, so in unity you can update the torso rotation after Mecanim is done with it, but then Mecanim has already calculated the IK, so the arm will move away from the lance. Instead I had to do it all in Mecanim. I decided to go with three animations, a neutral sitting one, one dodging left, and one dodging right. With blend trees in Mecanim you can mix these animations based on variables from script. So my conclusion is that Mecanim is a pretty amazing piece of technology and you should definitely give it a try.

The final hour

In the final hour I added the environments, the menu screen and the sounds. I basically worked until the last minute and just ran out of time. It just wasn’t done, there were no victory conditions, no final polish like hiding the mouse. There was just a lot missing to make it a solid entry. So at first I thought, I am not going to submit it. I sent a build to Benn¬†(click his name and play his entry, it is really good), and he told me I should definitely submit it. So if it wasn’t for Benn I wouldn’t have submitted at all :).


I think most people actually like the game. I was positively surprised again by the LD community, really, the LD community is probably the coolest group of people on the entire Internet. I am glad that people could look past the flaws and lack of polish and simply enjoy it.

What is next?

After reading the comments and feeling very happy, I noticed some people mentioned they would like it turned into a full game. At first I did not take the thought serious, but now a couple of days later I am thinking, why not?
So if you have played the game, and have ideas on what I could add please leave me a message, either here, on twitter @_tangrin_, or just shoot me a mail at

Oh, and for the people who have not played it yet, here is a link:


One Response to “Gunjoust – Postmortem”

  1. Ariake81 says:

    yeah dino riders! nice memory :)

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]