Jetboard Joust Devlog #78 – Return of the Evil Mothers

Too long since the last update. Had a lot of shit on – decided to fight a parking ticket issued by one of those fascist private parking companies and it ended up in court. I beat the tossers but it took so much time preparing the defence and everything I’m not sure if it was worth it, just did it on principle really as I don’t like scammers or bullies. Turns out these scumbags didn’t even have the right to operate on the land on which the ticket was issued in the first place!

Anyway, back on topic, the first major ‘new’ enemy is actually an ‘old’ enemy redone, but I don’t think there’s any shame in that. If you’ve been following this for some time you may remember the ‘Evil Mother‘ enemy. Well, I’d come to the conclusion that this enemy just wasn’t big enough and would work better (and make more sense) as some kind of mini mothership that spilled out its occupants when destroyed.

So I spent quite some time designing a kind of ‘bathysphere’ type craft. It’s actually several different sprites in one, the ship itself, the pilot, the ‘antennae’ on the top which acts as a weapon, plus the various lights. I’m pretty pleased with the result though a little worried it looks a bit too ‘2D’ and could do with some more shading or something to make it appear more ’rounded’.

I also increased the size of the enemies that spill out when the craft is destroyed and spent quite some time working on a much improved bullet that tracks the player’s movement in a similar way to the Limpet Mine. There’s also a ‘tell’ that the ship is going to fire as you can see the antennae at the top charging up.

The shaking effect is achieved by applying an offset to the ships position each frame. These offsets are always evenly distributed and chosen at random so it’s a very predictable type of brownian motion.

I think I’m going to use the original enemy design as more of a ‘swarm’ type enemy with a movement type that’s an homage to the original Space Invaders!

Dev Time: 3 days
Total Dev Time: approx 159 days

previous

Advertisements

Jetboard Joust Devlog #77 – Keeping Your Enemies Close…

Been working on some new jetboarding enemies over the past few days, so around a day of pixel-pushing and a day of coding with the extra half day fixing bugs caused by the new ‘world wrap’ technique I described in my previous post. I’ve also been rejigging my sprite sheets so the art used for the jetboard and weapon attachments is duplicated on the enemy sprite sheet (fewer spritebatch calls to the GPU needed and should also make things easier if/when I add alternate colour palettes).

Fortunately new jetboarding enemies are relatively simple from a code point of view as a much of their ‘personality’ is defined by tweaking parameters already present in the AI. I also have a fairly decent template for doing the animations now too. Here are the new enemies that have been added, names are just codenames really so may well change…

1. The Master Minion
This is really just a bigger, stronger, and slightly more dangerous version of the omnipresent ‘minion’, the game’s cannon fodder. They’re quicker to snatch your babies away and mutate too!

2. The Ninja
Small, fast, light, very aggressive, but also pretty weak. This guy is very dangerous and performs a ‘pincer movement’ around the player really frequently making him a tough opponent to deal with.

3. The Aggressor
This guy is strong, fairly nimble, and very aggressive when you rile him but he’s actually pretty dumb and will let you sneak up behind him and get in the first shot. A bit like some of the knights in ‘Dark Souls’ (well, kind of)! You can tell which way he’s facing by looking at the scanner. This enemy required some custom AI work.

4. The Thug
This guy is very big and strong and takes a lot of ammo to dispatch. He’s pretty slow though, and not the brightest lamp on alien street either. I was particularly pleased with how the art for this one worked out.

5. The Snatcher
All this guy cares about is stealing your babies and trying to mutate. It’s like he’s a kind of half-mutant already and is desperate to finish the job. He’s a bit of a coward and will actively try and avoid the player unless directly engaged – watch him though, as he’ll snatch away your progeny and mutate really quickly if you don’t keep an eye on the scanner! This enemy required the most custom AI work.

This brings the total of enemy types to 12, I think I’m going to try and bring it closer to 20 and want to add some ‘miniboss’ type enemies with much larger sprites. few more smaller ones to do yet though…

Dev Time: 2.5 days
Total Dev Time: approx 156 days

previous | next

mockup_3x
The Master Minion – Upgraded Cannon-Fodder

mockup_3x
The Ninja – Fast And Dangerous

mockup_3x
The Aggressor – You Won’t Like Him When He’s Angry

