Showing posts with label inventory. Show all posts
Showing posts with label inventory. Show all posts

Thursday, 30 April 2026

Classic RPG Inventory For Classic RPG Attributes

 A little difficult to have a game that heavily features looting - without having an inventory to buy, sell, upgrade and equip that loot! So the last month has been mostly spent making an interactive inventory system.

The system is fairly simple, sell loot at campfires for XP, then upgrade your stats so that you can equip and wear better combinations of the weapons and armour that you have looted!

The game features a rather classic RPG attributes system of STR, DEX, CON, etc as well as two career paths, of High Knight Noble and Low Knight Errant, which increase the player's wearable AP stat. The High Path costs more XP whilst increasing Rage Bar buffs - when critical strikes in battle negate enemy defence and massively increase damage - whilst the Low Path allows for quicker AP increases for far less Rage buffing. No more running about in your underpants once you unlock an armour type.

STR and DEX stats allow ever increasing weapon equipment, whilst CON is HP and STA allows for more sprinting, dodging, jumping, and heavy attacks. There is also ATH(letics) for faster running and further jumping and dodging. All very classic RPG style statistics and behaviours that any gamer (video or tabletop) would recognize - to the extent that I've only used the 3 letter abbreviations for the names (except ATHlectics which could equally be called AGIlity).

Whilst I might keep saying "simple" in this blogpost, actually getting the inventory working was a huge mix of trial and error (especially with gamepad only usage) and took the whole month of development.

And here it is in video action!


 With the player now able to loot and gain XP from it, and spend that XP to enhance and equip their character, the next big development milestone is to allow interaction with the NPC warbands. Whilst the various factions happily play the game all by themselves that is not particularly interesting for the squidgy humanoid sat behind the screen - so next up is making friends and enemies of the roaming NPC raiders! And after that, it's sorting out a page on the Steam Store for early access release! (which looks like it will be after the summer sale with the vetting time).

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

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.

Wednesday, 21 December 2011

Data, Data, Data, 28 Items, Multi-Purpose Ammo, Artillery

Item data overload! All items finally done, at least the data and how they all work in game - still placeholder models ---> Art is last on the list. Also multi-purpose ammunition, for people who are tied of not being able to use similar bullets in multiple weapons.
--------------------------------------------------------

Weapons, items, armour, artillery ... done, finally. Or at least the data and testing for them all it done, if not the final 3D modeled form of them - that's for last on the list of "What Needs To Get Done And In Order To Have Done Everything". So everything is still placeholder in the visual department. No pics this time, but cue vids.

So, here's a quick recap.

There are 6 classes.

Each Class has 4 levels of items.

There's also a "generic" class of 4 items everyone can use without penalty.

Ammunition of a each caliber can be used in any weapon of that caliber.

There are booby traps which can be placed before the battle for the enemy to walk into, and thewse can be detected and captured by the Sapper Class.

Most items are weapons of some form, some are equipment, and some are defensive (like armour).

Light armour is ... er, light. Heavy armour is ... er not light. Stealth armour is camouflaged. Whilst thinking up various defensive equipment for the classes, I also thought it might be fun to have some "non-conventional". I decided on a certain type of armour, which defended the user not by stopping damage, but by reducing accuracy of the firer by dazzling them. For a visual, I decided on some sort of energy shield, and was drawn to the old WW1 battleship "razzle-dazzle" camouflage schemes - only with a bit more colour in it and a moving pattern.


Amongst the variety of standard and conventional weapons I thought up a few exotic ones such as a badly spelt "flammenwaffen" - since renamed Flammenwerfer - a lightning gun that fries things - unless they're in a faraday cage ... say totally metal heavy armour ... in which case they don't do any damage at all - various rifle grenades, portable mortars, flamerockets, sniper rifles and machine-guns ... there was also the Railgun, which punches a hole through everything for 200 metres, reducing damage as it goes.



And artillery, in fact a few different types of artillery, each with different damage, blast radius, accuracy, but also a concussion radius to stun. There are rockets which are all noise and no trousers but scare the hell out of everyone nearby and cause large morale loss and panic. More standard artillery strikes and heavy mortars, guided flame bombs, and also carpet bombing by dirigible.



And for all of this hurty-hurty stuff, I needed a healy-healy system. So aid-kits are dual purpose, healing wounded squad members as you'd expect by increasing health - but also being available to create medivac. I rejigged the damage system so that disabled squad members who are not killed outright will fall wounded and slow bleed to death ... unless you can get someone with an aid-kit to heal them and call in medivac. Eventually they'll be a nice screen for this medivac but right now there isn't. Medivac-ing also boosts everyones morale a little as it's good to see your mates saved to fight another day.



And throw in a shed load of bug fixes and general improvements.

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

My original deadline of completion by 1st January 2012 will be missed by a mile - but I'm still vaguely on course for completed gameplay with placeholder art. After a few rewrites that were costly in time, and the occurance of total burnout around October that caused an end to continuous crunch, it's still not a bad effort and should be completed early in the new year.

Wednesday, 9 November 2011

Kitting Up, Deploying Out, Inventorial reFlummoxing

Interface for "one-off battle-mode", choosing your squad and tooling them up to the nines. Also a total rewrite of the inventory system ... again.

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

With the vast majority of the dirigible moving, hex gobbling, Strategy Campaign Mode gamelogic completed, it was back to the Squad Tactical stuff.

