Saturday 31 August 2024

Anniversary 10 Years On Steam

  

Airship Dragoon has been on Steam for 10 whole years. Even Albert Spier only got 30 years in Spandau ...

To celebrate this monumental event I put the game on discount of a whoppinh 95% ... but Steam only allowed a 94% discount due to transaction charges converting into US dollars. So 94% it was, slightly odd number that it is.

One of the interesting things that I found was that the Far East of Korea, Japan and China did make the top 10 for sales. This was especially gratifying as I knew there were plenty of pirated copies in the early days floating around China due to the amount of traffic my website got to download the additional map pack.

In other news, August draws to a close. A month of scorchio sunshine, sitting out by the veg patch, absorbing vitamin D in non-capsule form and sewing myself a medieval bag hag (summer pattern), going to make a winter one with felt to ward of hypothermia later. 

Alas the baking sun meant that the veg patch was going bone-dry, especially as the water barrels had been emptied. Roll on some rain, in fact after the utter soaking for the first half of the year, if it could just have kept a bit back for mid-August instead of swinging from "I need to build an Ark" to "I need a Thumper to distract the sandworms", it would have been appreciated.

Behold my mighty carrot crop! That was it ...

 When it finally did rain it did at 3.30am, so I was outside changing water barrels over with a coat over my jim-jams. If anyone has a working weather control machine who is not CIA, please could I have some more rain.

I also updated the demo for Monsters Loot Swag, to the most modern working build of the game. The old version of the demo had been removed due it being built with Ye Olde game engine version which predated Torque3D 4.0 and the fancy asset system and PBR (Physical Based Rendering) materials.

In other indie game dev news, I finally fixed all the networking jitter I had previously been fighting ... by simply ripping out the custom player class code I had written and using an actual seperate camera system. I had always had a sneaking suspicion that trying to go through the player class and directly use the player object's own cam/eye node might not be the best way of doing things, and in the end, said sneaking suspicion was more jumping up and down suspicion with total loss of stealth abilities.

I decided to use the Open Source 3D Action Adventure Kit camera system as a base, and after a bit of modding I got it to work with my existing lock-on target system. Behold - moving AI who have been locked on by both hosting client and remote client - now without any jitter!

So that was August, and now we will be onto September, named after the Greek "sept" meaning seven, because it's the seventh month ... or at least was until two despots added new months after the sixth one, and conveniently named said months after themselves ...

Anyway, next up on the dev frontier, Monsters Loot Swag only needs 1 more level with enemy boss, and 2 more unlockable players making, before a bit of tidying up to finish it off. I am not in a rush however, as I would rather ship in early to mid 2025, and thus give myself time to get the next game concept furthered more, hopefully to the point of having some real gameplay and a store page available for coming soon™.

As my previous attempt to drum up interest with the Monsters Loot Swag early access release didn't achieve any support, I might try an open beta next time.

Wednesday 31 July 2024

More Third Person Melee Mayhem

Finally, summer has arrived in the dreary part of grim northern climes, though July started as June ended, with weather best described as "crap", and a sudden return to wearing jumpers.

Game development-wise things have continued much as before, with the vast majority of effort being aimed at the third person melee project demo.

I had long wondered what the best way of getting different clothing and armours onto a model would be. Many moons ago there was a turn-based RPG there was a post-apocalyptic neo-Roman game ... who's name escapes me ... and they literally had to load every piece of armour that the player could wear onto a single model and use the "hide/unhide" commands. 

Well many moons on from this and it looks like the only way to accomplish such things appears to be in the same manner, as you cannot just mount meshes and have them conform to the character's skeleton and mesh weight painting. Deciding that making a single model with EVERY PIECE OF CLOTHING that could ever be considered was not a great method for potential later updates, I delved into the engine to see how best this could be accomplished with code and script. The answer was to add a list of meshes to the character model's constructor, though this did mean it all had to be done at preload and was thus impossible on the fly, so once again, we are back to "hide/unhide" commands. However, at least this way it could be automated to search for all available meshes (and their LODs, which have to be added seperately per mesh), rather than sticking it all in the model and never being able to change it later.

Behold The Hat Of The Ages!

The Shape Constuctor code for adding meshes was somewhat out of date and relied on directory locations, so I updated it to deal with the engine's asset system. I'm thinking it would be best to have a function look for all relevant assets - probably from a folder naming system - and then add them all at runtime preload to the character mesh, followed by immediately hiding the added meshes and then only displaying them on the model when specifically called for; eg: when the player slects clothing or armour. I am not currently certain what the limitations on numbers of meshes would be this way.

Orientated Box Outline In WorldSpace

 Speaking of coding, it took long enough to get my custom code and the debug drawer to agree exactly how an oriented box works in world space. I had an idea for testing for blocking and parrying by using the actual strike/bounds box of an object, except weapons are not actually objects at all but are virtual due to the FSM system. After some testing I decided it was going to be difficult enough to make a successful parry this way and will probably go down the Dark Souls route of using animation frame timings - though unlike Elden Ring, I very much want to avoid this being tested on the client side as that appears to highly exploitable to hacks.


 Whilst I had coded a lock-on target system a few years earlier, in practise at melee attacks it was not always easy to actually strike the target, regardless of it being screen centre, and quite often I could miss and my strikes would go just wide. I decided to code a toggleable "face target" system, thus allowing the player to decide whether they wanted to absolutely aim for the enemy at the loss of movement speed due to circling side to side or backing away.

This worked fine but seeing the player spin in place to face the opponent seemed very 20 years ago, so I went back into the animation system and coded a speeded up sidestep when doing it.

Artifacting gif is artifacting ...

