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.