To make testing and debug rather easier I developed the "one-off Battle Mode" to cut out having to go through the Campaign mode to spark a battle. In the final version, the single Battle Mode will be the training mode for the player to familiarize themselves with squad combat, or just if for a quick and casual "get to the actung, baby" mode.

There are various preferences with this, from squad objectives of clearing the area of the enemy, to defending or assaulting team headquarters ... which will probably end up as being a sort of first to grab the enemy colours wins when I get it sorted out.

Difficulty controls how much money, veterans, quality of veterans, class based items are available. It works as a balance, "Easier" gives more of the opponent's default ratings to the player, "Harder" strengthens the opponent and reduces what is available to the player.

There are also options for terrain type and weather conditions, with weather reducing visibility and spotting chances. Weather also acts as a factor to which of the eight offensive strategies the Ai opponent squad will decide to use.



And of course the player can choose which ever of the six factions to play as.

This then leads to the "deployment and equipment screen" which is the same before any battle regardless of game mode. Here you can select which veterans, or untested militia troops to deploy, areas where they'll start, and all the equipment and ammunition that they'll be carrying into battle.

There are six individual classes of squad member - each with four levels of specialized equipment, which in Campaign Mode have to be researched and purchased, and in Single Battle Mode are dependant on the Difficulty Setting. Save for a few highly specialist items, any class can use another's equipment, but they will usually incur some form of penalty. For weapons this is usually a reduction in accuracy, for armour a penalty in the squad member's Action Points. For some very basic items there is no penalty, eg: everyone can throw the Recce's flashbang without penalty as it's used just like a standard grenade.

This equipment and deployment section brought me round to the terrible task of redesigning the whole inventory system ... again.

Terrible because apart from it being fairly convoluted and time consuming ... it's also as boring as hell.

But it does look and work better now, being much more user friendly. Gone are the segregation of weapons, ammo and equipment - now replaced with a scrollable up-down list of everything together. Originally I'd seperated so that you could have weapon and ammo displayed together - but the fact is that you can do that with this method AND show an additional 60% of items with a lot less scrolling involved to get through them all.



The squad member deploys into the game with the first weapon or item in-hand that was in it's deployment equipment list. And the deployment equipment order is now matched in the in-game inventory.

I've also prevented live explosives from being picked up. There's a two-fold reason for this; firstly, putting something that is about to explode in your backpack is a very bad idea and secondly, I wanted to eliminate the "live grenade relay" that was common in the original X-Com, were you lead scout spotted the enemy, and then the guy furthest away pulled the pin on a frag, and tossed it from one side of the map to the other, along a chain of squad members in a highly unrealistic and rather cheaty manner. This is now a no-no.

And that's about it for this blog. Next up is sorting out the enemy Ai team to successfully use one of the eight different offensive tactics I've come up with for them, and generally sort out the whole tactical battle system and make sure it works. Also work out a formula to how the Ai opponent decides to deploy and equip it's forces. After that it's integrate it into the campaign mode with team member promotions for successful survivors with extra experience, and adding militia who did well (got a kill and survived) to the core of veterans.

In the meantime, vidya of the above in action.

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.


Sunday, 17 July 2011

TorqueTactics: Magnets! How Do They Work?! I Mean Inventories ...

Fuuuuu --- Magnets!

TorqueTactics/Torque X-Com Style GamePlay Month 2:

So I sorted out a custom inventory system ... eventually ...

Not wanting a gazillion items spilling out and rolling around the game-world, I decided on a simple system (it wasn't). I'd have 3 item types that could be scrolled through back and forth - weapons (guns! etc), ammunition (bullets! etc), items (Hankerchief! etc), and this would be mimicked in the "dropped item cache" which is a bag full of whatever got dropped.

Caching dropped items at a location obviously prevents having to render all of them together, especially useful when ammunition was divided into 5 round stripper clips and a dead team member could drop an imperial tonne of them the moment they left this mortal coil.

So that's 3 arrays of objects for the playerObject's internal inventory, and another 3 for whatever has been dropped (if anything) at that location. And then there are another 3 options that you can do, pickup, drop and use ... somehow it just seemed like more than the 27 possibilities that it was ...

And boy did it take some bughunting to get everything working within those 27 combinations ... I promptly massacred a pack of post-it notes ...





I've also got a system of attributes for each little in-game chap which affects various gameplay parameters. Strength is the important one when it comes to lugging stuff around and off-setting your aquired encumberance. (though in the above pic, that guy ain't going anywhere!) When encumberance exceeds strength it'll start to eat into your available action points.

"Throw" button isn't currently sorted out as it's going to use the same equation as hurling grenades. Everything visible is placeholder artwise for the time being. Everything else in the inventory works as expected and the big missing preview will be an image of the "Class" of the team member rather than individual portraits cos that'd just be nuts considering how fast you can go through fellas when your tactics all go wrong ...

Pior to this little hiccup, I was hoping for inventory completion in just one week (lol, yeah right), it's taken about 17 days ... including a few go slow days where I went to the pub for a couple of small ales and a sit in the sun to top up my vitamin B or F levels or whatever the hell solar radiation gives out that's good for you ...

Anyhoo, back on track for July - the remaining of which will be spent sorting out the Ai ClientPlayer/commander and turning the enemy squad into some sort of team-based, tactically co-ordinated entity capable of using different strategies dependant on mission objective, battlefield conditions, weapons available, etc, etc.

As the Ai are also going to be using this custom inventory system, it was important to get it functioning.



Fuuuu - magnets! Why are they so hard to debug!?