Monthly Archives: January 2019

Jetboard Joust Devlog #95 – Configuring Things Out pt. 1

This is one of those devlog entries that seems kind of dull because there’s been a lot of ‘under the hood’ type goings on and not a lot of eye-candy to show for it.

But, it’s taken time and it’s really important to the game’s development so I’m going to blog it anyway, boring or not!

What I’ve been focussing on is the overall structure of the game world and how difficulty progresses throughout the game. At this stage it has been very much a first pass at this, as much about providing the tools to allow me to tweak gameplay efficiently as it has been about balancing the gameplay itself.

I’ve broken down what I’ve been doing into three key tasks:

1. Code Refactoring
As with any game of significant scope, there are multiple interconnected parameters that affect gameplay difficulty in Jetboard Joust and it’s a hell of a lot easier to tweak things if the code that manages these parameters is in one place rather than split across a myriad of individual class files. Consequently I’ve set up a static ‘Config’ class that contains all the algorithms and configuration parameters for pretty much anything to do with rewards and difficulty throughout the game. This has involved a lot of tedious cut and paste but I know it’ll be worth the effort in the long run (it already has really). I’ve set up generic parameters here for the amount things like enemy health and weapon damage/difficulty scale throughout the game so at least I have a baseline to work with and can tweak individual scaling from there if necessary.

2. Mapping
I’ve created a template in InDesign for mapping out levels in each of the game worlds and have been through this with a first pass attempt at placing weapon unlocks and new enemy ‘reveals’ in each. There seems to be enough content to fill four level ‘pyramids’ of around twenty rows each with a reveal rate of a new enemy or weapon every couple of rows. I need a couple of different ‘non-jetboarding’ enemy types but was expecting that anyway, I added an additional jetboarding enemy to span the difficulty gap between the ‘minion’ and ‘master minion’ which was fairly simple to do. I may make the fifth and final world smaller, probably ten rows, with the final boss right at the end.

3. Auto-Levelling
In order to be able to arbitrarily test game difficulty I need to be able to jump to a particular level and have an idea how the player might have ‘levelled up’ at that point. What weapons will they have unlocked and how powerful will they be? What will their base health be? It’s not straightforward to figure this stuff out so I ended up writing an algorithm that takes a destination point within the game pyramid, figures out the location of each treasure chamber before that point, then does a mock play though of the game to unlock each treasure item. On the way I collect the cash that would be awarded for defeating enemies, rescuing babies, and completing ‘sectors’ (rows of the pyramid). Once cash is earned it is spent on the most expensive upgrade available.

It took quite a while to test this code and get it working but it’s going to be invaluable for testing as I can now start the game at any point and have the player ‘levelled up’ as appropriate. Using this code I can also monitor things like how long it will take to level up a particular weapon, how much a player might earn for completing a level at the point weapons are unlocked (hence what a sensible starting price for updates might be) and all sorts of other stuff I haven’t even thought of yet!

4. Basic Gameplay Testing
Using the code above I began going through the game to check and tweak parameter scaling at key points (i.e. the ‘reveal’ level for each weapon and enemy) to make sure things seemed sensibly balanced. Unsurprisingly they were way off to start with but after much fiddling I’ve reached the point where relationships at least seem workable, haven’t done the treasure chamber guardians and bosses at all yet though.

One thing that became apparent was that weapons that are unlocked earlier in the game need to have a greater number of upgrade levels than ones that come later on, otherwise they either ‘max out’ too quickly and end up becoming useless on high level enemies or they cost far to much to upgrade in the early stages. This was particularly apparent with the default weapon (the pistol) so I ended up adding a new default weapon (the .45 magnum, essentially a pistol on steroids) which is unlocked about halfway through the game and has enough grunt to take the player through to the end of the game.

I also ran into a shedload of bugs, it’s been ages since I looked at many of these enemies/weapons so there’s a ton of small issues created by various changes I’ve made. Fixed a bunch of them as I went along (partly why this phase took so long) but I’ve still got a very long TODO list in Trello!

Dev Time: 6 days
Total Dev Time: approx 247.5 days

previous

mockup_3x
Mapping Out The Levels

mockup_3x
Debug Output From The Auto-Levelling Code

mockup_3x
A New Type Of Minion Enemy

Jetboard Joust Devlog #94 – The Armed and the Dangerous

