Thursday 31 December 2020

That Was The Year That Was: Space Year 2020

 Space year 2020: Expectation Versus Reality ...


I had been having considerable trouble getting my AI aircraft to intersect with the correct aiming point for landing rounds on a moving target. This is once again ... maths ... having to take into account shooter velocity in 3D, target velocity, projectile velocity, projectile inherited velocity from shooter and unth being stuff of a general persuasion. What appeared to happen was that the AI was happy to blaze away and surround the target without particularly trying to hit the bit in the middle ... you know, the actual target area ...

It was only after three attempts and scrounging some code that I noticed my dot product of the forward vector (which is a thing honest) was giving lot's of decimal nines whilst my theoretical aiming reticle had considerably less decimal places. Paying more attention to forVecDot seems to be a better idea, though I still feel the aimpoint is being over inherited with velocity in some manner ...

Cue a test dogfight, the first 2 minutes of which are letting the Ai shoot me down, and the rest are me blasting their wings up to depreciate their turning ability and make them easier to catch. The Ai has no particular tactics right now, just to try and turn on to the target and get up close and try not to overshoot if possible. 

 Machine guns go brrrrrr

In other news I fixed the issue of the AI wandering off due to realizing that positive pitch and yaw dot products required negative maneuvering inputs ...

I've also been thinking about adding Ace Combat 7 style hi-G turns, but as a Stall Turn, hit decelerate when turning and maneuverability increases in exchange for massive air resistance and speed loss. Anyway, that would be something for later.

Over Xmas I did a cheap single malt taste test, and here are the results:

Asda Extra Special Speyside *the only one not aged 12 years so not actually that special really* had a big flavour up front with a fairly high alcohol hit but not much on the back end (ooh err missus). 20 quid.

Tesco 12 Year Old Speyside was very smooth, low alcohol hit but warming all the way down. Kind of an easy drinking "session" whisky if ever there was one, but a thin in body compared to more expensive named malts. 23 quid.

Co-Op 12 Year Old was big on flavours coming from oak bourbon casks and had a fairly strong alcohol hit with a lingering finish. 26 quid.

 

So, that was the year that was. The Tokyo Olympics never did happen but it was more due to a sniffle than a bang ...

As soon as the UK announced lockdown and everyone must stay indoors my usually peaceful hiking track on a wet Wednesday was full of bastards that would not normally be there, ruining my usually quiet half-marathon oxygen intake.

So, yeah, Merry Christmas and a Happy New Year you Lurgy Poxxed Koofers.

over 9000 hours in MS Paint for extra festivitinesses ...

Monday 30 November 2020

Damageable Areas And Wonky Maths

 I had been coding an external camera. Move it horizontally and it would extend out and wrap around so you could view all the way from the front. Vertical worked in the same manner except it stopped directly above or below so the whole scene didn't appear upside down. Then I merged the two together and everything kind of broke. In retrospect this probably due to me fixating over the Y value of the movement  of the camera whilst ignoring both the mvoement distance and actual camera rotation. This appears to have led it to wander off when both x and y values exceed 0.5f.


Having previously coded a hitbox solution for individual areas of the airframe, I had tied all of that together with damageable modifiers for how perfromance of the aircraft would deteriorate. Damaged wings reduce maneuverability, damaged engine losses speed and acceleration, etc, etc. I added a HUD element so that the player could visually see the state of the aircraft with a total airframe health bar for overall damage.

Aircraft systems on the lower right, radar to go lower left

There was a minor conundrum with weapons and their placement on the model. I was considering adding extra variables to weaponImage code so that a gun could fire from up to 3 seperate points from an aircraft with their own particle emitters and fx. In the end I simply added a gun to each of the relevant aresa and had them synchronize to fire alternatively.

Guns go brrrrrr ... and in order

I started to figure out AI and which tasks they should be concentrating on in some sort of order of importance. At the top of all of these is not stalling because falling out of the sky due to making a dumb maneuver at low speed would be considered bad and also rather embarrassing. I'm developing a skill system for AI pilots where lower skill will mean being more reactive and higher skills more proactive. This can be used for simple and obvious things like taking an aiming line ahead of a moving target, to how to respond to and evade an attacker, turning from the role of defender to aggressor, such as pulling up, rolling and reducing speed all together to get the opponent to fly past - and so we are back to not stalling.

