Monday 31 December 2012

Back To The Future - To Integrate It With The Present

No not the 1985 comedy where Christopher Lloyd mispronounces "gigawatts" as "jigawatts" and contained a cameo by Heuy Lewis as well as his song "The Power of Love" in the soundtrack. So no, not that one.

This one.



The "Main Campaign" which I first started way back through the distant mists of time ... or summer 2011 as it was called back then. The one with the dirigibles which move around, capturing territory and depositing troops for battle.

Currently we are - and that's the Royal we of myself in third person remember - retrofitting that campaign system to work with how the game later developed, so that it all fits in seamlessly with the functions for the "not so short campaign" and the tactical battle mode.

In fact the "not so short campaign" has been renamed "The Citadel Campaign" - because you're objective is to battle through increasinly well equipped enemy territories to besiege the "Pirates of Pangea's" mighty citadel. The "Main Campaign" is now the 'Pangean Campaign' and takes the shape of the player and 5 other factions controlled by individual Ai's fighting to conquer the pirate infested and procedurally generated supercontinent of Pangea.



The majority of the changes for the "Pangean Campaign" - save for the GUI being updated - are in the background, with the Ai now replicating the player's progression accurately with troops increasing in experience dependant on current levels, casualties and expenditure. In fact there's a frightening amount of mathematics for Ai strategic decision making and expansion/contraction of veterans, finances, dirigibles, territories and equipment which I worked out over multiple Post-It notes ... having a minor disaster when I ran out of Post-Its and had to use real paper.

There's also been various balancing to functions and a whole host of bugfixes. Looking back at some of the early custom code and script base did give the occaisional raised eyebrow at how different the logic system had changed since the introduction of the "Citadel Campaign" and the Tactical Battle Mode with their more intertwined functionality. Territory once owned by the player but which is lost to opponents slowly returns to it's "unknown/fog of war" state as the distance between it and player territory expands.

I also created a set of difficulty modes for the "Pangean Campaign", including a hard mode where the whole of the continent is infested with the pirate faction.



Whilst I had been hoping to finalize all of this and be "feature complete" by the last day of 2012, the Xmas season has rather put a dint in my work schedule, what with having to go outside and occaisionally see other human beings and the such. Also I got a considerable amount of fine scotch at prezzies.

So all that remains of the "Pangean Campaign" functionality is the creation of a "buy/sell/mod Dirigible" GUI for the player - the Ai already have functions to decide on how best to approach all of this for themselves - and make certain that the results of a Tactical Battle between the Player and an Ai Faction are carried over to the Strategy part of the Campaign correctly.

The Tactical Battle Mode is nearly complete save for one small tweak I want to make so that the Ai can properly utilize artillery/airstrikes in the same way that the player can. I originally intended to have mechanized assault gun style tanks available, but after initial testing they were clearly too unbalanced and I cut that particular feature whilst making personal armour more effective so that the array of high explosive weapons available still had something useful to counter.

Whilst I am expecting to be "feature complete" some time next month, this is by no means "art" complete. The vast majority of the models and textures on view are placeholders. I am still hopeful for a fully finalized demo version of the "Single Tactical Battle Mode" available late February or March - possibly with an early adopter version of the game which is fully featured with campaigns, and missing a few finalized art assets (eg: probably a low number of tactical battle maps) that can be updated on completion.

Still hopeful for a final full release on or before the 1st of June - which is exactly the day in 2011 which I started, and would make the whole development cycle 2 full years exactly. If it hadn't of been for 3 rewrites to major parts (2 rewrites and an improvement actually) and a whole load of messing around with mesh deformations it would have been considerably sooner.

But anyhow, live, learn and improve ... hopefully ...

Saturday 1 December 2012

Make A Button, How Hard Can It Be? Fuuuuu-

Question: How hard can it be to make a button? 
Answer: Fuuuu- Also it is as boring as hell making the artwork for half a gazillion GUI objects

I have somewhere around 44 items in game.
Each one needs a GUI explaining what it does.
Each one had a typo which I only spotted after 28 images had been done.
Each of the 28 was fixed.
Each item needs 3 bitmap images for a button for normal, highlight and depressed/toggled on.
Each one was damn boring to do.

Game design is boring. Constantly reiterating and tweaking is boring. Rewriting my whole game 3 times was boring - but at least it had the benefits of being intellectually stimulating. Making sure that half a gazillion GUI elements have a similar pattern on their border is not intellectually stimulating. It's dull. It's one of the many dull and repetitive parts of game design which is devoid of challenge, it's just grind.

Maybe this is what playing an MMO is like?

Now I see why game developers employ so many people, so that they have someone who enjoys dull, repetitive, tedious tasks which require no challenge other than enjoying tedium. I imagine they look like Andy Serkis, after he'd been digitized as Gollum ...

Then there was the artwork for all of the other GUI elements. Suddenly having different GUI elements sharing the same artwork became awfully important. For starters it helps to reduce total overhead on loaded textures. Secondly it means making less GUI bitmaps.

After a bit of jiggery-pokery both my completely different Campaign modes shared most of their GUI elements. Hurray!

Then there was still the slight issue of the player having no idea how to play the game, which meant documentation. I decided on a two fold strategy, having the whole docs in the main menu (still pending) and having individual instructions for each part of the game. For instance choosing and equipping your squad for deployment has it's own GUI docs - which share a common border. They are accessable from the "choosing and equipping your squad for deployment" part of the game.

Docs also presented a new challenge - making them understandable in the least amount of words. So the docs have had a few rewrites to try and distill the necessary information without the reader having to spend hours scrolling through them.

All the docs are kept in a folder name "RTFM".

With so many items in game I'd decided to keep the item button images as a stylized silhouette for weapons with the calibre displayed so that the player can instantly see what type of ammunition they need reloading with and can toggle the "info" button and then press the weapon's button in the inventory to see all of the relevant information on it. None weapon items are displayed with a stylized logo representing it and the the item's name.

All item buttons and information screens are a stylized blue to show that they are interactive - a bit like the idea of a blueprint and it helps to mark them out from the background of the GUI. All "toggled on" buttons are also blue to show that they are interactive. The rest of the GUI's are a stylized red/yellow colour scheme, representative of brass/copper sort of colours which often pertain to steampunk. And it now does have much more of a steampunk feel with the finalized interface.

The interface is by no way completed, the pop-up message boxes still need skinning as do the flags representing the various factions (6 playable choices and 1 Ai pirates) and the background of the main menu is a placeholder.

So, how hard can it be to make a button?

Surprisingly irritating actually.

I'd had an idea of faking a 3D look with a copper/brass style button, having light coming at it from the top left. It certainly looked fake 3D, I just didn't like the style. I set out to gather some influences on steampunk button design via the internet and used relevant keywords about "steampunk" and "buttons".





Buttons where? The internet was not being helpful ...

After a thoroughly exhaustive search of the internet's hottest steampunk cosplayers during which I lost track of time and space, I decided to just make a button that was based on a fairly average button - and throw a border on it to give it steampunk blocky bulk. And in the end I quite liked this attempt and decided to stick with it.

