Monthly Archives: January 2018

Jetboard Joust Devlog #76 – It’s All Relative

Sometimes with code you just have to pick it all apart and start again – and that’s exactly what I’ve been doing for the last day and a half.

Like its main inspiration ‘Defender’, Jetboard Joust has a game world that ‘wraps’, ie once you leave one side of the world you enter at the other – a bit like Pac Man in his maze with the difference that, as the camera is permanently fixed on the player, the effect isn’t so immediately obvious.

To date I’ve been using the obvious approach to this, an approach that I’ve always used when coding this type of game. When the player leaves one side of the world the horizontal size of the world is added or subtracted to/from the player’s location and they appear at the other side. It’s straightforward in principle, seems to make logical ‘sense’, and for the most part works.

But there’s always been these little niggles when gameplay occurs around the area where the world ‘wraps’ and I’ve found myself writing lines and lines of code to circumvent issues to do with drawing (particularly some particle effects), collision detection, and AI. Most of these problems have been solvable without too much hassle but I kept thinking ‘there must be a better way…’.

Then, for no particular reason, a light bulb went off and I had the idea of dealing with wrapping relative to the player rather than to the world itself. In this scenario the player never ‘wraps’, their location just keeps increasing or decreasing as they travel in one direction, but if anything else in the game world finds itself more than half a world width away from the player the width of the world is added/subtracted to/from its location to position it on the other side of the player.

Whilst this method doesn’t really make logical ‘sense’ (static objects like buildings are jumping all over the place in the game world) it actually works much, much better in practice. The real beauty of this system is that if any glitches do occur due to the sudden jump in location caused by wrapping, they happen way off screen so the player is never aware of them – and as fast-moving objects such as projectiles, particles etc only really appear close to the player wrapping code can be completely omitted for these items.

Implementing this was a major change for the game engine and I proceeded very gingerly at first, making sure I preserved the ‘old’ method of doing things in case I needed to switch back, but it soon became obvious this was the right way to go. Various minor bugs have been completely eradicated and I was finding myself able to comment out large swathes of code. Debugging at the ‘wrap point’ is now pretty much a non-issue! I’ve eradicated a fairly major development headache in preparation for working on the enemies.

Dev Time: 1.5 days
Total Dev Time: approx 153.5 days

previous | next

mockup_3x
A Trip Round The World As Seen On The Game Scanner

mockup_3x
One Of The Vast Swathes Of Crap Code I Was Able To Dispense With

Jetboard Joust Devlog #75 – A Farewell To Arms

At last – weapons are done!

This past few days has been 50% pushing pixels and 50% working on shaders for the weapon effects I decided I wasn’t really happy with.

For the grenade launcher I designed a new grenade as I felt the old one was really pretty shite in the cold light of day. Instead of a more ‘traditional’ type of grenade I went for something that looked a bit more sci-fi and this seemed to work better right off the bat. I probably only spent about half an hour doing it (if that) which is ridiculous compared to the amount of time I spent tweaking the previous version. You can see the original here.

For the plasma rifle I felt the old effect was too overblown so went for something rather simpler using a shader rather than particles. The new effect is just one sprite drawn with a custom shader that renders a fade with a low ‘bit depth’ to look pixelated. It also draws small gaps between the (imaginary) pixels. I much prefer the result and it’s considerably more akin to the player’s weapon in Defender which is what I was going for. You can see the original here.

The particle storm (originally ‘spreader’) is a weapon that’s caused me much pain and grief. The original effect (which you can see here) wasn’t bad at all but I felt it seemed a bit clunky compared to the other weapons, too pixelated or something. The new version adds a new sprite at each frame which is drawn with a custom shader to give a blend effect, there’s also some particles that decay very fast at the front of the ‘beam’. To be honest I’m still not 100% satisfied with this but I think it’s much better than the original. I’ll probably come back to this (yet again) at a later date but for now I’m parking it. It’s in the right ballpark now at least.

The pixel-pushing I had to do was drawing version of all the ‘futuristic’ weapons for the upgrade screens. I really don’t have clue what I’m doing with this type of pixel art and the process often feels akin to a monkey trying to write Hamlet by bashing out random keys on a typewriter. It might have been easier if I’d have sketched the weapons out by hand first, the fact that I had no real point of reference for what they should look like made things even harder!

