• Register

Rougelike 2D Chopper PowerUp Fueled Flying Arcade Action. Skillfully Command Your Squad Forces to Defeat the Enemy.

Post news Report RSS Week 27 - Troop Movement Controls and AI

The Post-Birthday "Get Back To Work!!" Update - Troop Movement Controls and AI.

Posted by on

This update I worked out my final issues with troop movement. I wanted the ability to post troops at a particular spot along the path and have them free-form follow the helicopter while activating into fight mode if they come into range of the enemy. It turned out to be a tricker problem to solve then I imagined since it took me a couple of schemes to settle on something that would work equally well on controller and keyboard. (I want both to be viable without sacrificing ease of use for either).

The solution turned out to be a version of 'catch and release'. Unassigned troops gravitate to dropped flags and chopper assigned troops follow the chopper until they encounter the enemy. Once they engage the enemy they ignore the chopper and continue fighting until recalled to the chopper. With the press of one key/gamepad button the chopper troops in combat flash for 5 seconds and head for the helicopter even if they are in combat range (this allows troops to walk past enemies without stopping to fight).

CSquad_W27002


These past weeks have been mostly catch up from an unexpected birthday slowdown. I knew I had slowed up a little but I didnt expect to do a "Mitt Romney"!! I use "Rescue Time" and it reported that I spent 47% LESS time programming in the 2 weeks following my Bday. The following chart shows my 'productive' hours in blue, 'unproductive' in red. The blue hours mainly chart my time spent in the GMS:Compiler screen the red is mostly web access even though RT cant distinguish web research from casual web surfing without messy manual intervention. I simply set mine to the max time (10+ hours) before detecting 'Away from Keyboard' and let it capture time spent in the current foreground application (the web is overrepresented since I often leave it up but my compiler foreground times are mostly accurate).

CSquad W27005


You can see the major dip after the 17th. Since then I've been on Turbo to recover the hours (So far this month I'm on pace to recover a big chunk of the time). I normally clock about 120 hours monthly of 'productive' compiler time. After looking at my RT report at the beginning of August I turned on the afterburners just to start catching back up. RT is a great self monitoring FREE tool that I would recommend to anyone working solo (especially solo!) to stay on track. - Rescuetime.com

This update I really wanted to tackle the 'outside' building issue of moving the troops around. Its something the player does so much that I wanted it to be relatively uncomplicated. Ordering unassigned troops is made simple by using flags and the simple rule that they gravitate to the rightmost flag. Its a simple systems and only requires the controls of adding/deleting flags without having to assign anyone to them. I wanted chopper use to be similarly easy and it took a minute for me to figure out a solution.

Eventually I centralized it to 'loading' the chopper ladder extended sequence. Now lowering the ladder can be used to 'load' the chopper and/or assign troops to 'follow' the chopper. If the ladder is in reach the troop will climb the ladder otherwise they'll just follow the chopper. Lowering the ladder above troops ability to reach it combined the actions (I feel conflicted about not having it be a separate process but relieved that its only one thing the player has to remember).

CSquad_W27001


After the 'Load/Assign' mechanic was added I programmed the weapon systems for the troops. Its a flexible system that can be easily expanded to the variety of things they will be able to use. Currently it activates and randomly chooses knife, shoot on knee or standing shot. Upcoming enhancements will change weapons after 'X' seconds or 'out of ammo' conditions. The AI also distributes the attackers so that you dont have all troops firing at their range activation point. (all the shooters start shooting within 700 pixel range but automatically retreat if troop already there)

CSquad_W27004


The upcoming week will focus on finishing the outside mode so I can get troops assigned to buildings for attack and entry. Moving troops around is now pretty simple for the player so the focus will mostly be on independent troop AI, Auto weapon changing and ammo monitoring/restock will be part of that update. I plan on adding 'Gun Ammo' to the chopper 'Powers' bar that has been unused to this point and show the player how 'Powers' will be integrated into the game.

This has been mostly a silent update since most of it happens under the hood and/or without player control but it did add the ability of the chopper to have passive troop offense without adding player complexity. This gives the chopper its own 'army' in addition to the guns and missiles it will have (still stalling on that since dont want to spend time 'playtesting' them yet).

As this ability to incite conflict across the play field expands (flag, chopper follow and building assign), the importance of troop placement and resource management will be crucial to player success. A simple system that will allow for a variety of outcomes. Next update coming much quicker.... (still making up time)

* Added Troop Follow Chopper Mode
* Added Soldier Appearance Flash
* Added Enemy Hit Flash
* Added Chopper Combat Recall
* Added Troop Fight Engage AI
* Added Floating Hit Text Adjustments
* Added Rifle Muzzle Flash
* Added Chopper Load/Assign Code
* Expanded Squad Flocking/Spacing AI

Engine: GameMaker:Studio 1.4.1474 - 1.4.1567

* Youtube - Youtu.be
* IndieDB - Indiedb.com
* Follow Us on Twitter - Twitter.com
* Like Us for Updates - Facebook.com

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: