Wednesday, 19 June 2013

Virtualizing The Virtual

Virtualizing The Virtual!? Is that a double negative? And if it is, does that mean that the virtual is now physical? If so, I for one welcome our new Steampunk Turn Based Tactical Artificial Intelligence Overlords ...

So, there I was, playing away, testing my game. It was night, poor visibility ... also probably in real life too ...
I was defending a flag from pirate assault ... back in the game now, not in real life ... when I realized that sometimes it takes a while for the Ai to get into the attack, especially when visible distance on the battlefield is very low. I had got my troops into my chosen defensive positions early on, and now kept clicking for the Ai to take it's turn and advance against my forces. And it was taking a while ...

Which is when I hit upon the idea of virtualizing the Ai's move. First check that they can't be seen, then make simulate how far along their path their current tactic can take them distance-wise, make sure that they'er not going to be spotted by the player's forces, and dump them at the end of their phase, decreasing their Action Points as if their turn had been taken normally. For the player, no more interminable waiting whilst the Ai to complete something that they can't see. 3+ minutes for the Ai turn could become 45 seconds.

And if the Ai could be spotted during their virtual movement, then play their turn as normal, have the player's trooper spot them, and let all hell break loose as normal.

Needless to say ... it turned out to be considerably more of a pain in the backside to get it to work correctly. First up my test function - 5 whole lines - worked lovely ... then when I rolled it into the full Ai thinking process - 10000 lines - I had to invert the values.

Then they kept falling through the terrain and other objects - make a check for that - then they all try and jump on each other - check for that - then they fall off the end of their path somehow - check for that - then they have the falling through terrain issue again - recheck post virtualized move for that. But finally it all works. The key of course was to slap the camera on the Ai so I could see what was happening when it all went wrong.

And so here's a little video of something that will never be shown in general gameplay - the Ai moving in dev mode.

Also I finally finished off the last of my character art - so here's a video of all of the different factions in various conditions.

Character types:
Unarmoured - with hat
Light Armour - helmet
Stealth Armour - helmet and camouflage
Heavy Armour - tin man with Regime flag facings (not all flags finished at time of video)

In order:
Regime/Faction - Environment - Weather

British Royalists - Temperate - Clear
Austro-Hungarian Empire - Jungle - Stormy
Chinese Dynasty - Mountainous - Clear
US Republic - Arid - Cloudy
People's Collective - Urban - Clear
Zulu Nation - Mountainous - Stormy

Followed by repeats of the various regimes in various environments with various weathers.

You might want to up the quality level - no idea why it's defaulted to 360p when it's in 720HD ...

I finally also finished the flags for all of the regimes - though admittedly after that video had been taken. I didn't want the flags to be particularly historical, as that kind of takes the fun out of it being Steampunk.

This is what the Single Battle Mode options screen looks like now:

From the left:
That's a stylized Imperial Engle on the Austro-Hungarian Empire

Union jack ensign and crown for the British Royalists

Traditional Chinese (Cantonese) word for Dragon for Chinese Dynasty - I came up with this after many failed attempts to make a stylized dragon design that I liked ... then thought that using the script for the word might be nice. Colours taken from the Qing Dynasty of the Steampunk peroid. They did have a dragon picture on their flag but I didn't like it.

Soviet Constructivist Colour Scheme for the People's Collective. Always knew that degree in art history would come in useful eventually ...

Slight change on the 1877 version of the Stars and Stripes by making the twin circles of stars into solid hoops for the US Replubic faction.

And finally, because of alphebetical order the Zulu Nation.

I sorted some really annoying issue with the Ai not always updating their aim aniation - probably self inflicted due to the manner in which I've changed spawning and mounting - and also made a rather spiffing icon for my game.

This being a MUCH larger version of said icon ... obviously.

Saturday, 1 June 2013

FAIL! Deadline ... What Is A Deadline?

It has been exactly 365 days x2 ... which equals ... er ... 2 and 2 is 5 ... erm ... er ... say about 2 years - exactly - to the day - that I started Project BADGER OF DOOM ... maybe it needs a better name :/

Sigh ... so, it's been 2 years exactly, to the day, since I started my current project ...

Originally it was entitled "His Royal Majesticnesses' Royal Corps Of Dirigibles And The Mighty Struggles For Supremecy Of The Pan-Dimensional Lands Of Pangea" ...

... okay it wasn't ...

But it was originally entitled "Royal Corps Of Dirigibles". The rest of the "fluff" was very much added for amusement as a sub-title, due to the Steampunk notion of the whole thing.

That eventually changed to "Royal Dirigible Brigade", a very much shortened version which still implied the Steampunk aesthetic of "royal", "dirigibles" and a "brigade" ... presumably a brigade of dirigibles ... possibly aquainted with royals.