Whilst adding things to the lock-on system, I thought it might help to distinguish which target it was by having a health or status icon. I started off with a health bar over the target that reduced in size the further away, eventual throwing the lock-on off if the target was too far away. After this I thought I might create a central lock-on icon, for instance Elden Ring has a tiny white dot at the centerpoint of the target. I found this and the opponent health bar to be a little too busy on screen, so made the central icon a circle which changed colour depending on the target's health.

Whilst testing lock-on I discovered an issue with my original code from a few years back, I had always tested it with the player moving around the target, but not the target moving. This turned out to cause some nasty jitter due to the client being a tick behind the server. Rather than mess around in the depths of prediction I just took some old "target heading and velocity aimpoint" code from my old Aeronauticals air combat demo, and retrofitted it to have the client look 0.064 ahead, 1 server tick and 1 extra tick for the client being an engine tick behind. I added this code to my resource on the Torque3D website and slightly rewrote some of the original lock-on code to make sure that everything was using the render transforms that the client was seeing rather than the actual server positions of objects, something which I had previously noted in code about displaying names above objects whilst looking into coding the health bar for the target.

In other news some muppet crashed half the world's computers and offered discount pizza as way of apology. It turned out at some point other computer systems had been updated too, and Monsters Loot Swag no longer worked on Linux due to changes with Wine and so the DirectX driver needed updating ... but apparently no one mentions these things and you just have to use The Force to find out. Turns out there was a slightly larger D3dCompiler47.dll which needed to replace the slightly smaller one. Monsters Loot Swag now once more works on SteamDeck.

And that was pretty much July, numerous other things happened which I cannot remember, I got a tan when summer eventually arrived because you just don't know when the free vitamin D is going to disappear around here. After months of drowning in a seemingly perpetual deluge of rain, I am back to hoping for some wet stuff coming out of the sky as my water barrels are empty and the veg patch is parched.

Next month is the 10th anniversary of Airship Dragoon being on Steam. I thought about maybe doing "something" but the models were all exported using a system which doesn't exist anymore (pre-Collada), so anything new would not be compatible with older animations ... which is a bit of a bummer. The past is a foreign place where they do things differently ... so I think I will just let sleeping dogs lie on that one.

Sunday 30 June 2024

Melee Working Redux

 

Last Month's Blender Animations Are This Month's Game Animations

I cleaned up my dev folder system, mostly because it had no particular system at all, and was just a mess of folders dumped into a single directory. Over the years this had grown to a somewhat considerable number of test builds, most of which were pointless duplications. Tidy all of this up into a few folders based on simple concepts such as "Game Builds", "Test Builds", "Modules", etc has made everything a lot easier to find.

The only casualty to all of this was the deletion of my Melee Build Test Area, which I had thought was just another test area, however it included some more up to date melee code than the named Melee Project. However it was not particularly advanced so came as no great loss, and whilst redoing the now deleted extra pieces, I actually improved them.

I imported my previously rotoscoped animations into the game engine, and set up a character to use them. With a bit of tinkering all worked as intended, though I have since edited the standard run animation as it contained quite a sharp hip flick which in turn sent the character's butt cheeks into rather a frenzy. This has since been toned down.

Next up was to reinstate hitBoxes to the character limbs. Unfortunately some of the bones rotations had developed a nasty roll , which sent the hitBoxes for the legs into a strange position and so I proceeded to fix this, and annoyingly all the animations which I had previously made had to be redone. Thankfully it was only the legs which needed retuning.

From Hell's Heart I Give You A Good Pokey-Pokey!

HitBox testing worked well, and I even changed the code as to how strikes work. When I had first written the melee code last year, I had for some reason had great trouble trying to get a box mounted on the weapon to use as a strikeBox against the target's hitBoxes, and had in the end settled for an armature bone system to measure between the bones for the length of the attack. 

I say "for some reason" because it all seemed quite straightforward now to set up a box on the weapon for collision, get it's measurement and offset from the handle/mounting point. So the hacky bone node system was retired in favour of the collision box size and offset being automatically stored on datablock preloading. And if there is no box to provide collision for the weapon, it will fallback to using the bounds box and work out it's offset from the mountPoint. So, not sure why all of this proved hugely difficult last year, but I expect "tunnel vision" which seems to happen quite a bit in game development.

The Cold Steel! They Don't Like It Up 'Em!

Expanding the original melee code, which already had a fatigue and rage system, I added stagger depending on how much damage the target had taken versus how much they had remaining. Stagger breaks the target's attack and defence, potentially leaving them open for a free strike. The lower the target's HP, the more they will stagger.

It took a bit of trial and error to prevent the code getting stuck in certain animations, but after a while I ironed out all the obvious bugs. I also rewrote how falling damage works, introducing a plummet system were the player just drops face first, and if damage on impact is high enough a custom plummetDeathAnim plays.

Elden Ring Style Stat Bar Reduction

The player Stat Bars on the GUI got an overhaul, when health or energy is lost the original level is now shown as a different colour and reduces until it meets the current Stat level, a bit like it does in Elden Ring (no I haven't played it, but I am aware it is a thing, and a thing with Stat Bars which do this).

The weapon FSM system got a whole overhaul, and light and heavy attacks now trigger in a way which does not require the player loop to count, freeing up a couple of write/read stream vars. A quick released attack button sets the FSM to interrupt the state and send a light attack var, whilst holding it allows the state to complete for a heavy attack.

There was probably a lot more "stuff" that got done, but I can't remember it all off the top of my head here.


Flaming June was more damp squib June for the second year running, and the strawberry patch appears to have already given up the ghost.

It's halfway through the year already which only goes to show how painfully slow game development is. 😩