In other news I physically modeled (physically as in virtual 3D models which ... er ... aren't really physcial at all) a variety of weapons - though still have a whole load (though thankfully now a minority) to complete before I'm finished with this part. Needless to say I still haven't got round to having another crack at the deformations on my initial character model, so that's still to come ... again, annoyingly. But I do have a plan of things to attempt with it.

So, getting there, have a couple of additions and tweaks to make to AI scripts and the Main Campaign (the bit with the dirigibles in my ver old videos) needs a few fixes, tweaks and it's startup sequence being brought into line with the new way of doing things which everything else now share (Single Battle and the fully working Bonus Campaign).


Anyhow, here's a video featuring the new look GUIs and a bit in-game battle plus the post battle GUIs. Remember, message boxes and regime flags haven't been touched yet.


In additional news, I need to sort out button clicks prior to the server's creation. And I completely forgot to show the "how to create a squad and equip them for battle" in the video ... which is below. GUI examples and a bit of a scrap in-game.


Friday 2 November 2012

Guns Guns Guns and Info on Guns Guns Guns ... and bullets too

Guns Guns Guns and Info on Guns Guns Guns ... and bullets too. And info on those bullets as well. Okay Mainly info, info about equipment, some of which are guns. And bullets too.
Guns Guns Guns Guns Guns Guns ... and bullets too. But mainly Guns Guns Guns Guns Guns Guns. And other equipment. I made some Guns Guns Guns Guns Guns Guns and thus retired the stock placeholder which was a piece of vaguely rectangular 2x4.

It looked like this:





Now it looks more like this:



And this:




So as you can hopefully see, I've followed my clean, stylized concept of design from the characters and continued it into the weapons which are made of 3 textures, a dark mahagony style wood for furniture/frame, a gun-blue metal for barrels and general fitting and a brass metal for additional fittings such as the large gas regulators for the semi/fully automatic weapons. Light armour itself is simply denoted by a helmet on top of the standard uniform. Stealth armour is the same but in camouflage and that as well as heavy armour are not yet completed.

There's quite a lot of Guns Guns Guns Guns Guns Guns ... and bullets too. 6 Classes, each with their own 4 types of equipment - some of which are guns - and then universal equipment - some of which are again guns - and then 4 seperate types of ammunition. And then artillery. It is rather a lot of information to remember. After lots of play through, no doubt it will all settle in some vaguely congnitive part of the user's brain. However until such a time, people are going to want to be able to check on what weapon uses what bullets which do what damage over what range.

To this effect, I decided it would be a good idea to have the calibre of the weapon on the icon for that weapon, or the actual name of the equipment on that equipment icon. All to help with instant indentification of the object. Weapons only use a stylized picture so if the player has forgotten what it is, or cannot remember what it is that a particular piece of equipment actually does, it would be nice to be able to check quickly, rather than wade through a manual - which in the digital age don't tend to exist physically, so wading through a pdf in another window or some sort of volumous in-game help.

For this reason I have started adding "info" buttons EVERYWHERE. Baffled about exactly how a "didgeridoo" works? Depress the "info" button and then click on the "didgeridoo" icon. Replace "didgeridoo" with a real in-game piece of equipment  ... obviously ...

And so here's a little amalgamation of equipment information pop-ups.











From this you can now see that "Stealth Armour" works by reducing the enemy's spotting range by one third, has a penalty for hot climates, has another penalty for none "Recce" classes and loses it's stealth function if you open fire and give your position away. All in nice, neat, easily accessible pop-up from the inventory.

Also, as I've noticed on some talk on irc about jitter on the loading of dynamic textures, I thought that I'd just mention that deep down in the bowels of a map's "origin" (0, 0, 0), I have a few things hidden, a couple of objects and a large plane with multiple textures on it. Also note that my blood splatters and bullet holes are contained as segments within their own type of single texture. So rather than having 16 small blood splatter materials, I have one single material split into 16 sections. There is still the occassional jitter when a new dynamic object is created for the first time (eg: an explosion, a bullet, a particle) but it's reduced when the material is preloaded into the map.





And one more of some chaps with some Guns Guns Guns and Info on Guns Guns Guns ... and bullets too.


Also ... NEW BLOG FORMAT! As I realized that the other one was a little "1024 x 768" optimized, and monitors have progressed somewhat - hell, I use a 40" 'ello Tosh got a Toshiba 1080p TV for my desktop. With pixel rates soaring it gets kinda iffy to see clearly on anything smaller ...

Tuesday 25 September 2012

Make Simple Character Model Quickly ... 40 Days Later ...

It was time to start making some basic characters. This shouldn't take long ... and indeed MOST of it didn't ... but then some of it did ...

Magnets!? How do they -

I mean, mesh deformation ... how does it work!?

I had recently played through my Ye Olde FPS - demo of which is still available here at 168mb. I had noticed the quite poor deformation on the shoulder and joint areas of the characters - though admittedly this had been the first time that I had ever looked inside a 3D modeling application and proceeded to model, rig and animate a character ... and it had also been my last. Since then I had created a new bone armature - this time observing some proper Torque structure (bip etc) - and animated to what I considered to be a satisfactory level. My placeholder Ai player model strutted imperiously across the landscape.




She had awesome slippers but appalling vertex deformation ..


I'd rechecked various old bookmarks - many of which no longer existed - and even more that had moved about teh interwebz but could still be found. Particularly I was after the guy who had created Lara Croft in TombRaider Underworld and had posted on GarageGames ages ago. I did find the thread but he'd reorganized his gallery and the pics were missing. Back-tracing to his website I found what I was looking for, simple, clear tutorials on getting meshes to deform nicely.  Also I remembered that I'd previously seen a guy who had worked on Gun had plenty of good general modeling mini-tutorials ... if a rather unfortunate website name poopinmymouth.com.

So, armed with all of this information, I proceeded to knock up my first model. My current project is a turn-based, squad tactics with a steampunk vibe. There are 7 nations/factions and each one consists of a standard unarmoured solider, light armoured - which is the same as unarmoured but with an ethnic/national helmet, stealth armour - same as light armour but camouflaged (yay for setSkinName(%skin); ), and heavy armour which will be some steampowered mini-mech suit - the body will be the same for all nations/factions with the appropriate regime's unarmoured or light armoured head poking out .

So I started out with the unarmoured model of the British Royalists - all factions start with Nation and then Regime/Governance (eg: US Republic, Chinese Dynasty, etc). It's steampunk, they're British, it's got to be a red coat. Throw in flared trousers, big boots, a peaked dress cap and the manly facial hair of whopping sideburns and a big old moustache ... in ginger. And of course goggles ... steampunk has to have goggles ... or a monocle. Not wanting every nations soldiers to have the same type of eyewear I'm going to have to vary it somewhat, so the Royalists have their goggles loose about their necks ... but they still have goggles.

After a fair bit of initial faffing I was pretty pleased and tried the whole thing with my rig and animations and it looked like some sort of terrible mutation had been involved in some sort of scientific disaster ... on a train ... which had crashed off a bridge ... into a Dynamite factory ... More reading up rigging was required and watching copious amounts of video on youTube.

Previously I had assigned vertices to bones via simply grouping them at full strength, which had caused the poor deformation in my first models. Carefully painting the weights seemed like a better idea and slowly but surely garnered better results - as did rebuilding various parts of the mesh incessantly ...

To quote an obese, chain-smoking alcoholic:
Success consists of going from failure to failure without loss of enthusiasm.
 In the end I was either satisfied or beyond caring ... possibly both, and decided it was good enough.


Imperial Strut animation - in the ancient Blender 2.44 which I still use ...

The model is currently only sporting a simple diffuse map with ambient occlusion. Later I shall create the specular and normal maps, as well as add various details to the diffuse, though not too many as I don't see much point in having hugely detailed models or textures when the player is going to spend most of the time zoomed out on the battlefield.

And here it is in video - note, the rifle is currently a whopping bit of 2x4 that I'm using as a placeholder model.



Note: I use an older version of Blender 2.44, and 0.964 DTS exporter. I do use DAE/COLLADA at times, but not for characters. This is mainly down to the animation system changing in the 2.46 version of Blender, and me not wanting to spend aeons learning the new method.


And one final thing. Torque3D game engine is now available under the most permissive of all Open Source licenses MIT.

Thursday 16 August 2012

Short Campaign: 96 Battles Later ... Not So Short Then ...

 So Short Campaign turns out to be ... er ... not so short after all. But was ruddy good fun, especially after I fixed the usual gazzillion bugs that you find during a month of extensive playtesting.

I played through my Short Campaign ... and it took 96 battles to win.

... so ...

... err ...

Short Campaign turned out to be not so short after all.

It's been a solid month of playtesting ... with the accompanying solid month of fixing a huge number of bugs that a solid month of playtesting throws up, and an equal amount of tweaking.

For my Campaign test, things started off well, a little too well. Then after 30 or so battles, I found a bug that meant the Ai was never deploying any of it's veteran forces. Whilst my force of veterans and equipment was growing, I was still fighting againstthe halfwit conscripts who can barely hit an elephant at close range. That fixed and things began to be a bit more challenging.

The Ai had a few issues with finding cover under certain circumstances - fixed. The Ai had difficulty re-equipping from the dead when they ran out of ammunition - fixed. Enemy gunners didn't have the correct amount of ammunition on deployment - fixed.

And also made a whole load of tweaks. Some of the most expensive equipment didn't seem to have the firepower to justify the cost - fixed. You get what you pay for but no one piece of equipment tips the balance decisively. I also redid a number of Guis to make them somewhat more ergonomic. The deployment screen now has battle terrain, weather, conditions, objectives and modifiers viewable with less clicking. Conscripts can be added to the deployment force singularly or en masse now.

I also added range-based-passive-phase-fire to the classes. So gunners and snipers could only return fire on the enemy's turn if the target is over 200m away. Recce and Fusilier can only return fire up to 100m, and Sapper, Grenadier and Militia (Conscript) get 100-200m. I found it creates another tactical decision, both in deployment - low visibility prevents Gunny and Marksman using passive fire - but also in battle - do you leave a Fusilier to cover the other classes incase an enemy walks around that hedge just in front of your Sapper and is too close for him to defend himself? Or do you move the Fusilier up doing his own job?

I had started off with the concept of limiting the number of veterans to just 16 as a way of acting to create a further strategic variable. You've got a lot of one class, say a class which can only return fire in the passive phase at long range, and when some conscripts survive they get promoted to a close combat class which you are short of. Do you sack one or more of your experienced veterans to make room for the new - but inexperienced - guys?

And then there was the actual gameplay, and the type of interesting procedural stories you get from unscripted gameplay. Just throw in a bazzillion variables and watch it go.

---------------------

Late on in the Campaign, after I'd fixed all the bugs I had found, my mixed force of veterans and conscripts was attacking a large enemy base on a hill. Numerically I had the slight advantage, experience wise they probably shaded it and equipment wise we were equal. This was the third or fourth time I had attempted to win this particular hexagon shaped territory on the Strategic Campaign Map, and I needed it to allow for an extra avenue of attack on the final series of enemy territories to win the not so short campaign. Previously I'd mainly used conscripts in the attacks due to poor weather conditions and a lack of close-quarter combat troops. Now I had sunshine and clear weather which favoured my available types of veterans.

   I'd moved my force up to a low bank which gave them cover and split my troops into Support  (Marksmen and Gunners) and Assault groups (mostly conscripts with some veteran Grenadiers). I also had a Recce and a Sapper for spotting boobytraps, and Sapper dualed as a mule carrying lots of aidkits and spare ammunition. I only had one of each of these classes available

   I'd had everyone pouring a bit of fire from behind this bank to suppress the enemy, Recce and Sapper had been spotting and diffusing boobytraps. I'd started moving my Assault team round to the side so that they could run up the hill and attack, when a sniper round critically wounded my Recce. Luckily Sapper was near enough to despense first aid and medivac him. Unluckily it meant he wasn't part of the assault anymore.

   My Assault team broke cover and rushed halfway between the objective and the bank, taking cover behind a series of hedges whilst Support group peppered the enemy. All good so far ... right up until I set my first trooper out. He spotted a large number of enemy that had been obscured and took fire from the far side of the map. I decided to throw my flanking manoeuvre out wider to avoid a crossfire and that's when my lead officer was vapourized by an IED. Sapper was still back with the Support group, Recce had been medivaced, so no one in the Assault team could spot boobytraps. And that's when the conscripts which made up the bulk of my Assault squad freaked out, taking a massive morale loss from the officers death right in front of them.

   Most of them fled blindly in panic back towards the bank, narrowly missing an earlier detected but not diffused IED. A couple stood in the open impotently firing at enemies either to well concealed to be hit or out of range. And then it was the enemies turn to pick a few of my panicked troops off ... which made the surviving conscripts freak out even more.

   Eventually I ended up back where the assault had started, behind the bank with the Assault team. Sapper used the last of the aidkits to heal the wounded, the conscripts had regained their composure. Now the real problem was a distinct lack of ammunition. I spent some time dividing up the remain rounds and added a now unarmed Marksman to the Assault team as there were no more 50cal rounds left. Most of my dead troops still had plenty of ammunition, but they're corpses were stuck in a crossfire.

   Not wanting to fallback to the Deployment area and have a dirigible rescue my guys, I tried again, this time heading for the smoking earth where my lead officer had died. There wasn't going to be an IED left there now so it was a safe route up the side of the hill.

   I headed out of cover, much wider than the first ill-fated attack, and had everyone sprint through the enemy fire, past the scorch blast left by the boobytrap, and scavenged equipment from the deceased. My Support team chewed their way through the last of the ammunition to give covering fire, and I suddenly had half my men sitting behind that bank playing cards and checking Twitter feeds for the rest of the battle. So it was all down to my increasingly small and barely armed Assault force.

   Storming up the hill I noticed a lack of incoming rounds, infact, I could see some of the enemy Ai starting to loot their dead for spare ammunition and weapons. As I'd never had a battle last long enough for both myself and the Ai to run dry of bullets I was pretty bally chuffed to see this in action in real-live gameplay rather than laboratory conditions of dev testing. As my Assault team's ammunition dwindled to naught there was a sudden close-range grenade duel on the hill but I was to the enemy dead first and rearmed. A final push to the top cost another dead conscript from wherever the hell that damn sniper at the other side of the map was hiding, but I seized the enemy's colours and won the battle.

-------------------------------

It had all been rather exciting, and nerve wracking, but showed me that my whole gameplay idea and the methodology of how I had been creating it was just what I had been after, 14 months ago when I first started.





And here is the final Campaign map. As you see I had tried my best to avoid cities as much as possible as they always have the largest number of enemies to face. I'd started off from the left, worked my way right up to the last few which are protected by the enemy Citadel's influence (more troops per hex). And that was when I got a bit stuck. Each hex captured which borders the hex you attack gives 4 troops, and for the final attack I just never seemed to have enough and so had to open up a new front all the way up the right side to attack from all available angles. If those 3 cities in the top(ish) centre had been other types of terrain I would have gone through them instead, but they simply were too much of an obstacle.




And here is the final tally. As you can see Sapper survived! Recce recovered from his medivac but was killed later. Out of all 77 victories, half of them were  aided by the bug mentioned above when the Ai only fielded basic forces. Total War Cost is blank because it was an idea I had at the end and thus only just implemented it - it shows exactly how much you spent over the whole war. Tax payers like to know these things ...

And finally, a short video demonstrating starting the campaign and then saving mid-battle and then reloading it with progress restored.


Wednesday 18 July 2012

Long And The Short Of It, Working Campaigns and SaveGames

Long Campaign, Short Campaign, Save Game ... cos you can't really play through the whole thing in one sitting ... well, you could if you never have to ever do anything or go anywhere, but must people occaisionally have to.
And behold, there is a Short Campaign.

Don't have time to conquer an entire continent in a procedurally generated, airship fleet commanding showdown between the world's Great Powers, yet don't want to play through a one off, single tactical battle, but fancy something with a bit more longevity?

Then maybe the Short Campaign is for you. Also known as "The Citadel Campaign", "The Dastardly Pirate Citadel Campaign" ... and possibly a few other things until I work out the correct name which I shall ultimately call it. One thing is for certain, it has Dastardly Pirates and a Citadel ... actually that's two things ... Two things are for certain, it has Dastardly Pirates and a Citadel ... actually it doesn't have a real Citadel because I haven't made the model yet ... so you'll just have to pretend for the time being.

The Short Campaign comprises of a triangle of territories (hexes) reaching 8 or 9 at it's deepest point. They're all under the control of the Dastardly Pirates who send out flagons of treason from their Citadel Fortress right at the back, and it's up to the Regime of your choosing to blast their way through enemy territory and storm that Citadel.



Blank/blue territories are captured ones, and the player's regime gains cash and extra troops from wrestling them from enemy hands. Seizing fortifications allow for class upgrades. The deeper into hostile territory the player pushes, the more skilled and better equipped the opposition becomes. The player can only launch attacks from territories which they occuppy, and each adjacent captured hex gives additional troops for the assault.

And this is where the main part of the game is now fully functional. Yeah, in bold and everything.

From the "Campaign Overview" section, you select your troops, equip them, and then it's straight to the "Tactical Battle" mode where you direct your chaps around in hot turn-based squad tactical action! The end result it recorded, your veterans are upgraded or if deceased removed, successful conscripts get promoted into the veteran core, loot gets gathered, and the Campaign world is updated to reflect the changes, territories change hands, progress is made ... or not if you got your bum whupped by the opposition in the Tactical Battle.



And when the Campaign reloads, updates the changes, and it all continues. It's very much in the mould of the original X-Com "Geoscape" to "Battlescape" and back again - except you're fighting for possession of territory and territory change hands depending on battle results. And it all works - exactly as I'd envisioned (or at least hoped it would) when I first started, 13 months ago.


HUZZAR

In fact, 80% of game logic is complete and bug-squished. Obviously there's a bit of tweaking that can be done here and there, but it works. The Short Campaign Mode works in it's entirety, the Single Battle Mode works - though I've only one map at the moment and I've yet to introduce the Armoured Cavalry class option, and the old Long Campaign Mode (the thing with the airships) works save for 3 known bugs and a bit of tweaking.

And I've knocked up a save game system which works across all 3 game modes. Because of the various jumping back and forth in the Campaigns between "battle mode" and "campaign overview mode" it took a bit more effort than just saving out the current missiongroup. It's going to get a slight tweak to incorporate the difficulty level when displaying available saved games to restart, but apart from that it works as desired. Each game mode has 10 saves.



There is now also now a difficulty setting for campaigns, so the player can choose their own level of challenge.

In the video below is it all in action, abridged obviously as time and filesize are premium in both uploading and watching these sorts of things. There's also a little hiccup when I attempt to save from the "tactical battle" part first time as I had fix a bug and re-execute the gui to get the info to display correctly ... note to self: don't write a save game system at 5am ...

The combat is very abridged, just a little taster but if you've watched any of my previous videos you'll know the gist. As it's early on in the campaign both my troops and the Ai's are lowly conscripts with the most basic equipment, and thus have trouble hitting the broad side of barn. In the end the Ai throws in the towel and flees the battle area after taking a few casualties.


Monday 2 July 2012

The Ballad of Brave Sir Robin RUN AWAY! RUN AWAY!

Typically my blogs are written as full blown stream of consciousness style, which tends to be rather amusing, off the cuff, overly long and it also tends to mean that I forget to mention stuff that I've actually done, hence -

- 13th month anniversary blog part TWO!


Bravely bold Sir Robin rode forth from Camelot.
He was not afraid to die, O brave Sir Robin!
He was not at all afraid to be killed in nasty ways,
Brave, brave, brave, brave Sir Robin!




Oh Brave Sir Robin, Thou Art Inspiration To Us All!


Alas we cannot all be as brave as Brave Sir Robin ... which is why I've introduced the RUN AWAY  Mode.

It was something X-Com had, the ability to flee with your remaining troops in the transport at abandon the ones still outside to fate worse than getting set upon by a pack of Chryssalids ... actually that usually was their fate ...


Give back Rudi Unger!

Now in my project your troops are dropped by dirigible into up to 3 Deployment Areas of your choosing (left flank, central, right flank). If the battle isn't going well you can now retreat to the Deployment Areas and abort the mission, saving the troopers inside the Deployment Areas, including any critically wounded casualties that are lying inside them. Troops and casualties outside of the Deployment Areas are captured, never to be seen again. As it's going to have a SteamPunk vibe they'll probably end up being condemned to live out their days forced into doing something dastardly and unchivalrous like teaching 12 year old schoolgirls how to bake crumpets. Surely for men of honour there can be no greater shame!

Currently my Deployment Areas are just a blue/black striped transparent box which obviously needs changing to something with a bit more graphical gravitas. I've created a new in-game options button which brings up a whole list of options such as "graphics/audio options, save game (not working yet), Quit, etc" and "Abort Mission" is found under here (rather like ye olde X-Com).

Selecting it brings up a warning detailing that you will fail the mission (thus losing any territory if you are defending it in the Main Campaign game) and informing you how many troops will be rescued and how many will be permenantly lost to enemy hands. You can cancel if you think the losses are too great, or go ahead with the rescue and have a dirigible pick up the survivors. Rescued troops will retain all of their experience from kills recorded during the battle but will not get their additional mission experience bonus - to stop the player starting battles, withdrawing all his forces and then getting a free EXP point. NO cheating for you!



Run Away!

The ability to soil your pants and flee waving your arms in the air whilst screaming like a little girl startled by a large and hairy spider discovered hidden away inside of her lunchbox upon opening it is also mirrored in the enemy Ai. If you've been handing them an utter thrashing and they have become hopelessly outnumbered they will also think about legging it and extracting as many survivors as they can from an unwinnable situation.

 During playtesting I noticed an annoying little issue ... your troops automatically stop moving when they spot a new enemy so that you can decide on a course of action such as attack, move elsewhere or keep going. However when walking over rough terrain it is possible for the trooper to get repeated glimpses of an enemy Ai who you don't want to attack or can't attack due to your weapon's limited range. When this happened the player's trooper would stop every few feet and the player would have to reclick the destination to get them to move and then it would happen again. So I created a simple "don't stop moving" toggleButton. The player can now manually stop their trooper as normal, and when new targets are spotted the target indicator displays them to inform the player of the potential danger without halting the trooper. If the enemy Ai makes their reactive fire test the player will stop as normal and come under passive/reactive attack. Annoyance squished.

And I've also done some tweaking to the troops/equipment/deployment screens. Most of this is about throwing in extra warnings when you attempt to deploy a squad with guys either missing ammunition for weapons or not equipped at all. There's a fair few changes I still want to tweak into the deployment screen, mostly ergonomic/aesthetic, but it all works fine for now.

And now, back to Brave Sir Robin...

Sunday 1 July 2012

A Year To The Day! Nope I Can't Count It's Been 13 Months

Apparently no blog for June then ... because I was waiting for the year long first anniversary of the start of my current project to post. And then it turns out that I can't count ...

So, this is the 13th Month Anniversary Of Starting My Current Project ... doesn't exactly trip of the tongue does it?

First up, let's get a little overview from the first blog back in June 28th 2011.



Wow, things have changed a bit ...

Turnbased squad tactics gameplay, somewhat in the vein of Laser Squad and the original X-Coms.


Check! We've got that and it even works and everything. Infact the only bit of the actual "battlescape" part of the game that is not fully functional is the Ai picking up other weapons (something which neither LS nor X-Com had). To be honest I do have an Ai pick up weapons function but it's a horrible illogical mess and needs rewriting so I can iron the remaining bugs out - and that got delayed only because I ate something a bit dodgy during the week and have had my head stuck in a bucket. Think pea soup and The Exorcist. No, booze was not involved.

My liver function test showed that I was suffering acute hypochondria and that my organs are all fine (or they lost my test results and gave me someone elses ...) but I've got some gastro-reflux-thing which definitely didn't like whatever I ingested during the week, cue demonic possession and pea soup.

The other thing not functional is the "armoured cavalry" support option, but that was always designed to be added right at the end after everything else was done, so no loss there. When existing it will be a large tank, unable to spot enemies by itself unless they are also a large tank, incapable of reactive fire, baffling expensive (like the real things), but capable of blasting large areas into little bits and being compeltely immune to electric weaponry, a specific of the Recce class. This is where the Sapper class and their myriad of explosives and flame weapons will come into play properly.

I spent most of the last month finding and fixing bugs in gameplay, as well as lots of tweaking and balancing. There was a whole load associated with the sapper and recce classes and their interaction with booby traps which required rather a lot of testing.

But now it all works and it works intelligently.

All three battle types of clear/assault/defend work. Ai will actively seek cover, defending Ai won't just hang around at their defensive position and take long range shots. If they're under attack and don't have the ability to reply in kind they'll move to a safer defensive position and then scout back to see if the situation has changed some time later. If a defending Ai isn't getting any part of the battle they will scout about their area to flush out lurking attackers.

I've given each class of trooper a new "reactive range", so now snipers don't spin round and take passive reaction shots at point-blank range, something which always seemed a little odd in playtesting. Sniper and Gunny class only commit to automatic reactive fire during the opponents phase at ranges of 200+, Grenadier and Sapper take the mid-range of 100-200, leaving Fusilier and Recce with the close-range 0-100. This all helps represent the type of weapons that are class specific and gives more of a tactical dilemma when ending the player's phase. Do you really want to leave that Recce trooper out in the open there? Do you really want that sniper next to that doorway that anyone could come out of without warning?

I've also tweaked the whole promotion system. Promotion is now easier because ... well, death is also rather easy and your troops can be have very high mortality rates if things go wrong. Stats also increase more than before as the first few promotions didn't seem to give too many advantages for the effort that they took. Panic is now much more likely for lower ranks and conscripts if higher ranks become casualties.

And that's about all I can remember of the last month ...

What I was hoping to have achieved by now was to have more finalized artwork done, but alas gameplay tweaking/fixing has occupied all my time. When I'm done with the fixing I'll give it a little roadtest on integrating the whole tactical battle thing with teh overall strategy campaign just to make sure that there is no HUGE PAIN IN THE BUM PROBLEM AWAITING FURTHER DOWN THE LINE.


And eventually we'll get back to this bit of the game - and stick the two parts together with duct tape

The strategy part works fairly okeedokee by itself save for a lots of tweaking for balance issues (I need to find a smoother way of limiting dirigible numbers because in testing they could really get out of hand) and an Ai versus Ai bug that I noticed aeons ago but never got around to fixing where the correct result was not always recored. Obviously this area also needs it's artwork finalizing too. However finalizing the "main campaign" isn't my immediate priority as I intend to create a "short campaign" mode where the player battles his way from the base of a triangular arrangement of hexagon territories to eventually capture the enemy citadel. The player will be able to pick their own route, carving a swathe through enemy territory, attacking fortifide positions to unlock extra equipment/weapon upgrades or by passing them to move on to the next level closer to their goal. More on all of that some time later.

So ... to recap ... it's been a full year to the day ... er ... and a month from starting! A lot of crap code has been written, a lot of crap code has been rewritten until it wasn't crap, we learned new things and then forgot them, we wondered why we did things in a certain way and then undid them only to find out that we did them that way because they wouldn't work the other way, we completely forgot the yearly anniversay blog.


It's been a year and a month and we now feel a lot less like this.

Thursday 31 May 2012

I Break Everything And Then Fix It! Oh The Exciting Life Of Indie Deving!

I had a liver detox diet, lost the strange bicycle tire which had appeared around my torso, eat more fruit than anyone had ever eaten before, took up skipping - which is knackerising - bought a few crates of ale and a bottle of baffling expensive rum under the guide of death metal celloist (it was a very pretty bottle),
sat about in the garden because it had finally stopped raining in the Shire of York after the wettest Spring since 1907. And even found time to break everything that I'd done dev-wise whilst trying to fix it.

So I ended up changing my art style again ... immediately after I'd decided on what it was going to be ...

So it is now more "painterly" and less "abstract".


I'd done a bit of refractoring my working level, shrinking the size of the hedges a little and opening more gaps between them. I'd also noticed that I'd been getting a fair few failures on pathfinding with the Recast resource. My terrain is very bumpy and I'd set >1500 custom class CoverNodes about and done pathfinding between them with an automated script to test around 7 million paths. Initially I'd a rather worrying 2.5 million failures, and after a bit of saving throws in my pathfinding scripts, I'd got that down to <200k, and then thrown in a simple "move to nearest node where you can actually get a path" incase that 3.7% failure rate occured in game.

I'd improved my Ai, getting them to make decisions about when they should try and hide from the player. Previously they'd either stopped at distance if they were "support" or advanced if they were "assault". I've always been a fan of turn based strategy/tactics games ... which is why I'm making one obviously ... but sometimes their Ai has been a bit ... daft. Steel Panthers I'm looking at you. I added in a whole load of new thinking to make the computer act more in the way a player would, but still using it's randomized battle plan.

Suddenly my Ai were filled with awesome and powered by buttkicking, so it was time to remove all the little helpers I'd given them previously to make them more competitive, like maxing out their stats, they now get the same chances for decent stats as the player.

Which all goes to make battles more competitive, varied and fair.

Somewhere amongst all of this I'd noticed a few bugs so I'd fixed them, and thus managed to break "many things", again mostly pertaining to the Ai. After a fair bit more hitting IDE with a mallet I got things working again as they should do.


I'd also made a start on creating some player characters - or at least a "base character". I'd looked at some of the meshes that I'd got from Evolver for use in Blender some time ago, and studied one of these as a base for rigging and animating a custom character. I'm doing a SteamPunk vibe, so everyone "struts imperiously". I'm still using Ye Olde Blender 1.44 with DTS exporter 0.964, though I export with collada for the foliage/trees/bushes so I can use vertex painting.

I'd also made a whole load of improvements to my GUIs, such as adding a new button for reserving a shot at half maximum range if you don't want your little chap to be wasting shots on things miles away that he's unlikely to hit. In "loadout" I'd also added the ability to equip one chap and then have his equipment cloned to all unequipped troops - money and individual strength/encumberance permitting - which is incredibly useful when you have a bag of Conscript Militia who can only use basic equipment until they get promoted ... should any of them survive the battle.

Still to do is a bit more Ai thinking tweaking, a bit more environment tweaking, creating some finalized models for troops and weapons, testing the assault and defend gametypes, doing the art for GUIs, and errr ... general stuff. My bug fixing list gets smaller, my todo list doesn't seem to. Oh the exciting life of Indie Deving!

tl;dr good things happened, bad things got fixed, I'm eating a lot of fruit.

Thursday 12 April 2012

Stylized Art Style is ... er ... Stylized, Plus Other Stuff

So after much "umming" and "ahhing" and even a bit of "harrmuphing", I settled on an art style I settled on an art style and booted up Ye Olde Blender and Le Gimp deux point six.




Harrumph.

A long time ago in a galaxy far, far away ... well, a long time ago anyhow, in a previous project, I'd long since dispensed with the idea of using "all the pixels". To be honest, I'd never entertained the concept of using "all the pixels" and had always favoured the stylized approach eschewing grey and brown.

But stylized is kind of a broad brush ... initially I'd attempted much more cartoonish, slapping a cartoon outline shader on it, but visually, it ended up looking really busy. Eventually I ended up drawing things out hand roughly, and then applying various filters in gimp until I got something stylized and simplified which I liked. Same process for the modeling in Blender, keeping things fairly simple, and then slapping stylized, manipulated textures on them, and doing some final tonal tweaking using the "diffuseColor" in material in T3D's material editor.




Behold! Stylized terrain! Behold! Colour! ... spelt with a "u"!

Now I also have a randomized weather system which I have whined on about before. Each weather type changes the viewable/spotable distance of targets on the battlefield. If you can't see it, you can't attack it (regardless of whether you've got a weapon with the neccessary range). So we have the same scene in the pic below in all 4 weather types.

Clear - 300m spotting
Cloudy - 200m spotting
Stormy - 100m spotting
Night - 50m spotting






Apart from the ground cover (grass) which was part of an art pack and may or may not be replaced eventually and the rain texture which will be replaced soon, everything else is custom, minus the player model obviously ... but that will be on the list to sort out pretty soonish, as I'm in the process of defining an alpha/beta demo. And then ... ????, because I am working on the classic plan of:

1. Make Computer Game
2. ????
3. Profit!

It's the middle bit which is going to take some thinking about ... and of course I'm still working on 1 in the meantime. And it is 1 which has been expanded, with two new battle modes for the squad tactics battle part of the game. Technically it's one battle mode with two sides, as it's attack and defend a HQ, symbolized as the regime's flag. In the main campaign mode (big thing, lot's of dirigibles and hexes) attacking a territory (or your territory being attacked) will result in either a clearance mission or an assault/defend mission, depending on whether or not the territory is under garrison protection.

In assault/defend gametype, the attacker attempts to storm the enemy HQ by moving into contact with the defender's flag within 30 turns (more than enough to accomplish the task or be routed trying). I've got the Ai to use booby traps if they are on the defensive (can be spotted by recce and sapper classes and defused/captureed by sappers and prematurely detonated by any other explosion) and have some available, and created tactics for their defence when protecting their HQ flag.




Amusingly, whilst doing all 6 factions flags (plus pirates), I had to check which way up a British flag goes ... apparently the wrong way is an international distress symbol - but you'd need keen eyes to spot that ...

I'd also decided to tidy up the last few loose ends of my Ai scripts, mainly to do with choosing what weapon is best under certain circumstances and how best to rearm from deceased troopers, ... and promptly found some of them to be a right old mess when reading back through them. So the old flow-chart was dusted off again for a major refit of Ai decision making. Still pending.

I've also changed the pathfinding solution that I was using and have now integrated recast - which I had previously used in a few resources enabling Ai in deathmatch in Torque3D's stock Chinatown showoff map. Read the instructions carefully for integrating recast if you've got Torque and fancy ago.

No video of it all in action yet.

So, still to do ... things ... many things ... create initial custom player types with all the animations, sort out the artwork for the GUIs, bang up a playable demo, wonder about aplha/beta funding and whether to do it ... or indeed how to do it.

Harrumph, harrumph, harrumph ...

Wednesday 14 March 2012

Post Battle Reports, Promotions, Recruitment, Losses

 Post battle reports! Randomized Camera placement during enemy hidden movement to increase the tension and stop the player from getting bored! Promotions! Recruitment! Doom! Exclamaition marks!
-----------------------------------------------------------------

All good things come to an end ... also ... bad things. And which it is is all rather dependant on your performance during the battle. Introducing ... Post Battle Performance Screen! With an individual breakdown of each troops performance, kills and status, featuring the ability to recruit new conscripts who did well - and survived - into your core veteran troops, as well as dismiss (I actually use the term "retire", it's kinda nicer, like you're sending the old fellow back to enjoy his twilight years rather than just sacking him out of hand) veterans which you think aren't up to it, or that you have just ended up with too many of one class and need to make room for different class members.


 
Win!

Initially I'd thought of allowing the player as many veterans as they liked ... or at least could get to survive, but eventually decided on restricting it to just 16 - and 6 classes into 16 does not make 3 each. So the player is forced to evaluate his replacements for each battle carefully. I have been thinking that this might be a little on the stingy side ... but there needs to be a limit somewhere or else the value of a veteran will start to wane - and I want them to mean something to the player, for the player to be struck with panic when he sees his favourite Marksman Captain fall under a hail of bullets, feel a sudden wave of relief when they see the "critically wounded" sign appear over the still twitching body ... and then panic again whilst trying to find someone with a firstaid kit who can get over there and have the casualty saved by medivac.



Individual results

Conscripts who survive and gain at least one kill are then converted into the rank of Lance-Corporal and whatever class their initial attributes decide that they are best suited to. Surviving veterans also increase their experience. Killing enemies increase experience, and killing an enemy who is better than the trooper who felled them doubles the experience.
So here is the simple formula:
Survive = 1 xp
Kill enemy equal or weaker = 2 xp
Kill enemy stronger = 4 xp
Promotion on 5 xp + rank level.
So a corporal (rank 2) needs 7 xp for promotion, whilst a Captain (rank 6) requires 11 xp to become a Major. If the Captain bags a couple of Colonels and a Brigadier, he's promoted. Score 4 Sergeant-Majors and he's still 2 xp short after surviving a mission.



Promotions and recruitments

I've designed a formula on overall battle performance, depandant on troop numbers, experience, weapon advancements and funding, which give 24 different types of final result depending on victory or defeat. This would seem to be the ideal thing to turn into achievements eventually too, but for now it's just to give the player feedback how they did. Every weapon that is lying around or in the victorious side's possession has it's financial value added up and is then awarded to the victor's team. If you've fought and defeated a well equipped side with basic weaponry you can turn a tidy profit, or at least offset the cost of deploying veterans. Veterans cost 10 cash (which will probably be sovereigns in the final thing) per rank level, consript milita are free to deploy.



Bum whupped ... but I was outnumbered 2-1


All your promotions, losses, retirements and recruits are duly noted and saved out to your veteran file, so when I have the whole thing intergrated with the campaign, there's already a fully functioning system for saving and progressing your troops.

In other news, I've created a new feedback system of randomly locating the camera during the enemy's turn so that it will show a random location every time the enemy switches to initiate a new trooper. This is another little thing of feedback to tell the player that stuff is happening and the game hasn't locked up and make passivity a little less dull.



And that didn't go so well :(

And here's a video showing a whole load of stuff about that. And if you're wondering about the names, I was playing as the Zulu Nation (names done as givenName surName regardless of faction culture).




I've also gone and redone a whole load of behind the scenes stuff like alter the whole way targeting is done and integrate it into other systems like action point deduction during movement. Originally I'd had multiple schedules running and various overlapping - all of which had to be cancelled at gazillions of possible places depending on various factors and various emergency calls having to be made if it all ended on odd cycles. Things are now much more streamlined - though obviously I created a shedload of new bugs which I have since fixed.

Still to do, still to do ... plenty! I've got to fix the bugs (read - rewrite) in the Ai's ability to find dropped ammo and weapons when they need them, sort out enemy boobytraps, get the Ai to decide on the best solution when attacking an armoured target, redo the playHUD, try a new pathfinding and cover node concept, transfer hidden movement cam to this (at least this one should be easy), create my own preload of data or integrate middleware (I've bought middleware called AFX2 by Jeff Faust that can do this amongst other things but have been implementing my own concepts of various things in it without referencing it as this helps me think and learn ---- though Jeff's methods are all far superior to my hacky make it up as I go allow route), create armoured cavalry, fix the flammenwerfer which has too many drawbacks for something very expensive, make sure the save/load system works fully, herp the derp, etc, etc ... but to be honest we're not that far from needing to create an actual map with proper assets and to end our testing (our = Royal "we" ... it is just me and the imaginery girlfriend) on these quickly made test arenas. It's just that I'm mindful of trying to avoid the constant chop and change between making assets and functionality.

Monday 27 February 2012

Feedback To Player When Nothing Is Happening

Waiting around, scratching yourself, wondering what the hell the Ai is up to ... if anything? Has it crashed? Locked in a loop? Waiting for input without telling you that it wants you to do something. Who knows?

---------------------------------------------------------

I had noticed occassionally decals would not work as expected but didn't think much of it as it didn't seem related to the stability issues I had been experiencing. I'd ripped out my custom explosion stuff and gone back to using automated functionality, and whilst this had fixed my disappearing decal, it hadn't done anything for stability. Eventually I noticed that things were getting deleted, random things like GUIs, decal data, SFX, and other things which was causing the stability issue.

Now I'd had previous experience of this a long time ago in a galaxy far, far away - and knew that it was trying to clean something up, failing to find it, and then eating something else.

There had been an issue ... located somewhere between the chair and the keyboard ... that had crept in very early at the start. However it hadn't surfaced until 6 or so months later when I'd had the Ai team in and working with near complete functionality.

I was attempting to delete a decal in the Ai's move routine which the Ai didn't even own, when I should have been using the decal management system to simple remove it.

BY ODIN'S HAT! Either extreme crunch or a sudden outbreak of sobriety had caused such a faux pas.

And with that fixed, stability issues disappeared.

So onwards and er ... onwards!

After replacing all my custom explosion stuff - for the umpteenth ruddy time - I'd also rolled back a few other changes which I'd recently made. Ammo packs went back down to their original 5 from changed 10. This means that ammo might need monitoring on the high rate of fire weapons and various rocket/grenade launchers. The fact was packs of 10 rounds really seemed to stop bullets being a resource and I might as well have just gone for infinite ammo - which I very much do not want (apart from in the handfull of hugely expensive rechargeable energy weapons). I'd made various tweaks to weapon and ammo weights, ranges, stopping powers, and scrapped the original idea of grenades exploding at the end of a turn in favour of immediate detonation. There were far too many instances in testing of hurling a frag and then getting shot when trying to step back into cover afterwards - thus making grenades a liability rather than another tool of the arsenal.

I'd sorted out a whole load of Ai related thinky-thinky about equipment, decisions on using grenades, swapping weapons and finding more ammo if they run out. Which all took far too much effort to synchronize and stop them from changing their minds halfway through doing something. Various tweaks to initially equipping them were also made and some dodgy mathematics fixed.

All of which brings me to having the player wait for things.




When one of the player's troops comes under fire during their active turn, control is momentarily removed and then given back when the incoming projectiles have either impacted or burntout their lifespan. During the enemy Ai's turn, there's a lot of waiting around obviously - which does tend to happen in sequential turn based games, in fact it's supposed to happen or it wouldn't be sequentially turn based ... er ... obviously.

So I've developed a camera and information system to give the player feedback when they are in "passive mode" and do not have direct input control. This starts as a basic GUI announcement that it is the opponents turn, and some basic information about what is happening. At it's most basic this is a simple "Hidden Movement" announcement, telling the player that stuff is a-foot, but none of his little chaps can see it.

This progresses to giving feedback on things that are in the field of view of any of the player's troops, such as an enemy going beserk and shooting indescriminately, fleeing in panic, or walking into a booby-trap that the player had placed at the beginning of the battle. The camera moves to whichever trooper is the most relevant, displaying their Name, Rank and Class, and information about what is happening. This can be about that particular trooper being in danger, to returning fire, to viewing something passively such as enemy panic or new enemies spotted. Eventually I'm considering tweaking the "Hidden Movement" part of the passive phase so that the camera shows a random part of the map as scenery, rather than just lingering on the last trooper that had any information to pass on to the player.

All designed to keep the player up-to-date with pertinent information and views of the action during the phase when the player has no control.

And here's some vidya of it all in action. It starts off with me planting a shed-load of booby-traps ... which the Ai then avoids by using dual flanking manouevers ... ah bugger. This just happened to be the tactics it chose, the opponent not having any clue where booby-traps are until unless spotted by a "Recce" or "Sapper" class (Sapper's can defuse booby-traps by walking into them). The enemy do however walk into an IED on either flank and there's a bug displayed in the player info where the name of the viewing trooper is not displayed with the information (since fixed!). At the very end there's a little demo of me fragging the main group of IEDs and watching them set each other off with secondary explosions.

The majority of the video is just gameplay, with an emphasis on the camera and feedback system during the player's passive phase. It features "Stormy" weather type which has visibility of all troops reduced to 100 units. (There are 4 weather types with troop visibility ranging from 300 down to just 50 units/metres).





Next up, finishing off the Ai's decision making about which equipment to use in various situations, having the Ai take more advantage of cover, and use a wider dynamic avoidance rule when moving as they do still tend to knock into each other on corners. Also required is an end of battle screen featuring stats on how each trooper did, their current state, promotions, the chance to recruit new core troops from any deployed militia which did well in the battle, and an overall battle rating.

After that it's about sorting out armoured cavalry (also to give the sapper class something to act against as an equaliser with all of it's explosive class-based weaponry), make sure the whole thing loads and saves correctly, and then it's about time to make some proper maps/battle arenas for the post-alpha game.

Friday 27 January 2012

Something That Vaguely Resembles A Game ...

 Does exactly what it says on the tin! I've got a full blown ... if rather rough ... battle with the Ai on the go - and it all works! Well, apart form the bits when it crashes - but I'll see about fixing that later.

Well, it took 8 months but it's something that vaguely resembles a game. At least the single battle part is, which will eventually be squeezed into work with the larger Strategy-Flying-Around-Conquering-Stuff part.

