Sunday, 28 February 2021

Backbone Required

 So I've gone and FUBARed my lower back.

Current state of development ...

Hilariously this was caused, not by the hike I went on to do some deliveries and check on the welfare of vulnerable people, but by the innocuous action of stepping out of the shower afterwards ...

Least painful position right now ...

This has somewhat stalled progress due to sitting be the most painful position to be in and lying down - away from my PC - being the least painful.

This has led to watching lot's of train cab rides, mostly from Japan, which has some really pretty scenery.

Previous to incapacitating myself, I had continued to work on dogfighter game. I had detailed various datablocks of different fighters and set the AI pilots to slug it out in numerous tests. I had also finally added the player into the mix, allowing myself to take to the skies as one of Blue Team and take on the dastardly foes of Red Team, with each team comprising of a mix of aircraft types - though currently all using the same placeholder model for the time being.

Location damage GUI was broken here

I had also added a couple of different radar resources, one standard top down and the other the 3D style radar from Elite. I found the 3D style to be somewhat confusing and so removed it and stuck with the more simple top down radar. I added toggleable ranges and made sure that different teams displayed in different colours.

Top left overhead radar and below the more confusing 3D version

The one I settled on

I also changed how the aircraft classes handle so that they are obviously more different. Fighters now lose a lot of speed when turning, whilst interceptors lose their maneuverability when gaining speed, and strike aircraft are somewhat midway between the two.

I improved high G stall turns for the player, so if you get them right you can swing the aircraft round quickly, and if you get them wrong you'll stall - hence "high G stall turn".

Basic combat stats for a mission are now stored with assists, kills, shots and hits being recorded for the player. I decided to use the same system as one of the game which inspired this project which was the old space dogfighter Descent Freespace: The Great War.

The one IP Volition has no intention of ever bringing back :(

I made a few other changes, tweaks and improvements here and there, like stopping the Ai from spawning above their aircraft ceiling limits which immediately threw them into a death spin dive.

So next month I think it will be time to actually model some custom aircraft and start to deal with physically showing damage to individual vehicle parts such as having the wings shot off and the such like.

Also probably a good idea to do some exercises to strengthen the lower back when I am able to get up and down from the crapper without needing to lean on two crutches ...

Until then, time to lie in a more comfortable position and watching the Hiroshima to Fukuen line whilst the pain killers kick in ...

Sunday, 31 January 2021

Space Year 2021: Stage 1 of 12 Complete! Dogfight!

It's the futuristic space year of 2021 AD, stage 1 (January) of 12 (the Annum) has been completed ... though you might be forgiven for not noticing ... 

Having previously worked out my issues with Ai pilots taking a leading aim on a moving target I have spent all of January getting them to actually dogfight one another. Choose target, go fast to get into shooting range, slow down to follow it and blow it out of the sky. Took a bit of doing but worked nicely. 

Next up was creating a system of evading when an AI came under attack rather than just sit there and get shot at. Reading through vast tomes of air combat and aerobatics, I managed to come away with ten meaningful emergency maneuvers to try and shake an enemy fighter, and added a barrel roll if none of the others seemed to be an oppropriate match for the defenders circumstances.

 That's not a barrel roll (ノಠ益ಠ)ノ彡┻━┻

This brought some problems itself, that in high-G maneuvers such as a Stall Turn, the Ai had a nasty habit of losing all energy and ... well, stalling ... a lot.

He's written his Artificial Intelligence Pilot Engine Management System? Stall it.

So then I embarked on a complete rewrite of how my Ai would use engine management. Previously it had been a simple case of setting engine percentage with a nose attitude modifier, now it was all about maintaining the desired speed. This massively reduced stalling in tight turns but not completely eradicated. So I added an anti-stall system that would force the Ai to move to a desired rate of knots should their airspeed drop at a rate that would bring them within the losing height at level flight, with a nose attitude modifier. I reused the anti-stall method which I had written for spawning aircraft and getting them up to their starting speed immediately. The maths required a bit of evening out for an object that already had velocity in 3 dimensions and initial attempts had some supersonic thrust propelling the vehicle across the sky like Warp Factor 9 but I ironed these out eventually.

Unedited video of an 8x8 dogfight

Coupled with all of this was the the obvious need for collision avoidance, both from other aircraft and the ground and max ceiling which each aircraft type can go up to before the engine is starved of oxygen and stalls. Dynamic collision avoidance of other moving objects was somewhat of a pain in the maths but I got there eventually with very little happening in the way of head-on collisions during mass heda-on attacks at each other team's formations.

32 aircraft head on attack - no collisions just 2 shot down
64 aircraft battle moments after the first pass, and why it's called a dogfight I guess

In other news I decided to update the banners on my youtube account, and give them some new artwork. Here I discovered that it doesn't actually let you reposition your artwork and keep scale after upload, so had to edit the image to fit into their stock measurements and orientation.

I also spent quite a bit of time viewing train stations webcams on a spare monitor whilst I worked for maximum comfy.

Everywhere seemed to be getting snow ... except me, it just rained here. (๑′°︿°๑)

So, that was January, Year of The Koof Part Deux, pubs are still shut then ... Join me again in next months exciting episode of "why is maths hard?"

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