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. 😩

Friday 31 May 2024

Aurora Borealis And Prancing About For Rotoscoping

Chalmers: Yes, I should be--good lord, what is happening in there?!
Skinner: Aurora Borealis?
Chalmers: Ah- Aurora Borealis!? At this time of year, at this time of day, in this part of the country, localized entirely within your kitchen!?
Skinner: Yes.
Chalmers: ...May I see it?
Skinner: ...No.

But see it I did and it was spectacular. Alas I was only armed with an unfamiliar camera and had no tripod set up so the pictures were dark and grainy.

Monsters Loot Swag got another update, available on Steam here.

Much of the month revolved around me being ill with some sort of random stomach issue which has resulted in a detox diet, which isn't as bad as it sounds, though caffine has been kicked into touch.

When not feeling like death, I have spent the month testing more of my rotoscoping concepts for animation, still with only one camera. There has been much prancing around the vegetable patch. Cue list of gifs.

Two-Handed Lunge - The Disembowlment Special!

Wide slash with chopping followup ... The Double Whammy!

Two Handed Sweeping Uppercut - They Won't Be Expecting That!

With various attack types done, both single and two handed strikes, I needed more video of myself prancing around like a demented elf for standard movements, such as forward, back, sides, etc. This was however postponed due to WEATHER and lots of it. It had bucketed down days, possibly weeks, it's hard to tell when you lose all sense of the Space-Time-Continuum due to being excessively soggy.

Whilst waiting for the biblical deluge to wash the sinners into the gutter, I added a shield to my hack-and-slash base character model. Whilst I had posed with my arm out, pretending to have a shield - bokken I can muster, Viking rond alas not - I had not been too aware of sword or body penetration. Thankfully my sense of spatial awareness was quite good, and changes and rotations were kept to an absolute minimum.

It did finally brighten up today, and so I spent more time running about on the way too small available area next to the veg patch. After a quick rotoscope I have some basic forward movement.

Tip-Toe, Through The Meanies ...

After some consideration on forearm and hand deformation I thought it was getting a little too mangled at the wrists, and so edited the base character model to include wristTwist bones, which proved to give much better deformation than twisting the forearm and hand along the Y axis.

Slash With Shield

Skewer With Shield

Reverse Cut With Shield

So that was a very wet May, hopefully it will fair up come June, though ... how the hell have we got to June already????

Tuesday 30 April 2024

Terrors Of Retopology Part Two

New UNLOCKABLE Character: Introducing POLARIS

 Monsters Loot Swag got a new update on Steam, this time featuring a new playable character named Polaris, who is a close range, melee based character with a pechant for saying; "Omae Wa Mou Shindeiru".


 Polaris utilizes the cleaned up auto-repology I created last month, with the character weighing in at around 8K tris, with a lower LOD of 4K - down from the standard 12-16K of the other characters. However that did get my thinking that I could probably make a perfectly decent lower poly base mesh with some decent deformation at the joint from scratch.

Base female mesh created from scratch with 8 face limb edge-loops

This weighed in at a mere 3K triangles and had fully working fingers, something I had not really bothered with in the previous character models. I had started off by deciding to have limbs with edge-loops of 8 faces and built it from there, using the silhouette of my previous base character, which was a chunky 20K tris. After creating this first LOD, I made another from scratch, this time basing the limb edge-loops on 6 faces, which weighed in at ~2K tris, including fingers and some other details which probably be removed for an in-game model.

2K tris LOD with 6 face limb edge-loops

After this I decided to make a base male character model using the same technique, something which I could plan my next game project with.

Next game project base male mesh idea

With that done I wanted to have another attempt at animation using rotoscoping. This would probably work best with multiple cameras, but I could only rustle up one working camera for a side view, so had to ad-lib for a facing angle. Initially it looked a bit wonky due to lack of space and cutting my own feet out of view, but when it eventually stopped raining for 5 minutes, I could go outside and refilm myself acting out some movements.

Rotoscoped Animation

And behold the end result was not too bad. The downside is that without exaggerating some foot movements, it tended to look like the back foot was getting dragged and just blending to position, but then the exaggerated movement looks a bit twichy. Either way, bottom dollar motion capture is perfectly feasible, and I may go looking for a second old camera, so I can get a front-on view as well as the side angle, which would help bone positioning in the other viewport. I don't think it's neccessary to glue ping-pong balls all over myself whilst doing this, but maybe not wear baggy trousers next time - but hey, Gen-X here, we even had a song about them.

The next game project is going to be the hack-and-slash concept I've had for a while, and whilst I would like to do another ridiculously giant project with an RPG, I have decided on a more contracted gameloop idea. I was tempted to make it a side-scrolling arcade style slasher, but have gone back to my original free-cam idea, were the player can rotate the camera view as they please.

In other news I was clearly too optimistic about the weather and whilst the Spring duvet remains, I quickly ditched the Summer pyjamas and went back to the Winter fluffy jimjams. It has been bloody freezing, but hopefully this will change. Fingers crossed for May.