So far this year I’ve been focussing on weapons and the weapon unlock/upgrade mechanic in preparation for doing the wider gameplay and difficulty balancing. I’ve broken this down into three key areas…

1. Ammo Drops
It became clear whilst testing the bosses that the way I was calculating ammo drops was flawed and I needed a better method. The method I eventually came up with is simpler than its predecessor, works far more effectively and should ‘scale’ automatically as weapons are upgraded and the player faces enemies that soak up more ammo. For each weapon I now work out the maximum amount of damage that can be done to any enemy from a clip’s worth of ammo (the amount contained in a single ammo drop). I then scale this amount based on the accuracy of the weapon in question (weapons that have a lower accuracy scale down more as one must assume that not every shot will hit its target). Once the player has dealt out damage to any combination of enemies that exceeds the resultant ammo refresh rate a new ammo drop is awarded. It’s important to record the damage dealt as the amount of damage that would be dealt if the enemy had infinite health, otherwise enemies that are destroyed by the attack score too little and this can really skew the system.

To test this I set up a ‘sponge’ enemy that does nothing but takes loads of damage and tried out all the different weapons on it in turn, tweaking the accuracy scaling and checking the method I was using to calculate the max damage per clip was correct on each one. This was easy for weapons that simply fire bullet-style projectiles but more complex for weapons like the flamethrower. For ‘area of effect’ style weapons like the grenade launcher, RPG and sonic boom I can only really approximate an idea of maximum damage.

Whilst in the process of the above I got pretty distracted re-working the shotgun blast effect as it still didn’t seem to give an accurate indication of the blast’s area of effect. This is the third time I have re-worked this(!)

2. Weapon Switching
To date the player has only been allowed to carry one weapon at a time. If the currently armed weapon runs out of ammo they were automatically switched to the default weapon (pistol) which has infinite ammo. If they wanted to arm a more powerful weapon again (pretty much guaranteed) they would have to pick one up from a weapon crate AND find an ammo drop to recharge it should it have run out.

I decided this mechanic was no fun and therefore, according to the Scott Rogers principle, had to go. Now I am allowing the player to carry two weapons at once – the default weapon with infinite ammo and a (generally) more powerful secondary weapon. If the secondary weapon runs out of ammo the player is switched automatically to the pistol as before but this time all they need to do to recharge it is collect an ammo drop. The new mechanic seems to feel much more natural and fun to me, though I’m a little worried it might give the player the opportunity to over-exploit powerful weapons but we shall see…

As an adjunct to the above I also implemented a key to switch weapons so that the player can switch to the pistol if they want to save ammo on powerful but understocked weapons such as the RPG.

3. Weapon Unlocks
Previously, in order to unlock a weapon, the player had to catch the jetboard of an enemy that was armed with it. This worked OK, but it was a bit easy and I didn’t really think it made a big enough deal of the weapon unlock process.

I’ve decided instead to have weapon unlocks as a type of treasure. Rather than being guarded by a boss, the treasure chambers that contains these weapon unlocks will be guarded by a fleet of enemies armed with the weapon in question. This enables me to make more of the treasure chamber mechanic, adds another layer to the gameplay, and also allows me to use the big ‘weapon upgrade’ icons (which I was rather pleased with) in-game as pickups.

It didn’t take me long to design these ‘guardian’ enemies but I spent a fair bit of time on implementing some special AI for them. Firstly I enabled them to swoop down and steal the player’s health pickups to heal themselves (I may allow other enemies to do this once the reach a certain level), and secondly I implemented a special ‘wrap attack’ whereby if a bunch of them have been chasing the player in the same direction for some time a few will take advantage of the world wrapping by peeling off and heading in the opposite direction to meet the player head on!

The video demonstrates unlocking the shotgun by defeating a small fleet of enemy guardians. They’re pretty tough opponents – as you can see I had to rely pretty heavily on the jetboard attack here and was pretty lucky managing to take out three of them in one go!

Dev Time: 241.5 days
Total Dev Time: approx 4.5 days

previous

mockup_3x
Using a ‘Bullet Sponge’ to Test Ammo Drops

mockup_3x
Enemy AI Now Enables Them To Steal the Player’s health Pickups

Unlocking The Shotgun – Note The Guardian’s ‘Wrap Attack’ Technique