Speaking of stalling, I have been contemplating adding a high-G turn or stall turn maneauver, where rapidly losing speed when decelerating boosts maneuverability - with the ever present danger of pushing it too far and stalling.

So next up, code some basic AI that can be able to perform a basic Combat Air Patrol, move to a location and circle that area, do some basic dogfighting with an opponent and the such like. Also need to code a radar. I have a few code examples from this, including the 3D style radar from Elite, but think that I will probably stick with a top-down type like Ace Combat 7.


Saturday 31 October 2020

A Change Is As Good As A Rest

 Happy Halloween, how is perpetual house arrest working out for you?

So we've got a little saying "in them there these here parts": A change is as good as a rest, so here is DIY Ace Combat 1930s style. This whole thing came from an idea I had for a steam/dieselpunk story many, many moons ago for Victoriana sci-fi with cloud cities, battleship dirigibles and '30-40s aircraft. Over the years I have amassed data on the aspects and real world values of various aircraft from 1930-1940s and condensed them into something that might be useable gamewise.

Needing a break from super head-pattable fluffy eared waifus character modeling which I really don't like, I embarked on creating an action based Ace Combat 7 style aeroplane game. First up I checked out all the previous flying vehicle resources which ... were not particularly great, but did give me some pointers on how vehicles are supposed to work ... and the answer to that is that they are entirely physics based. Now considering that some of this stuff dates all the way back to the early 2000s, I expect that was very revolutionary at the time (see Dead Red Redemption 2 for physics based locomotion and a budget of 160 million USD).

So it was time to boot up Visual Studio and hard code it in good old C++. Now there was a time, not very long ago, that I trembled in fear at the thought of doing anything in C++ that didn't involve me copy and pasting some half broken crap off the stackoverflow site.

You tell 'em Aragorn, son of Arathorn

The stock flight model was frankly appalling, so I set about rewriting it from scratch. Gravity turned out to be a weird and thorny problem, as anyone hit by a falling apple can testify to, so I simplified that with a "going down fast, going up slow" methodology and if you were going straight and fast ignore it. Of course that meant that going straight and slow would be a problem so I introduced a vaguely realistic - but always siding on fun to get away from simulation - stalling system.

Gradually over the course of the month I built up a new physics based flight model based upon the concept of fun trumps boring simulation. I was aiming for something in an action style concept that mixed Ace Combat 7 and  Freespace 1/2 (so spaceships with gravity if you will).

Cue, lots of physics as me having to look up the "maths is fun!" (narrator: it isn't) and "improve your GCSE maths!" websites to get a refresher on Cosine ... and it turned out that I mostly wanted Tangents anyway ... Now I vaguely remember all this stuff from the '80s but because of large class sizes I got stuck down in Set 5 and needed a +90% score to pass the final exam - which I did - in your face education system :P

With a working and fun, physics based flight model I proceeded to create the HUD system, with all feedback and warnings. I created a primary and secondary guns system with heat buildup, stoppages due to overheat and cooldown system. The last really awkward thing to do was make a unique area damage system, so if the wings started to get shot up, maneuvering would become harder, engine damage decreased thrust and speed, etc, etc. In the end this didn't end up being as difficult as I thought it would.

Speaking fo the HUD, I came up with system that can change the entire scheme for whatever the player prefers. Even if it's bloody awful.

 I rewrote bullet fall so projectiles only begin to fail to gravity halfway through their lifetime, and then lose momentum quickly. Stock code has them losing height immediately which just seems weird having used high velocity rifles in a former existance.

In deferrence to the previously mentioned Freespace games of the '90s I added an afterburner/jet/turbo boost which I guess back in WW2 was called "War Emergency Power (WEP)" though it acts more like a Freespace turbo jet for a limited time whilst consuming energy and has to be recharged. I have 3 distinct classes of aircraft, their names based on old cavalry types for fighters, interceptors and strike aircraft, and they all handle their WEP differently, as they do with their maneuvering at speed.

There was some ancient code resource from 2004 which nearly worked out of the box 16 years later. From this I coded a few new functions to make life easier, and lo and behold, not only could I get a callback for damagable areas but I could shoot through the main collision box it it wasn't part of the mesh model. Why is this a big thing? Because  the engine uses a singular collision system for speed - eg internet packets, which obviously you want to keep as small possible and nothing really gets smaller than a 6 sided cube because you only have to send the data of 3 lengths (in your face Ramesses! Don't @ me about pyramids also being 3 lengths, you still only get half the area). This meant that all collisions were based on this surrounding boundary box. But with extra hitboxes I can keep the overall simple and fast collision system for things like movement and disassociate it for more complex things like bullets flying through it but not hitting the actual model - which looks weird.

