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