I’m pleased with the end results though I think. The particle storm is maybe still a bit weird (that weapon’s been a bastard to get right all round). I’m also a bit undecided about the pulse cannon – it looks fairly badass in most respects but there’s something about it that reminds me of whale(!) which I don’t really like.

I’m particularly pleased with the gamma ray and sonic boom but in some respects these were the easiest as I was referencing common retro sci-fi tropes.

Dev Time: 3 days
Total Dev Time: approx 152 days

previous | next


The Newly Designed Grenade


The New, Simpler, Plasma Rifle Shader Effect


The New Particle Storm (Why Is This One Such A Bastard To Get Right)?


Pixel Art For All Weapon Upgrades

Jetboard Joust Devlog #74 – Hit Sounds!

For the past few days I’ve been completing the audio for the new ‘futuristic’ weapon set. It’s been quite a task, only eight weapons but over thirty sound files in all including variations.

The process has been the same as for the bulk of the Jetboard Joust audio. I do everything using hardware, most of which is analog, and then some final processing (limiting, eq, compression) in Logic Pro. Very occasionally I’ll add some additional fx using plug-ins (pitch-shifting and saturation were used here), and sometimes I’ll end up layering two different sounds in Logic when I feel a sound is ‘almost there’ but just requires a little extra.

Once the sound is done I then import it into the game to get the level balance right and then either back to Logic for some final tweaks or, sometimes, right back to the drawing board if things really aren’t working in context. Though I was always watching a GIF of the weapon in question when designing, sometimes when you hear it in-game it just doesn’t work. Sounds that are overly reliant on bass frequencies are often particularly problematic as they can clash with the background music and are low in perceived volume (see Fletcher Munson).

Overall this process seems to work well for me. The hardware is fun to tweak, has tons of analog character, and seems to provide the right balance of flexibility and restrictions. If I tried doing the same thing in the digital realm with something like Native Instruments Komplete for example (which I own) I would just get bogged down with all the options.

The key piece of hardware I’m using for this project is the DSI Tempest – a six voice, multitimbral synth/drum machine. It has two analog and two digital oscillators. For this project I’m tending to restrict myself to the analog oscillators but will sometimes use the digital ones for noise samples.

For the hardware fx I’m limiting myself to the four aux sends on my mixing desk. I use a Roland RV-1000 digital reverb, a JHC DX-77 digital delay (both picked up really cheap on eBay), and an Echolution2 Ultra Pro delay pedal. I have a distortion unit on the last send which I switch between the awesome Malekko B:Assmaster and a Waldorf 2-Pole analog filter.

I don’t use any bitcrushers or anything like that. I’m going for a sound that’s pretty much a full-on aural assault in the way I remember Defender being but trying to create that vibe through distortion and the overall timbres used rather than restricting sample rates and bit depth. The result is a kind of hi-fi/lo-fi hybrid.

Dev Time: 3 days
Total Dev Time: approx 149 days

previous | next

mockup_3x
Some Of This Gear Was Abused, None Of It Was Harmed

Jetboard Joust Devlog #73 – Hammer Action!

At last – the final weapon is done! If I think of a cracking idea for another one I might add more but I set myself the task of designing sixteen from the outset (seemed like a nice binary number) and this is #16!

This one’s called the ‘Gravity Hammer’ – much like the ‘Black Hole Blaster’ I didn’t really have much of an idea what I was after from the outset so was pretty much making this up as I went along.

The name comes from a weapon in ‘Halo’ that I came across when searching for weapon ideas – I’ve never played Halo but had a quick look at some footage on YouTube and the Halo version seems to be more of a melee weapon, like a massive axe or something. This isn’t what I wanted.

My version fires a kind of massive ball of gravity that sends anything it comes into contact with plummeting downwards with extreme force. It does damage not at the point of contact, but when the ‘hammered’ enemy hits the ground.