So, next up for dieselpunk aircraft action is to refine the damage modeling and make it actually playable. I did have a quick dogfight with an empty vehicle last night and "zoom and boom" was quite fun - but I really need to sort out a moveable camera system to look around and radar because once they go off screen it took ages to find them again.

Anyhow, ladies and gentlefolks, for your delications, some video, featuring an airplane model I swiped from some modders site for a long defunct flight simulator I have never heard of, so that isn't my work.


So, what's all this for? It's for a secondary project that I can flit between the two without vegetating once one gets overwhelming or just a plain pain in the old arserinho. Cute catgirl swag 'em up will return, it's pretty much fully coded and only needs some user friendly stuff for a limited playable release but it also needs a huge amount of character modeling on top the huge amount of modeling it has already had - so here is my extra project to break up the monotomy, and as I said at the top of the page; a change is as good as a rest, and it's a lot more productive.

That was the month that was. Hope you enjoy lockdown 2 covid bugaloo.



Wednesday 30 September 2020

Autumn Arrives And Airship Dragoonette Gets A Makeover

 Autumn arrived with a final heatwave and I sat outside to soak up the sun with a bottle of plonk. Three days later and I had the heating on and was hunting through cupboards for a hot water bottle at 1.30am.

I spent quite a bit of time writing a new movement system which didn't work and it took me about a week of debugging before I realized that  I was calling the depreciated names for the input and not the new, unified xy axis system. 

┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻

Remember this?

Well it's now this.

Airship Dragoonette gets a makeover ...

And as Valve had once again put out a new Steamworks update, I took the opportunity to use this new artwork and a derivative to refresh the artwork in Airship Dragoon. I made a little system were it counts how many startups the game has had and then swaps the main menu image between this and the original painting in rotation. Which ever one is used as the main menu background, the other is used as the loading screen.

Whilst back to looking through the spaghetti code of Airship Dragoon, I altered how panic works. Previously troopers suffering panic would either flee, go beserk or freeze in place with an RNG, but now they are much more aggressive and chose to spray bullets at enemies if available, flee if not, or freeze if their pathfinding fails.

I also tested a couple of new things which Valve had released. The first was a time limited change in store artwork capsules, which will revert to the original artwork after next January.


The second was to use the Major Update Announcement feature and all the new artwork headers which that requires. More info on that here.

There has been other things ... things I can't remember in the panic of nearly forgetting to write this September blog one hour before September ends, so we are a bit light weight on substantial content this month ... and possibly every month ...

I did buy a slow cooker which has turned out great and will no doubt get hefty use over winter.

Monday 31 August 2020

Character Selection Screen

So I've knocked up a character selection screen that, currently is rather devoid of any art work. It's failry simple, uses an array which the player can flick through, each character (currently a whole 2) then display an image of the character (which is currently a placeholder) and more importantly a series of statistics relating to the character at the side. These include the basics such as speed of movement, health and energy replenishment and strength for pushing enemies aside. This is followed by the 3 types of attack and evade, and their relevant statistics, so the player can move through character selection and view the differing statistics for comparison.

I have since changed the buttons to something less awful using a bitmap array and text.

Having finally dispensed with DirectX 9.0c in favour of DX11 and OpenGL, I set about converting some of my custom shaders with ... not particular success.