mockup_3x
The Thug – Strong But Easily Outwitted

mockup_3x
The Snatcher – A Devious Coward

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

Jetboard Joust Devlog #71 – (Black) Hole In One!

This was the first weapon that I really didn’t have much of a clue what I was going for when I started it and, ironically, it’s probably turned out to be the one I’m most pleased with!

When I set up the placeholder for this one ages ago it was called ‘Storm Bringer’ and I had an idea it was going to involve some kind of ‘particle storm’ type effect, a bit like those fireworks you get that fire out a ton of different sparks that go off in different directions.

However, I’ve already changed the ‘Spreader‘ weapon to be called ‘Particle Storm’ and, as that now does something very similar to what I intended this weapon to do, differentiating this weapon proved difficult.

I tried a series of variations with a bunch of particles moving in a constrained and stuttery ‘Brownian Motion’ type manner but this all looked shite and, to be honest, given that I’ve done so many of these weapons now I was beginning to feel like I was running out of ideas and motivation.

Then came a random source of inspiration. In my very skunkworks home studio I have a rack for audio gear that I’ve cobbled together over the years from various shitty pieces of Ikea furniture and stuff. In an attempt to make this more uniform (as nothing matched and my workmanship was so terrible) I covered the entire piece with Jack Kirby art from a bunch of old Spiderman and Fantastic Four comics I had as a kid.

On one small section of this there’s an image of a character disappearing into a kind of black hole, the image is drawn in negative and looks really striking. I had vaguely considered a weapon called ‘Black Hole’ (though I was worried it would be too similar to the ‘Sonic Boom‘) so I decided, largely out of desperation, to try switching the particles I was using to very dark circles with a light outline. I thought this would look ridiculous but, to my surprise, it actually looked kind of cool!

It’s not a single black hole though, so I hit upon the concept of a weapon that fires a series of mini black holes that suck the life force from enemies. Stephen Hawking would probably turn in his grave but I liked the idea. I’m calling it the ‘Black Hole Blaster’ which, thankfully, just about fits in the space I’ve reserved for weapon names in the HUD!

I worked on this ‘negative space’ effect some more, adding a layering system to my particle code so that I could draw all the white outlines ‘behind’ the black circles, this gave the effect of a unified black mass with a white outline which looked much better than a bunch of circles overlaid. As usual there was a lot of tweaking and messing around here (I didn’t really have any point of reference for the effect I was trying to create other than that one comicbook panel) but I’ve ended up with something I think works.

There’s five layers of particles in the final version two sets of black circles with light outlines (one smaller than the other) and the concentric circles you see overlaid which (I think) help to give the impression of some kind of black hole rather than simply black smoke. It was difficult to get these concentric circles subtle enough to suggest ‘black hole’ without overwhelming things, I had to do a lot of messing around with the frequency and distribution of them. It’s possible that I’ve erred to much on the side of caution and could do with a few more of them. It does look a bit like some kind of weird satanic flamethrower but I don’t think that’s necessarily a bad thing!

Lastly, whilst working on the collision detection (which was very straightforward) I thought it might be a nice touch if these mini black holes exerted a small gravitational force, actually sucking enemies towards them. This was pretty fiddly to code, and my initial version was ludicrously powerful, but it did seem to work and help to differentiate this weapon nicely from some of the others.

So I think I’m pretty much done with this one now. I’m really pleased with it, both in the way it looks, but also for the fact I’ve never seen a weapon quite like it in any other game (though some smartarse will no doubt point one out to me)!

Only two weapons left to go!!

Dev Time: 2 days
Total Dev Time: approx 140.5 days

previous | next

mockup_3x
The Jack Kirby Panel That became My Inspiration

mockup_3x
An Early Draft Of The Weapon

mockup_3x
The Final(ish) Version

mockup_3x
Too Much Suction!

mockup_3x
Black Hole Dogfight!

Jetboard Joust Devlog #70 – Shred-ache

At last – a weapon where I can write about something else other than endless tweaking of shader and particle effects (though there was still plenty of that involved)!

The Shredder is another weapon inspired by many wasted hours playing Turok 2 on the N64 back in the day. In Turok it’s a weapon that fires a laser that bounces off anything it hits, you can it in action here.

