Saturday, 22 October 2011

Fog Of War, Classes, Militia, Deployment, Making It All Work

It's been a hectic month, there's been a real ale festival, I watched my local footy team actually win a game - thus breaking the gypsy curse of never seeing the team I'm supporting win - whilst standing in an all seater stadium amongst a crowd with mis-spelt tattoos on their faces and listened to some interesting chanting, often directed at the supporters of the same team in the seating opposite. There was also a mini-heatwave that saw me sat outside at 1am in a t-shirt, wondering how the hell my friend the teacher was surprised to learn that stars were suns ...

... and I even got some dev-ing done ...

After finishing off the strategy component of the game, it was time to sort out how to hook up the squad tactical combat into it all. This needed a fair a few things - mainly a squad. So I've devised a "Core Veteran Squad" of troopers who gain experience depending on their mission performance (and continued survival obviously). Any time that there is a battle, the player can deploy a certain number of troops depending on whether attacking/defending, vehicle type in use, terrain type being fought over, whether it's garrisoned, etc, etc.

The deployed troops can also partly or wholey include members of the "Native Colonial Militia", who, should they do well and survive the battle, can be upgraded to your team of "core veterans" with an assignable class.

Initially I was thinking of just letting the player hire as many troops as the wanted ... but with the class system it seemed more strategic to limit the number of available veterans and allow a constant supply of militia, who can earn a place in the core team. In the end, I decided that 16 was the best number, thus forcing the player to choose exactly which classes were deemed important and in what ratio. 6 Classes / 16 slots.

British Dirigible Deep In Unknown Territory Flees The Attentions Of The Austro-Hungarian Empire -Only To Run HeadLong Into The US Republic's Area Of Control.

Because of the relatively small core number I've also introduced a "saving throw" concept in the tactical battle, where a downed veteran can be saved by a comrade with a aidkit if they get to them within 2 turns, and then call in medevac to evacuate them from the battle. After 2 turns of lying in near death, the unfortunate trooper will finally succumb to their wounds - and you'll need to get a surviving militiaman who's shown a bit of gumption in battle to start a new career as a veteran. Names and initial abilities of Militia are randomized (names depending on factions). Skills are:
Accuracy - shooting, throwing, not missing, etc.
Courage - guts and glory, sussi, determines if they panic, flee, freeze or go nuts when their Moral Fibre drops due to injury, team losses, etc.
Reactions - who shoots first, can they get a shot off before the enemy runs from cover to cover, etc.
Strength - how much they can carry, how far they can throw.
Vision - spotting the enemy, and in the case of Sappers and Recces, spotting booby traps before your whole squad walks into one and vanishes in a big flash.

I've introduced the "Class Progression System" where the player can buy blueprints of new technology for each of the 6 different squad member classes. This goes in 4 tiers, each tier's research doubles in cost. Whilst most items/weapons can be used by other classes, doing so imparts a penalty. Surviving veterans gain experience which increases rank, and rank increases all attributes with x4 and x2 modifiers on primary and secondary Class based skills. So, here's a quick overview of the Class System:

Grenadier - (heavy infantry) mighty beefcakes of battle equipped with the large calibre stuff.
Primary - Reactions, Secondary - Strength
Fusilier - (light infantry) More guile than brute force.
Primary - Reactions, Secondary - Accuracy
Gunny - (heavy weapons) BFGs all round for fire support. Weighed down with too much ammo to run when attacked, Gunny has balls of steel - and is more likely to go nuts than any other panic type.
Primary - Strength, Secondary - Courage
Marksman - (sniper) Cool and calm, Marksman's languid pulse allows for accuracy at long range and always goes for the headshot. Marksman has a smooth aiming style and cannot do reaction fire during the enemies turn unlike all other classes.
Primary - Accuracy, Secondary - Vision
Recce - (scout) the guys at the front pointing the enemy out for everyone behind them. Can also spot booby traps at 25% Vision skill to yards/metres.
Primary - Vision, Secondary - Reactions
Sapper - (engineer) removing stuff from Earth with cool explosions, also spotting, laying and disarming booby traps. Is the best bet for tackling tanks/land ships/panzers if I get round to implementing them.
Primary - Strength, Secondary - Vision

Your chosen team of guys deploy to battle at one of the sides of a square map, going North-South, East-West, etc. In the deployment menu you can decide which area left/centre/right each guy starts at, so you can create little squads from the off.

The terrain type of the hex being fought over determines the battle terrain, which is then decided by randomly choosing a mission with that terrain type. Weather is again randomized and affects the vision skill. Clear gives full vision, cloudy reduces it to 200 units, stormy 100 units and night just 50. Various weapons have different levels of accuracy, range, damage, shots per attack and reloading time. No point giving everyone long rifles at night when firefights take place at sneezing range.

And back to the strategy part of the game ...

The game logic for this is complete. The Ai teams level up and spread out, basing their actions on one of 5 different strategic approaches. If the player's battles are set to automatic, the game plays through completely to the finish.

I've introduced a "fog of war" element, done over a few US IPAs last night ... nice when things work without too much fixing. The Ai dirigbles in the pic and video are only visible to help me see what they're doing in testing. In-game they'll be hidden unless near territory the player has uncovered.

Next up:
I've got to sort out the buying of equipment for deploying the squad to battle, and also artillary support.
Come up with a method for the Ai to decide exactly who and what gets deployed for it's part in the battle - 10+ Ai battle tactics are already done.
Maybe ... Come up with a system for deploying a tank / land ship / panzer in the tactical battle.
Maybe ... Cause resources of hexes to dwindle over time ... by 20 turns you can really be bringing in some cash.
Smooth out a few remaining issues between how the strategy and tactical gametypes relate to each other.

After which, all the gameplay will be done, and I'll be on to replacing all of the placeholder art with the real stuff.

Vaguely ... still on for something close to resembling a finished ... or at least finalized game by 1st January 2012.

tl;dr - here's a video. The terrain is blue to show me that it's loaded the urban hex battle type.

No comments: