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