A software developer, currently working on a finance management system for several large charities. MSci degree in computational physics. Obsession with programming mods for the Source engine in my spare time.

RSS My Blogs

Homing rockets

FTWinston Blog 2 comments

There's no way around it; slow homing rockets are ridiculously fun. In Stealth Deathmatch, there is an upgraded version of every weapon available, and players select the weapons they want to upgrade. We tried out the RPG upgrade for the first time, and it significantly slows down your rockets, but causes them to home in on enemies instead of following your laser dot.

Their "AI" is ridiculously simple: every player in front of a rocket (within 90 degrees of the direction its travelling) that is in line-of-sight is assigned a score, the closer a player is, and the closer to the rockets' direction of travel they are in, the higher their score.

The rocket flies towards the player with the highest score, and if it can't see anyone, it flies straight. These rockets are only very slighly faster than than a sprinting player, to make for interesting chases. And as they're heat seeking, it makes no difference whether you're cloaked or not!

If you see a rocket coming towards you, its natural to assume that if you hide around a corner, you'll be safe. Since the first proper test of them yesterday, its clear that this is not always the case here - one of these homing rockets will fly to where it last saw you (at the corner), and then if you are visible from there, will happily turn the corner and come straight at you once again.

Similarly, some tall wooden pillars on dm_runoff appeared to offer some protection as they were quite densely packed, but the rocket, if it sees you through ANY of the gaps, will fly straight through that gap and blow up on you. And if it doesn't see you through ANY of the gaps, it will just fly around the pillars, towards where it saw you last, and then if you're visible from there, will come and explode at you again.

So what can you do? These aren't meant to be guaranteed kill rockets, so there are essentially three options:

1. Run away, around TWO corners: Get out of sight, and then get out of sight of the place that you were last seen at.

2. Shoot it down: Currently working on letting these rockets be shot down, but will want to give them reasonably high health so that they're not all easily killed off, on account of how slow they are.

3. Pass it on: These homing rockets continually re-assess who their best target is, so if you can get them pointed at another player and then step aside, they'll lock onto that player instead! This is possible even with the player that fired them, with the added bonus that that player can't use any weapons until their rocket detonates. In one game, I managed to get a rocket to chase me around a pillar and then lock onto the guy that had fired it at me - then he promptly did the same thing, and killed me with it!

In fact I am now so infatuated with homing rockets, I'm trying to work out if an entire mod could be built around them... the answer is probably "no," but that won't stop me dreaming!

Antlion guards

FTWinston Blog

One of the best things about working with a mod designed to use hl2 content is that there are lots of things already in the code that can be included in the mod, often with little extra work.

For instance, our vortigaunts - in hl2 & the episodes, players had never fought them before. We changed one line, and voila, a nasty new type of enemy. Ok, we changed more than one line, cos we also wanted to link them into having different stats at different levels, and properly attribute their kills, and stuffl like that. But compared to making vortigaunts from scratch, it was easy.

Next up: Antlion Guards. We've wanted to add these for ages. The biggest problem, and the coolest thign about them is that they're huge. I added them to the pvm monster list yesterday, turned off everything else, and got loads of them. Woah! Even in Ep2, you only ever fought 2 at a time, and here I am running around dm_runoff getting butted around by six of the damn things! That was quite fun. But their size is a problem: they're not that good at navigating, cos they're bigger than most of the gaps and doorways. A lot of corners even give them trouble. So while they occasionally would give me a great chase on dm_drift, most of them would just stand still until I'd killed them. Which sucked.

So, we added a new type of spawn point, the large npc spawn point, to dm_runoff and a few other maps. Antlion guards would only spawn at these, and if none were present, they wouldn't spawn. For the moment, we've made them quite rare, because when you're not expecting it, one of these running round the corner at you is hilarious. Server owners can configure that for themselves, of course, and in the future, with scripted pvm, we'll be able to give players 10 of them to fight at the same time, for example, and then go back to normal monsters.

But for now, there's a few things holding us back from releasing the next version, with all the antlion guardy fun it has to offer. The main one is that somehow I've managed to stop PVM mode from turning on properly. So that's top of my to-do list for tonight. There's a handful of small and annoying bugs we need to fix apart from this, then we'll release what should be a good fun update.

Intro, server crash & minion control

FTWinston Blog

In case this has confused anyone, moddb have helpfully changed my account name; it was formerly AWatkins.

As lead programmer on Modular Combat (currently the only programmer), I'm often asked how exactly a particular feature works. Unfortunately, my answers tend to bore people to tears, and actually explain very little. So while I hope to use this blog to explain what up-and-coming features, I'll try and only do so when they're actually interesting.

Can I first congratulate the players who worked out that the server crashes we've been experiencing were related to plague - I finally got the chance to poke through the crash dumps last night, and you guys were absolutely right. It seems to happen when a player infects an NPC with plague, then disconnects - the game was trying to attribute the plague's damage to a non-existant player. Turns out I was referencing the player in a stupid way, so I've changed it so that it should correctly realise that the player doesn't exist anymore now. This fix will be part of our up-and-coming v1.75 release, which will be going out as soon as possible.

Secondly, I'd like to explain minion control. It probably sounds quite complicated, but once you try it all out, it should be quite intuitive. Version 1.75 will include lots of in-game hints and tips for this kind of thing, but to keep you guys informed until then:

All minions have a 'target' - by default this is you. They will follow you around, and attack enemies that they see. If you press E, you will set their 'target' to wherever you are looking, and they will stand near that point, and attack enemies that they see. If you press E while looking directly at an enemy, their target will be set to that enemy, and even if it moves away, your minions will follow it around, attacking it and any other enemies that they see. If you double-press E, this will "recall" your minions to you; their 'target' will be set to you once again. You should also see 'Recalling minions' on your screen.

Minions have one of 3 stances: Defensive, Balanced, and Roaming. The stance affects how close enemies have to get to the minion's 'target' before they notice it. Set to defensive, they will ignore all enemies except ones that get very close to their target. This is useful when you want your minions to follow you out of a battle, or to focus on a particular enemy. Set to balanced, they will attack enemies within a medium-sized radius around their target, but will disengage if they get outside this range. Balanced is the default stance. Set to roaming, minions have no range limit, and will pursue any enemies they see indefinately.

Thats it! You can bind a key to cycle minion stance, or bind seperate keys for each stance. All your minions will have the same stance and the same target. Also, remember that while stopping your minions from attacking distant targets helps you to see and control what they're doing, forcing far away minions to ignore enemies and return to you can be giving away free minion kills.