Tuesday, 30 September 2025

Wearables

How it started

How it's going

Wearables are a thing. Technically we always had wearables ... but it was just a box that fitted on the head, now we have an array of helmets and various armour types.

And needless to say, all of these variations have ended up causing problems themselves ...

After making vast quantities of helmets, helmet variations for differing warbands, I discovered that mesh reskin was borked. Everytime I set a new skin on the mesh ... other skins would reset. After going through the shapeInstance code, I finally got it to agree with me that it didn't need to reset to base skin for all other meshes ... except it still did ... and this is when printf comes into play.


 And it was a lot of printf, but it did let me back-trace through the code to discover the well of embuggeration that was causing the issue ... the shapeInstance appeared to be reinstanced when changing the skin. I must admit, I was not expecting to recreate the human DNA sequence from scratch every time I wanted to change into clean underpants ...

This threw a somewhat annoying spanner of arseholeness into my previously anticipated slick engineering. The main annoyance of course being that I had already made a huge number of helmet materials base on reskinning, but now I had to save the reskinning function for a singular mesh, which would naturally be the main armoured body.

So a minor annoyance in the end, as I would be fearful of breaking MANY THINGS if I tried to change how the meshInstancing code worked. I can still use reskin for the main body, but headgear will now have to be individually exported, and I think the variations of colour schemes for cloth aventails and coifs will have to be reduced somewhat.

Did I mention lots of helmets? Well here they are ... prior to me discovering the resking instancing issue.

Saxons

Norse 

Lombards but could be the Franks

Avars 

Normans 

KievRus

Magyars 

Now obviously not everybody is going to start off in their love heart patterned boxer shorts ... well, except the player who actually is. The Ai warbands are obviously going to start off equipped with their customized armour meshes, all based on rank and faction.

As I have started off with the first half of the warbands, chronologically there are more to come in time periods up to around the 16th Century ... when war gets really boring due to the preponderonce of boomsticks. The current warband factions do not much get passed the 12th Century, so armour is somewhat reduced to the primaries of cloth, chain and lamellar. Technically there is some brigandine in their but only as a defence class rating for superior helmets, so now I'm just getting pedantic. And who doesn't like to get pedantic? I mean why would you even bother with doing indie game dev if you weren't pedantic? It would take all the suffering fun out of it.

Assert dominance over the battlefield by T-posing, it is sure to crush the enemy's fighting spirit

 I had also started to update my Collada format mesh files to FBX. Collada has always worked nicely but it's support is no longer being updated (thanks Sony), so changing to FBX seemed like the logical solution ... except that I had some errors with animations, like baffling errors, like it insisting on contracting the whole animation into the reduced key frames which it I had set, so that's going to require some more testing.

But, in the meantime, here's a video of wearables in action - cue Sabaton. 


 So, next up, is updating my wearable code to remove the skinning references to the helmets and use pre-exported headgear variants, and leave reskinning just for the main body armour meshes. Some sort of special effects for combat, most noteably sound and particles would certainly help too, and then it should be on to making a gameplay world which isn't a flat grey box.

 October is here.