Showing posts from July, 2014

Untitled Update!

I had a fairly busy weekend, so no real major progress to report. Some little things though;
You can now change the resolution and size of the window! It does require restarting the level, but hey, it's a thing. This facilitates a menu-based resolution option, which is something I felt was necessary! In windowed mode, the GUI doesn't stretch, it just spreads out more. In fullscreen, currently, it stretches. This is something that can be changed.
I felt that the game was too small, not just at my native 1920x1080 resolution but even on a lower 1024x768 resolution (which, if I recall, is the lowest in use nowadays). Everything has been upscaled by 2x, and I'm in the process of rooting out all the little bugs this has caused (mostly due to distances now needing to be double). I feel it's an improvement, and I didn't want to simple 2x the window as this stretched the UI. 
Tracers are back! A friend pointed out that seeing the enemies fire helps you avoid danger and le…

Some Ideas

House of Cards

One idea I've been toying with is a house of cards, of sorts. Low-level targets are the numbered cards, with higher members filling in the King or Queen. You need to take out the lower foundation cards before you can tackle the higher cards. The Ace is the finally piece, the head of the whole downfall..

Starting Equipment

I'm debating my initial decision to allow the player to take in two weapons of their choice, as in the later game you'll be able to take in an assault rifle and a shotgun -- making you pretty unstoppable. I'm undecided yet, as I don't want to restrict player choice.

Super brief update. More to follow.

- Rob

Inventory / Weapon Icons

Today I decided to do some more inventory art, before moving back to the coding side of things. I've been hesitant to use

Using a fantastic resource, "Pimp My Gun", I've mocked up a few weapons that'll feature in the game. I say a few, I mean all. I've not shown them all here due to space and stuff. There's 10 in total. I'll be using these to create the line art that's used in the interface.

Teaching a potato to think - A.I Update #5

Potato Based A.I

There's a good reason why it's been 6 days since my last post. Aside from working tirelessly to get my head around the enemy code, I also almost gave up. Yeah. As an amateur, completely self-taught programmer, my range is pretty short. I'm an artist at heart, so I don't like diving any deeper than fairly basic programming, once it gets too mathematical I lose interest. As you can imagine, A.I really stretched me thin.

So here's update #5 on the A.I -- it's pretty dumb. I've accepted that, for now, the enemies aren't going to be smart. It's just outside my current skill ceiling. It's something I can come back to and develop, but for now I'm moving on to keep the ball moving.

At the moment, the enemy will fire at a visible player, and chase them if they lose sight. If they lose the player completely, they find the nearest room and stand watch. They change their facing fairly regularly, as if they're keeping an eye out for …

Teaching a potato to think - A.I Update #4


My main focus for today was to work in patrolling -- more specifically, getting in and out of a patrol loop effectively. I've got it working, it's slightly buggy but the A.I will stop patrolling if he hears or sees the player, and will move back to the patrol route once he's lost them.

Reacting to Sound

The A.I will react to nearby gunfire, turning to face the direction it came from. If you missed your shot, he'll notice. It's still a bit early days, for example he won't move to investigate a sound, which is something I'll add in a little while later. Now that I think about it too, he should react to thrown grenades and weapons.