Yeah, I'm pretty sure that isn't supposed to look like that ... This appears to have something to do with hardware skinning being controlled by the GPU when previously it was the CPU. As this only affects a few things I have come up with some workarounds for the fancy custom materials and will come back to this at a later date.

I've also had more of a play around with my XP-Pen display tablet and started to become familiar with the artist app Krita. I am planning on using this for the 2D art in game, and especially the selection screen for character portraits.

Drawing of an old oil painting I did some time years ago.


I also thought about reworking the artwork for Airship Dragoon, and knocked up a colour sketch idea for composition. Might not actually replace the original artwork but could use a new one for Steam's new capsule formats for updates - then again I could go the whole hog and use it for complete new rebranding.
 

I also did a whole load more stuff this month but can't actually remember what it was ...
 
Anyhow, onwards and upwards ...

Friday 31 July 2020

My Feet Hurt, New Character And Goodbye DX9

So, apparently the new Blogger interface has been eating my images for the past 2 months ...
So expect to see a blank image leading to a 403 page soon™.

It's been the hottest day of the year here, so naturally I went out for a half marathon route march ... and now my feet hurt.

I finally finished off another playable character model, a shotgun wielding, propeller-powered catgirl, currently named "Southern Hospitality", complete with Daisy Duke hotpants. She has a short range playstyle with slow attack rate but high damage and medium manouverability. After each shot a new shell is loaded with a single handed pump-action for the obligatory "rule of cool".


And here's some video of gameplay.



