• Register
Post feature Report RSS Rogue Machine - NPCs

From a dome headed grunt to a sword fighter who shoots lasers from their eyeball head, this article takes you through the basics of the opponents in Rogue Machine.

Posted by on

Rogue Machine – NPC's

Rogue Machine is designed to be an action type game, relatively fast paced and straight forward and the NPC's have been designed with this in mind, to be aggressive and to keep the player moving and having to do respond. I'm using the term “NPC” but I could easily use the term “opponent” or “enemy” as there are no friendly NPCs.

npcs

The NPC's actions are governed by them being either passive or active. In the passive state the NPC is unaware of the player character and the active state is where the NPC is aware of the player character. This binary split is used to keep the decision making simple.

At the start of the level, all the NPCs are given a passive action, either standing still or moving. This action is dependant on where they are initially placed in the level and what makes sense for them to be doing in that location. NPCs placed in a corridor will always be moving, as if they're patrolling, as it wouldn't make sense for them to be just standing still. If the NPC is placed in front of a door or at the end of the corridor then there is a chance that they will stand in front of the door, as if they're guarding it. NPCs in a room will either be standing or moving, biased toward standing as it's logical for someone to be standing in a room. Apart from that the NPCs aren't really doing anything. They're just waiting for the player character to stumbled into them and it's possible for the player to achieve the level objective without having to engage the NPCs in combat.

npcs

However, Rogue Machine is not a stealth game, sooner or later the player character will be spotted and the NPC will attack. An NPC will become aware of the player character and respond to them when they either get too close or engage in combat, in both cases the player character will have to be in the NPC's line of sight. Once an NPC is aware of the player character this then puts the NPC into a permanent “active” state. This aware state is done for the individual NPC rather than being a global awareness, so NPCs in another part of the map will not change from passive to active just because one NPC has spotted the player character. I thought this would be a fairer thing to do, even if it might not be that logical.

npcs

The two main active actions are to either shoot at the player or to engage in melee combat. At the moment, if an NPC has a melee weapon they will always seek to engage the player character in melee combat, even if the NPC has a gun.

If the player character goes out of line of sight then the NPC will either try to get into a position to attack them or hold their position. For shooting this is a case of getting the player character into line of sight. For melee combat it's a case of getting into a position to directly charge at the player character.

npc

There are some variations to these basic actions, depending on the weapons the NPC is carrying. NPCs with a sword and shield, for example, will charge with a raised shield to defend themselves. If the have a sword and gun they will charge and shoot.

To relieve the pressure on the player, there are pauses to both shooting and melee attacks. NPCs with guns will fire a number of shots and then pause and an NPC with a sword will take a couple of swings then go into a parry mode. If an NPC has a shield they might go into a defensive mode. If an NPC only has a gun then they just stand their taking hits like an idiot. Same is true with an NPC with only a sword, when they stop for a bit there is nothing to stop the player just shooting at them.

Defensive actions are limited to either raising shields or parrying with a melee weapon. NPCs will not dodge or actively seek cover. The player character can't dodge as, just move out of the way, so it seemed unfair / inconsistent to allow the NPCs to dodge.

npc

One of the things I'm trying to keep in mind is the difficulty. This is always tricky and I think my previous games have been far too difficult. So the fact that I might give an NPC a gun but no shield is all about setting the difficulty for that NPC. I don't want to make all the NPCs hard to beat or for the player to have to spend ages fighting every NPC that come their way, that's for later on in the game.

Another thing that I'm having to deal with is the fact that the player character is upgradable so the NPCs need to still be a challenge as the game progresses. To this end, I've had to work out the majority of the upgrades for the player character before I could design more NPCs, to give me an idea of what kind of power level to set the new NPCs so that aspect of the game is a lot more advanced that I thought it would be at this stage. Which is good.

npc

It was not my intention to name the NPCs after the shape of their heads. It was just something I did for convenience but I liked it and it's stuck. The only exception to this are the Guards, which are copied from / inspired by my other game Purple Complex.

What I've also been doing is coming up with some different kinds of weapons for the NPCs, such as hammers and lances, which have a greater reach than the swords, and the EMP style weapon which cause the player character to be knocked back.

I've no idea how many NPCs the game's going to need, there obviously need to be enough to keep the game interesting as the player progresses, but I'm also having fun coming up with new designs.


PLAYABLE WORK IN PROGRESS DEMO
I'd just like to end this by mentioning that there is a work in progress build available for you to download and play, for both windows and android, featuring dome and saucer heads and guards, and that I'd appreciate any feedback you may have on game or this or any of the other articles.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Feature
Tags
dev diary, npcs, WIP
Browse
Features
Report
Report
Share
Related Games
Rogue Machine
Rogue Machine Roguelike
Related Engines
AppGameKit
AppGameKit Commercial
Related Groups
Indie Gamers
Indie Gamers Hobbies & Interests with 1,508 members