But anyhoo, it works "just as planned" ... only rougher 'cos there's various parts which need tweaking, changing or just downright fixing.

I'd struggled for some time ... and pontificated considerably longer ... about how to get the Ai opponent to choose a team of troopers from the available resources of cash, veterans, 6x classes, and class-level based equipment. Initially it seemed easiest to make pre-defined teams with minor variations ... right up to the point when it became clear that this was obviously a rubbish way of doing things.

After a few morale boosting sessions where I charitably lined the Chancellor of the Exchequer's pockets in a country pub ... and trying to kill a seagull that oblitered the procedurally generated algorithm I was dreaming about, it all became quite clear.

I created a simple yet awesome system which procedurally generated an opposing force within the constraints of available cash, veterans and class levels based on weather, strategy, objectives and multiple squad tactics. No, I don't remember how ... it was all a dislocated haze, but then for Stevie, Real Life ™ gets fainter and fainter everyday ... (I find it helps if you say that in a strained and high pitched voice)

So there it is, an Ai team playing to the strengths afforded to them, using one of 8 different tactical approaches. These are fairly regular sort of tactics and are as follows:

1. Extended Line - sweep down across the battlefield, advancing on the enemy ... it worked in the Great War! Oh wait ... no ... no it didn't ...
2. Frontal Assault - group everyone together and go straight for the enemy ... and hope they don't have to many MGs, mortars or anything else that makes a mess out of a large group in open terrain ...
3. Hook and Line Left - central support group with flanking assault group to the left.
4. Hook and Line Right - guess what this is the mirror image of?
5. Horns of the Buffalo - Zulutastic. Dual assault groups flanking on either side with a central support team.
6. Pincer Movement - twin flanking assault groups.
7. Flank Support - twin flanking support groups engaging at range.
8. Skirmish Line - like extended line but made up of long range support gunners, keeping their distance as much as possible.