It took a while to code as, not only did I have to worry about the weapon visuals (which were pretty complex) but also the effect the ‘hammer action’ would have on other game sprites. I thought about having the ‘hammer’ just do damage when it made contact and skipping the ‘smashdown’ effect but I’m glad I went through with it as it’s really satisfying in practice. It’s particularly amusing when you have to hit an enemy several times as it looks like you’re playing basketball with them or something!

The visuals are comprised of three key elements. There’s the ‘gravity ball’ itself which consists of concentric eight-pointed stars drawn using my geometry pixel shader, a trail of particles left behind by the ball as it travels, and a larger ‘mandala’ type pattern which is actually a series of concentric six-pointed stars spinning very quickly so it looks like a more complex shape. There’s also another trail of particles left by the ball as its first ‘fired’, two particle effects for a ‘muzzle flash’, a simple animation for the barrel of the weapon when it’s active, and another particle effect for a kind of ‘pulse trail’ when the sequence is over. Altogether fairly involved, but as it was the last weapon I thought I’d go to town!

I also add a six-pointed star when the ‘gravity ball’ comes into contact with an enemy to exaggerate the ‘smash’ effect, a particle trail of ‘speed lines’ as enemies are smashed downwards, and the ubiquitous screenshake to make things seem more visceral.

You’ll see on some of the GIFs that the action swings ‘up and back’ first. This is how I originally had it as I was thinking of hammer throwing in the olympics. Twitter user @Sky_Armada helpfully pointed out that this seemed a bit arse-backwards so I tried it the other way and he was right! It feels much more natural and ‘hammer-like’ travelling downwards first.

At the moment I have this weapon destroying explosives and projectiles when it comes into contact with them, though it flips the affiliation of explosives (so one’s that would destroy the player now destroy enemies and vice versa). I’d like to add the ‘smash’ effect to explosives and projectiles too, or maybe reverse their direction or something? That’s on the ‘nice to have’ list though.

Next step is to do the audio and ‘upgrades’ pixel art for all the futuristic weapons, then I can get on with adding some more extreme enemies.

Dev Time: 2.5 days
Total Dev Time: approx 146 days

previous | next

mockup_3x
The ‘Final’ Visuals With A Downwards Smash

mockup_3x
Having A Smashing Time

mockup_3x
Playing Basketball With Your Enemies

Jetboard Joust Devlog #72 – Stick To Your Guns!

For the penultimate (hurrah!) weapon I decided to go for a heat-seeking ‘limpet mine’ as I don’t currently have anything like that in the game. Not sure if this counts as a ‘conventional’ or ‘futuristic’ weapon as it’s really somewhere between the two.

Most of the coding was done on this before Christmas and I am currently suffering from a heavy cold so excuse the brevity of this blog entry!

It wasn’t that tough a weapon to put into action, for the motion I work out the ideal vector between the mine and its target and then ‘lerp‘ the mine’s horizontal and vertical velocities towards this value (with a set maximum ‘acceleration’).

I found that sometimes mines were getting stuck against the edge of buildings if the nearest target was on the other side of a building, so I implemented a very simply AI that moves the mine to the top of a building if its path is blocked. This seems to work fine and gives pretty amusing results in some scenarios.

The other simple AI I added is a check to see if a target already has a mine attached. If it does, and the HP level of the target is low enough to be knocked out by it when it explodes, further mines will seek alternative targets to prevent them being wasted. This is pretty satisfying in-game as you can just fire a bunch of mines into a swarm of enemies and trust them to find their individual targets.

Actual development of this weapon took about a day and a half, the extra time was spent improving my mother-of-all-geometry-shaders to draw triangles, six and eight pointed stars and add decent-looking fades for all these various shapes. The six-pointed star is used when the mine explodes and I will definitely be using these elsewhere in the game too.

Oh yeah, enemies with limpet mines are rather too dangerous at the moment! I am going to have to implement some kind of enemy-specific ‘pause and reload’ functionality for all the weapons.

Dev Time: 3 days
Total Dev Time: approx 143.5 days

previous | next

mockup_3x
(Vaguely) Intelligent Selection of Target

mockup_3x
Not Getting Stuck On Buildings

mockup_3x
A Sticky Situation

mockup_3x
One of the New Geometry Shaders – Six Pointed Star