I knew that to get this mechanic to work I was going to need a method of collision detection that was more robust than the current system I’m using due to the speed the shredder’s ‘beam’ would be travelling. My current system relies on objects actually colliding at the point at which the collision checking is done, this is fine for the most part but will fail when very fast objects more ‘through’ smaller objects (the so-called ‘bullet through paper’ syndrome).

So I started looking at how to implement a basic raycasting algorithm to check for collisions instead. I am not great at Math(s) so was slightly dreading this, but thankfully I found a YouTube video that was able to explain to explain the calculations involved in simple raycasting here. There’s some very clear code linked to from that same video.

I was able to implement a decent enough raycasting algorithm fairly painlessly, so the next step was to work on the visuals. I didn’t really like a plain ‘laser beam’ type effect as is used in Turok, so began working with smaller particles instead. I felt a weapon called the ‘shredder’ should look at least vaguely like it’s tearing things to pieces!

After several hours of tweaking particle parameters (a process I am now getting a bit tired of) I managed to settle on an effect I was pretty happy with and seemed to fit with the name ‘shredder’. There’s two sets of particles here, one which stays aligned with the ‘beam’ and one which drifts away from it. Also particles are added when the ‘beam’ reflects off a surface.

I uploaded this to Twitter thinking I was done, but after coming back to it felt the trail of the ‘beam’ was too dispersed. It needed some kind of central ‘pulse’ or something. I also had some feedback, again via Twitter, to this effect so I wrote a simple shader that allowed me to taper a beam out to a point and used this. I also focussed the distribution of the particles a bit more.

Now I think I am done!

Dev Time: 2 days
Total Dev Time: approx 138.5 days

previous | next

mockup_3x
First Steps Testing The Raycasting Algorithm

mockup_3x
Adding Reflection And Testing A rough ‘Laser Beam’ Effect

mockup_3x
The Point At Which I Thought I Was Done

mockup_3x
The Final Weapon In Action

Jetboard Joust Devlog #69 – Boom Boom, Shake The Room!

This latest weapon is called the ‘Sonic Boom’ and I had a fairly good idea of what I wanted it to look like visually before I started. Something akin to radiating circles but not so regular in feel.

I remember seeing something as a kid in a book about optical illusions (we had no Internet then, kids) that always stuck with me – it was an image comprised of two sets of concentric circles, the centres of which were slightly offset. It made your eyes go funny and that was a good thing.

So I started on that basis, by updating the geometry shaders I discuss here to include multiple sets of shapes that are offset by a certain amount. It took quite a while to get this working in a way I was happy with (and to structure the HLSL in a way that was sensible and would allow me to add other shape types easily), but the result was pretty satisfying if nothing like the effect I set out trying to achieve!

I realised there was just too much being drawn in the shader so I set about adding some different paint modes to vary the effect created. As well as the original ‘OR’ logic (if a pixel contains a shape it’s drawn) I added AND, XOR and NOT modes that react differently, particularly where shapes overlap. For the AND and NOT modes I allow a number of overlaps to be specified, with AND any pixel that contains >= the number of overlaps is drawn, with NOT and pixel that contains < the number of overlaps is drawn.

By combining these modes and a lot (and I mean a lot) of tweaking I was finally able to achieve the type of effect I'd set out to create. The final version consists of two overlapping geometry shaders for the bulk of the effect, particles around the barrel of the weapon, and a smaller 'negative' geometry shader also around the barrel of the weapon.

As with most of these weapons, the actual mechanics of it were pretty straightforward to program. It acts really like a kind of RPG that must be 'charged' before being released, if anything it's even simpler than the RPG because I'm allowing this one to travel through buildings (I'm not sure if I'll keep it like that or not, it does seem a little weird).

I did also have to update the enemy AI to allow them to cope with a 'charge and hold' type weapon but that was pretty easy. The audio design for this one's gonna be fun!

Dev Time: 2 days
Total Dev Time: approx 136.5 days

previous | next

mockup_3x
First Stab At Updated Geometry Shader

mockup_3x
Adding Different Paint Modes To The Geometry Shader

mockup_3x
The Final Sonic Boom Effect

mockup_3x
Adjusting Enemy AI For ‘Charge And Hold’