Apart from finally completing a second playable character I have been porting over my project to the new and shininess which is Dx11 and OpenGl 3.2 (might be 4.0 I can't remember). This meant a final farewell to the much loved DirectX9.0c which I could just about write a shader with. No such luck on Dx11/OGL with such things as of yet.

This has required me to finally defeat the spaghetti code which I had previously wrote, slimming things down in C++ and removing bloat for the porting. I have only ported to the pre-PBR branch of the engine - so really 2019 code - as a stepping stone to entering the latest shiny stuff once I know what the hell is going on. So far so good. Everything seems to run fine - except for my broken Dx9 shaders but that was to be expected.

I've also stuck my hand in my pocket and made a new, capital purchase. Only had it out of the box once for a quick test. If Google hasn't yet fubared my images, here's a quick pic below.


It's been an awfully long time since I've done any drawing.

 
I also used a 14 year old camera to get some pics of Comet Neowise.



It was my parents Golden Wedding Anniversary. 50 years! Albert Speer only got 20 years in Spandau Prison!

Tuesday 30 June 2020

Flaming June

It's summer, it's flaming June.

Expectation ...


Versus reality ...


But then eventually ...


And now it's back to wearing a jumper :/

Steamworks updated yet again, so it was back to the; "how do I update Airship Dragoon again?" Seemed less hassle than usualy so I must have remembered how to integrate the Steam Client C++ this time around. Whilst giving it a quick test drive to make sure that it actual did work, I started to look through some of the old spaghetti code I had written all those many moons ago.

Comment out the old code on my local distro - incase I suddenly needed to change it back - I changed how panic works, making it more aggressive so that the troopers will always panic shoot if available and only flee if not. I also tweaked some animations and got impact reactions to being wounded, so the troopers now flinch when hurt. People did ask for this when I first released it but messing around with animation code was all rather confusing at the time so I avoided it. Oh well, seven years too late et al but here it is. Luckily I still had a 14 year old version of Blender available - otherwise I would have had to re-export every character and animation into the new format and that wasn't about to be a thing that was going to happen.

I'd also like to change the box art, branding and main menu screen art some time ... but one thing at a time.

Back to the current world of coughs and chaos, I spent the sunny days lounging about with a bottle or two of plonk, getting a tan - or at least turning quite red at some point.

Eventually I did get back to devving on the current - or at least occaisonal - project. One main character does not make a game, except all those games with a single main character of course ... However I was rather planning on having multiple playable characters based on weapon playstyle, so inbetween freezing fog, scorching sun and heavy rain, I eventually got round too booting up Blender and making another character. Whilst the original "GunGirl" was a long range fighter, this character is more short to medium range, with heavy hitting but slow attacks. Still need to PBR the shotgun - not that the current gameplay build is PBR, it's still stuck in the land of Dx9.0c until I upgrade to DX11/12.


So, next up is to finish off LODs, create an atlas map of textures and materials to reduce the all important drawcall number, rig up some animations (based on the previous character animations) and then get the model working in-game. The code for the character is done and works fine, having been a placeholder box for some time already.

Sunday 31 May 2020

Doing It Wrong

Doing it wrong! The story of my life. An act in 3 parts - hopefully ...

I had forgotten how to make characters.


How did I make this? Absolutely no idea.

I hadn't written anything down. I knew the software involved but the actual steps? No idea. So I started again from scratch, intending to make a better system and this time wrote everything down.

I ended up writing a long thread on how I got a model from makeHuman, into Blender, and ready to import it into open source game engine Torque3D. You can veiw that here.

Now importing a mesh into Blender tends to come with a whole lot of transforms which Torque just doesn't like. The main being facing the wrong direction as in-game, negative Y is forward. So for the last nth years I have been seperating meshes and armatures and editing them so they face the correct way and then aligning them manually. This gets rid of all the wonky transforms and sets everything to a nice default 0, 0, 0. That way I can - hopefully - put any other animation into the armature.

This is all very faffy.

Whilst changing the default pose by using the "apply visual pose as rest pose" I was struck by a sudden thought; wouldn't it be nice if object mode had an apply transforms option? Thus I could pose the model with the correct facings and just apply  each object, armature, mesh, etc with a click to default it all to zero. And guess what? It does have that button already.


Well ... crap. I've been causing myself unfathomable amounts of problems for god knows how many years by manually rotating everything by selecting all the vertexes of each object, turning them, and trying to line everything back up by eye - when all I had to do was click a button.


So ... talking about doing it wrong, there's more.

I've been going about making my game wrong. Or avoiding making it would be more accurate. This is partly - or even mostly -  due to a helpful blogpost by a developer that talks about Steam. Why is it helpful but made me lose focus on actual development? Because of wishlists on Steam and drumming up future sales. He pointed out that his previous and very successful games had a Steam store presence 1.5 years prior to launch which meant that he had managed to accrue 33,000 wishlists. So when he was finally ready to ship, 33K people got an email telling them it was available. Even steam suggests getting at least 50K before release.

I have half my levels completed, all my monsters for each level save the bosses, and complete working game code that makes it all playable even if some pieces are missing. But I don't have anything public facing. I have no cool box art or even working main menu screen. I could have done this previously but I was too fixated on making the actual game work that I never even took into account that I needed to get potential player support early on and that means having a working Steam store page with nice artwork that brings people in, adds backstory and concept. I don't even have a title for my game other than the temporary working one. In fact my previous game; Airship Dragoon had no final title until the month it went on sale.

Here is a link to the full article. Here's another one on wishlists.

So ... doing it wrong ...

Thursday 30 April 2020

April Showers Needed

Three months ago, many animals queued up outside, whilst I built a large wooden boat to save us all from God's vengeful wrath as the flood cometh. Today I kneel in parched earth and pray to the heavens for rain before my Swiss Chard withers in this terrible drought.

 That's not 6 feet ...

So here we are, global plague day number ... dunno, could be anything. I have long since run out of fingers, toes and other jutting limbs to count this on. Existence is one great malaise, which only differs from previous life - before the dark times, before the land was ravaged by the foul pestilence known only as The Koof -  in that the pub is shut and I have no where to go on a Saturday afternoon.


Going to the corner shop for some milk


Going shopping has become a great adventure, were only the strong survive, wading towards the bread counter, through the still twitching pile of the nearly living deadish that collect in the aisles, like great shoals of fishes beached up a rocky headland ... but to be honest shopping at Co-Op was always like this which is why most people walk that bit further to go to Tesco.


Going to Spar for a loaf of bread

Her Majesty's Robberbarons and Crooks sent me a letter, saying that they were not going to send me a letter and demanding that I fill out my tax return (lol jokes on you I'm a loser!) by the miracle of the interwebz. Reluctantly and with due trepidation I logged onto the government website to register my electronic existence, and lo and behold, the website was as badly designed as I had expected. Also the security features were laughable, with passwords capped at a mere 12 characters with no special characters. Oh yes, I am sure Anon and his botnet will never be able to brute force that ...