Needless to say, weather and terrain conditions are taken into account when the Ai are choosing tactics and classes. So if it's pitch black and everyone is tripping over each other in the dark, there's a lot more chance of their being assault groups than support groups, and likewise, if it's a barren, featureless desert with visibility stretching for miles/kilometers/leagues/cubics they're not going to create vast numbers of assault squads armed with pistols. This doesn't mean that they won't occassionally pick a less suitable tactic - just that they are a lot less likely. History is filled with plans which "seemed like a good idea at the time".

Anyhow, as I mentioned, it plays like a game ... except when it doesn't and crashes. Upgrading to the newest version of the engine might help - still using a customized previous version ...

I've still got 4 post-it notes full of bugs to sort out. And the player really does require a lot more feedback on what is happening during the enemy turn. At the moment reactive fire works fine, the camera mvoes to the player's trooper being targeted and positions itself so you can see who is shooting at him. Ideally this also needs to track visible enemies whilst they move. Talking of visible enemies, spotting works fine, showing and hiding opponents as they move in and out of sight, so no rotating the camera around an obstacle to try and spot an opponent that your team members cannot see.

Reactive fire works both ways, requiring the passive team to successfully spot and have enough initiative (based on distance, stance, angle) to either fire first or fire as the opponent moves.

The Tactical-PlayGUI (as opossed to the StrategicOverview-PlayGui) is the only one which still requires to be overhauled, and there's a definite need to highlight the start of the player's next turn as I've spent a while staring at the screen before realising that I had control of my buttons back.

I also need some sort of victory/loser screen detailing what your troops did and what sort of performance you had.

I'd been concerned over a few things and had halved the weight of ammo for fear it was too easy for playesr/Ai to run low. Turns out they don't actually use that much (either human or Ai) in any of my test battles. Also, battles are over a lot quicker than I had expected. Initially I was a bit disturbed at the ease I won my first battle 10-3, but then lost both my next battles 5-10 and 7-10 respectively when the Ai used different tactics and the terrain was less open. With both forces equal it's a fairly nice challenge.

Gah ... enough typing ... video of a battle, with the boring bits edited out. Features plenty of spotting, reactive fire, some healing and some panicking in both teams over the deaths of team-mates.


Easier to see what the hell is going on in HD but you knew that ...



Next to do is improve how the Ai decides how to start each turn, which weapon to go with when they have multiples. They already do pretty well when deciding on grenades or bullets. Currently I have the "Meeting Engagement" gametype working pretty well, but also need Assault and Defence. Also tanks/armoured cavalry needed or the Sapper class isn't going to have too much to do with it's specialized explosives. Finish up my save/load solution and eventually cram it all into the strategy part of the game so that the campaign mode works fully. And of course art ... which all comes last after the damn thing works properly.