That in-turn ... inturn? ... not sure if one word or hyphenated ... became the much easier "Dirigible Brigade" ... after all there are SIX playable faction, only one of which is called "Royalist".

I was fine with that for months, right until I woke up today and thought AIRSHIP DRAGOON ... and that was before I got to the pub ...

So ... we still don't really have a title ... only it needs to includes airships/dirigibles/zeppelins and some sort of military detachment like Brigades or more cavalry orientated like Dragoons ... or maybe Huzzars ... my late-grandfather was a Huzzar ... and an Irish Huzzar at that ... and a Royal Irish Huzzar. He wasn't Irish.

Also ...

... Deadlines ... and the utter lack of them. Thank the great magnet - 'cos I'd have missed it if there was one.

So 2 years to the day after I had started ... where about are we? ... that's the royal "we" of course ...

All Character models are done - all hail the great magnet - because it's been a 2 month - checks old blogs - looks more like 3 months - death march of 3D character modeling. But finally we are complete on that score.

I had to complete the Dastardly Pirates of Pangea - cue play on words about the pirates of penzance ... get it? Look, I did drama at school in the '80s ... when I say "did", I mean "took as a skive from doing real lessons" - and thus failed at exam time. Everybody wins!

This is the common enemy in Single Battle Mode and the insurgent if you don't keep the population happy in the Campaign modes. He's a red bearded hell-raiser, wearing a shiny jade smoking jacket, with a white stripe across the face giving him a New Romantics vibe.

What do you mean you don't know what the New Romantics were?

What do you mean "What The Hell Did I Just Watch!?"

How about this?


Still no recollection? Never mind, let's continue.

Pirates done, I needed to sort out the Heavy Armour character for all 7 factions.

Having already bled my fingers to the bone on making light and stealth armour, I decided that heavy armour would be a single character model, using variations on the same texture. That's when "base_my_lovely_material_option" really came into it's own. Swapping "base" with "faction name" meant that I could load the correct material at spawn and it would then have the dominant colours of the regime. I decided that the face mask of the armour should patriotically (you spell that like that right?) have the regime's flag and the back shoulder plate should also carry the flag - as a basic way of checking for identification from behind to prevent Blue-On-Blue - something I'd done for character models in "ye olde project"

Yeah ... that one ... awww ... look at them ears ...

But back to the now ...

Whilst all 6 playable factions were VERY loosely based on great powers of the 19th Century, I had wanted to make variations on the flags, to give the factions and the game it's own unique fantasy/Steampunk identity.

The US flag was kind of easy, the double cirlce of stars circa 1877 is kinda cool. Thanks to Nebraska for that. As seen in Dances With Wolves - the only good Costner film. Sorry if you're reading Kev, but .... well ... it was. :|

I almost changed it to something else but them realized that was actually the REAL Malaysian flag ... so we scrubbed that idea ...

So turning the US 1877 flag into a double ring also looked cool. And here it is on the heavy armour character type for the US Republic faction.

The British Flag has been the one to be awkward. I ummed-and-ahh-ed for some time thinking up a new design.

That was cool :) ... positively freezing ... oh hang on that's Iceland's flag ... They ate our cod in 1971 - Nevar Forget!

Let's try a version on the theme.


So, I ditched that idea and went back for the classic Naval Ensign. It's the British Royalist - so some sort of ... crown ... seemed right. And here's what we got.

It shows off the predominate red of the red coats, has a crown, Union Jack - If I was a Redcoat in a past future that never was I would be proud to leap out of a zeppelin all guns blazing with that on my shirt!

I've still got 4 other flags to design but I feel that they're gonna go much more smoothly. For the Tactical Battle part I am almost complete, with just 3 more weapon systems to finish the models, scripts and GUI's for. Here's the US Republic again, left is a Recce class trooper in Stealth Armour (camouflage) holding a "Telephonicatron" to bring in artillery, and a Sapper class trooper next to him with a single shot, FlameRocket.

In other news, I've fixed MORE bugs - where the hell do they come from? - found some others, which thankfully I know how to fix, sorted out a whole load of new stuff and enjoyed using "base_material" so much I've converted a whole load of stuff done at the start of production 2 years ago to use it, thus ridding myself of various mildly repepitive datablocks.

I encourage all T3D MIT users to embrace the power of "base" in your materials.


Can all be done with just one model. And even one texture if you use the diffuse setting on the material datablock.

So, I've got all that and 4 more post-it notes of issues to sort out. And then port it over to a finalized code-base (still using an experimental one).

So ... we missed our deadline ... but thankfully we are not beholden (is that even a word?) to external forces ... or some such gibberish. Production continues unabated. It has been exactly 2 years to the day since we began.