This is of course the same tax system which, some years ago, had previously emailed me someone else's tax details because they had no system to check that the emails were correct. I did eventually manage to make some sort of contact with them via the only email address I could find - marked phishing - to explain the error and ... never heard a reply. However, maybe that is the reason which I now have to wait seven days for them to post (again that physical letter thing which I had successfully been using to send my completed tax form in but which they now demand be done away with) a code number to me so that I can finally activate my e-tax account ... and then wait another 24 hours for their computers to acknowledge this has occurred ... or not, as anything and everything could still go wrong.


Going into Tesco with a trolley

In the midst of all this I have returned to gamedev and moved back to character design. Here I found that I had made no particular notes on how I had previously done it and had to sift through scores of files - each slightly incremented on the next - until I found the base character model from which to work from.



And with that April ends. May May (see what I did there? That's comedy gold that is!) prove to be more productive.

Stay safe and avoid the dreaded Koof.

Tuesday 31 March 2020

Apocalyse Whenever

I have a keg of beer.

 These things do not keep once opened so I've been doing my level best to chug through it. So at least I've some sort of excuse for lack of productivity - at least for the last quarter of this month. The rest is a bit ... meh ...

The Tokyo 2020 Olympics has been cancelled - as was foretold in 1982.




I remember chortling to myself when it was announced back in 2013, that the 2020 Olympics would be held in Tokyo.

And my own little OC long before any of this kicked off ...

So, no state sponsored psychokinetic experiments let loose amongst gangs of roaming Bōsōzoku ... but it's still not happening ... this year anyway.

Apparently the great toilet paper shortage is over and the supermarkets are now overflowing ... mostly due to people buying 5 years worth in one go. That's a lot of devil chili vindaloos to munch through to use up all that soft, soft papel d'hygenico ...

So everything has ended, and my foot2ball team may be saved from the danger of relegation. Surely global armageddon is a small price to pay for this luxurious reprieve from the third tier of English sportsball?

So ... maybe back to work next month.

Then again, maybe not ...

In the meantime here is what the 1980s looked like in France according to The Old Grey Whistle Test of the same era ...


And here is a picture of a cat ...


Saturday 29 February 2020

Leap Year Because Time Is Not Constant Enough

It's a Leap Year, which is a thing that happens every FOUR years, apart from every FOUR HUNDRED years, when it doesn't.

Can I get a quick rundown of the month?
 
I continued to hike at least one half marathon a week but the bit between my ribcage and stomach still has the consistency of a water balloon.


Everything is flooded and there is a constant gale coming off the Atlantic Ocean.

My Valentine's date could have gone better.


I wrote some code to automate the currently selected boss to display health on the player's HUD and made it network safe. Then someone told me a method which did the same thing whilst using 90% less code lines so I used that instead.

I redid my "terror tower" special item to now look like a pile of skulls because feedback said it was hard to tell what it was before.



I started work on level 5, which is going to be  an ruined and overgrown industrial complex. So far I have the level layout, textures of mud and the foliage, whilst still working on the actual industrial ruins, expect lots of pipes.


I have previously finalized the enemies for this level, who will be plasma rifle wielding "Hive Warriors" and their "Genetically Modified Brute" slaves. However after running through a live fire test of the half finished level, I thought that the colour difference between the monsters did not make them look distinct enough, so I boosted the colour saturation and contrast somewhat.

Before and After ...

Apparently some other things happened too but I can't remember them all - save Valve introduced another Steamworks SDK update just 2 weeks after I installed the previous one for Airship Dragoon. I took this opportunity to try out their new announcement system which now allows small patches for changelogs.

So that was the month that was and it is still blowing a gale and the fire brigade are still pumping out floodwater downtown.