Dammit, more stuff to add in to an already fragile system :(

So, what's next? Well, my priority now is reintroducing all of the previous A.I functions, one at a time to ensure they're working correctly.
I have a working copy of the previous A.I code, so I can copy it chunk by chunk and alter it to fit the new mec…

Teaching a potato to think - A.I Update #3

I wanted to include a video with this update, but Fraps doesn't handle Game Maker very well :C Ah shucks.

Anyway, today I tore apart (not really, more just pulled apart) the enemy A.I and started to rework it. Basically, it overlapped too much, and that was causing problems. Now I'm going through system by system, making all the necessary changes.

Firstly, and arguable quite importantly, was making the A.I turn to face the player, rather than snapping. It's a simple thing on paper, but it's more difficult than it sounds. Remember that 0" and 360" are the same, and that to a computer the fastest route from 5" to 355" is to add rather than subtract. That one was a bugger to solve.

Next, I made sure the enemy only turned when he could see the player, and only within a certain cone. If you stand in his periphery, he will see you, but if you're out of sight he'll be oblivious. When oblivious, he'll either fidget (change direction occasionally…

State of the A.I

I've been trying to repair the A.I today, and to a certain degree, I have. Getting the A.I to react to sound has worked to a degree, but it's currently disabled as I can't get it to really integrate at the moment.

How it works;

The enemy uses several scripts, each handling a different area. The first just returns a load of variables based on certain things; can he see the player, is he in cover ect ect. The second uses these values to determine what state the A.I should use, based on conditions and current state. The third, which is a set of scripts, acts upon the current state.

State 0 is the idle state. Currently, the enemy just stands. I want him to fidget, and patrol if given a path. I tried this before, and unfortunately the patrolling was suuuper buggy. It's one to fix, though.

State 1 tells him to search for cover. If there's no cover in range, this is ignored. Otherwise, he moves to the nearest good cover facing the player. Good cover is determined by it'…

In-Level Lighting

You know when I said I'd take the weekend off? 
I lied.
I originally made a very crude, very very inefficient line-of-sight system, that would obscure anything outside of the player's field of view (actually, anything obscured by a wall). This literally killed the framerate in larger levels, though, so I quickly ditched it.
Searching for tutorials regarding lighting using surfaces, I stumbled upon a very cool set of scripts, that were free to use. After a quick field test, I decided to include them in Downfall, Inc. They're a ton better than anything I could do, and it means I can focus on the A.I more now.
First, credit to the author - Shiny Jumpluff ( 
Initially, I used only one light, which followed the player. This was a visual indication to the player as to what they can see. They're looking overhead, whereas the character isn't. So I wanted to highlight clearly what was hidden from your view. 
My first problem was that the lights…

A.I -- an update

I sat down today with the intention of expanding the enemy A.I, however, in my infinite wisdom I seem to have broken a few features whilst adding in melee reactions. Essentially, to add in the new functions, I need to rework some of the A.I code. This isn't a one evening job. Given that I have plans both tomorrow and Saturday, I'm electing to resume work on the A.I on either Sunday or Monday. I'll just forget where I got otherwise.

I aim to add in patrolling enemies, and to make the A.I react to sounds. All in due time!

- Rob

Basic UI Elements

I am simultaneously an artist, a programmer and a designer when it comes to Downfall, Inc, so I often switch roles on the fly. Today, instead of tweaking the A.I, I wanted to do some design/art. So I worked on some basic GUI Elements. Downfall, Inc - while tactical and methodical, is still an action game. The UI had to accommodate this.

Using the above cropped screenshot as an example, you can see how this works. Instantly, from the colour of the bar, you can tell you've taken damage. A simple description lets you know how severe the damage is. Take minor damage, and the bar will be yellow and read "Injured". Take major damage, and it'll go deep red and read "Critical". Hopefully, it's super easy to read from a glance.

A line drawing of the current weapon lets you know what you're wielding, and the lines beneath display current rounds. You'll be able to see the heavily depleted bar from a glance, letting you know you'll need to reload soon.

Kick, Stunlock and speed based collision damage

Melee attacks knock the enemy back, and stun them briefly. Enemies no longer attempt to find cover if you're right near them, as this led to an annoying cat-and-mouse chase that really didn't feel groovy. In a nutshell, enemies have more courage, and will stand and fight if you charge them. Yeah, it's not realistic, but it's also not fun the other way. Trust me, I've been testing it all day.
You can kick enemies now, an alternate melee attack that causes less damage but provides more force. Force determines how far an enemy flies, so a kick will send them flying while a melee attack will do more damage. 
If an enemy hits the wall at a certain speed, they will be killed (I like to think they're knocked out cold, personally). They have a different "death" sprite too, so they're not bleeding and are slumped against the surface.
Pretty cunning, huh? 
Well, not really. Honestly, I'm an amateur coder, don't expect any flash wizardry here. I jus…

Quickie: Persistent Bodies

Previously, enemies would just disappear on death. This wasn't a design choice, obviously, I just didn't have any art to indicate that the character was pretty messed up. It'd been bugging me all the time I was testing, so I decided to scratch that itch and make some placeholder art.

It's purely placeholder art at the moment, a quick 20 minute mashup. However, it enabled me to sort out the code for persistent bodies and whatnot.

Anyway, back to melee..

- Rob

Potential Firearms

So, I was supposed to call it a night and relax, but I had a whole host of ideas for potential firearms so I decided to boot up Photoshop.
Here are some one-handed weapons, a mixture of semi-auto pistols, magnums and machine-pistols. These can all be dual wielded.

The first is the pistol that low-level enemies will use. The second is the default, unlocked handgun. After that is a high-power magnum and it's heavier calibre brother. Finally, that's a machine pistol.

Handguns don't affect movement speed, and can be fired as fast as you can pull the trigger. A few different types of sub-machine guns, that will vary in clip capacity and fire rate mostly. In Downfall, Inc., sub-machine guns are a good middle ground between pistols and rifles, offering decent movement speed and fire-power. Four potential rifles, the first three being automatic and the last being a semi-automatic. They'll vary in damage and spread. The first will most likely be used by the mercenaries brought in …

Basic Melee Combat

After finishing the smoke grenade, I decided to focus squarely on the last big feature missing from the basic gameplay blueprint -- melee combat. Currently I'm only working on the combat knife, as it's the weapon I'd encourage melee focused players to equip. At the moment, there's a sprite for holding it when equipped, and a basic two-slash that will deal damage to an enemy within melee range. And as I mentioned in the last post, it can be thrown at an enemy for an instant kill, and retrieved afterwards.

You will also be able to melee with ranged weapons, however, this will be much slower and deal less damage than the knife.

I decided to make the knife its own weapon, as I wanted to empathise melee combat as a separate discipline for your agent. I want the player to choose to be a melee fighter, rather than it being a last resort when they're out of ammo. This stems back to Downfall, Inc's roots, as originally there were classes to choose from. While I decided…

Smoke Grenades - Quick Update

So, just a quick update here -- smoke grenades are done, completing the three available grenade types. Enemies cannot "lock on" to the player if he's in the radius around the smoke grenade, essentially they lose him. It could be considered a little over-powered, sure, but they're not a recoverable/reusable item and they're only around for a short time.

Throwing Weapons, and Weapon Pickups

I can't really think of a good image to use here, so I'm just going to show some of the world pickup icons. I started working on throwable weapons yesterday, in between working on placeholder art to jazz up the current build. I finished up work on throwing weapons this afternoon, hooray!

In a nutshell, you can throw your current weapon whenever you feel like it. Dependant on what kind of weapon it is, it'll either go far or.. not so far. For example, you can throw a handgun pretty far and pretty hard, but a rifle wont fly so pretty. A combat knife will fly beautifully, though, and is pretty lethal.

If a thrown weapon is going over a certain speed, it'll take out the guy it hits. I know, I know, throwing a pistol at a guy might not kill him, but I'm in charge here. Aside from the fact you've just lobbed your weapon, there's also the risk that you're a hair too far away to do lethal damage. Throw your shotgun at too great a distance and it'll just sli…

Start of the Initial Art Pass

I decided to spend this weekend creating some placeholder art to spruce up the prototype. I've found that, while it's faster to use basic blocks to map everything out, you can't get the feel of the game without placeholder art.
I had some other things to do today, so I only really focused on the player character sprite. It consists of three layers; upper body, arms, and legs. The upper body rotates as the player moves the mouse, indicating the direction the player is aiming. It's a single frame at the moment, so it's pretty easy to change the appearance of the player. The arms follow the body, but are animated with the different actions and weapons the player can use. The legs operate separately, facing the direction the player is moving rather than the direction they are facing.
Here's the rough reload animation for the pistol;

I've got to do the reload for dual wielded weapons, sub-machine guns, rifles and shotguns. At some point, I need an animation for…

Scan Dart & Smoke Grenades (Basic)

A scan dart will burrow through the first wall it touches, leaving the other side and burying itself into the next wall where it comes to a stop. It provides line-of-sight for the player, illuminating previously dark areas of the map and revealing all enemies within visual range.

It's the final piece of special equipment available. It's the stealthier option, offering a more tactical approach when compared to the loud breaching charge or the costly magnetic shield.

Basic functionality of the last grenade type, the smoke grenade, is done. Fragmentation grenades wound, Stun grenades disable, and Smoke grenades conceal. Enemies wont be able to lock onto the player through the smoke, but the player will be able to identify their foe through it. It's like portable cover, that enables the player to take out several unsuspecting foes before slinking out.

I aim to finish the smoke grenade tomorrow, and hopefully get basic melee working. Night! :)

- Rob

Breaching Charges (Revised), and Magnetic Shield

Most of my work tonight went into fixing the breaching charge feature, which was functional but broken. Essentially, charges would be placed around corners or between wall segments if you were in a certain position against the wall.
My solution, unfortunately, is a less efficient and more object-heavy solution. 
Each destroyable wall segment generates nodes around it, used in calculations. There's a dummy object that orbits the player, based on their facing direction. Pressing the key to place the charge will, if close enough, create a charge and move it to the node nearest to the dummy. 
If I've lost you, basically now the charge is placed based on where you're facing, rather than which direction you moved towards the wall in. Apart from the under-the-bonnet stuff, it all looks the same, so no screenshot there. 
Another feature I worked on this evening is the magnetic shield - a piece of equipment used to deflect incoming rounds when activated. It can only be used for a …

Breaching Charges (Basic)

I should've been in bed a half hour ago, but I stayed up a bit longer to get this feature functional.
This evening, I've been working on the breaching charge. In a nutshell, it's a special item that will blast through thin walls and doors, creating a unique entry point whilst killing and stunning enemies in certain ranges.
It's been a bit of a complicated one, since there were a lot of direction and angle calculations to consider. Firstly, the charge had to sit in the middle of the surface it was placed on, so it cleanly blew up the portion of wall it was aligned with. This was tricky for me, as there was no short way of determining which face of the wall was closest to the player. It's still a bit buggy, if you're half way between wall segments it'll choose either the above or below segment, it doesn't look natural. That's something I'm going to smooth out tomorrow hopefully.
For now, pictures!
An important note. Everything, everything is place…

Welcome to Downfall, Inc.

What is Downfall, Inc?

Downfall, Inc is a tactical, top-down arcade action game heavily inspired by Syndicate, Hitman and Rainbow Six. Players assume the role of a mysterious operative, hired to cause property and personnel damage at a number of high-value locations around the city.

Downfall, Inc focuses on intense close quarter fights. Once you make your move, the enemy will dive for cover, and call for reinforcements. Use stun grenades to prepare rooms for rapid entry, or blow through the wall using a shaped charge to surprise the enemy and get the drop on them. Kick weakened enemies through doors, then throw your knife at the next target.

Essentially, imagine Hotline Miami meets Rainbow Six meets Hitman. You'll be given a target to assassinate or property to ruin, and it's up to you to meet your objective before reinforcements overwhelm you. Before you draw your weapon you'll be able to walk around the environment undetected, within reason of course. So the focus is on pl…