What I Did and Why: Homing Shots

Hello internet!

The secrets of how it was made.

Recently got around to [finally] writing the starter gun for Elements of Magic.  The friendly, nice gun that the player starts out with, to introduce them to the game.  It had some design challenges, and since the whole process was kind of interesting, I figure I’ll document it, and see if I can’t provide some insight into exactly what sorts of things I think about when putting together a shmup weapon.

So, here we go!

First off, let’s talk a little about what needs to go into any shmup weapon.  In general, a shmup weapon should:

  • Be distinct from other weapons in some interesting, gameplay-related way.  Preferably through some unique property or advantage.
  • Involve some tradeoff.  Work well in some situations, while less well in others.  Should have at least one easily identifiable situation where it shines.
  • Conversely, have at least one general  situation where it is actually a sub-optimal choice.
  • Never be completely useless, even in sub-optional situations.  (I like to go with the metric “it should never be at worse than 50% efficiency.)  The player should never feel “stuck” because they hit a situation that the gun is just bad for.
  • Have some form of risk/reward built into the weapon, where there is a constant, interesting choice for the player to make, where they can consciously assume  some form of risk, in exchange for some form of payoff.
So let’s talk about what I tried!

Attempt one:  Basic vanilla homing.

First try: Basic nonstop homing.

So I knew off the bat that this was going to be a homing gun.  This is intended as the “starter gun” that you have when you start the game.  It needs to therefore be both newbie friendly and effective, while still not being so overpowering that you never switch to other guns when you earn them.  Homing is a good match for this, since it is a concept most people are very familiar with, and can understand quickly.  (And as a bonus, it is effective even if they don’t do anything to make use of it – it just happens.)

So my first stab was fairly straightforward:  Bullets fly out, and constantly turn towards whatever enemy is nearest.
Ok, this is a decent gun.  Things home in and blow up enemies.  It’s sorta fun.  It’s super-easy to understand and use.  There are, however, a few problems:
  • Shots tend to blur together into a solid stream.  (This is purely aesthetic, but I think I’d like it to be more distinct.  I want it to be more of homing shots, not one long homing laser.)
  • Homing greatly reduces the importance of player positioning.  Shots go after the nearest enemy, so it occasionally matters where you are, but for the most part, it doesn’t matter where you are on screen.
  • There is no risk/reward anywhere.  Nothing you do can make the gun perform better or worse.

Attempt two:  Slowing things down, splitting things up.

Attempt #2: Now there are non-homing shots as well as homing shots!

So thoughts at this point about how to fix these things:  The first one is easier.  Make fewer, higher damage bullets, and maybe give them more distinct trajectories.  The second one is harder.

For making player positioning, my first thought is to make the bullets do more damage at the beginning, and then have their damage fall off the longer they take to find a target.  This would reward people for being up-close to their enemies.  But there are a few things that concern me about this solution.  For one thing, I’m worried about conveying this to the user.  I can make the bullets start big and shrink, but I’m not sure that will be enough to make it obvious, and this is supposed to be a super-simple gun.
More worryingly though – if this is supposed to be a very newbie-friendly gun, it feels wrong to make it only work well if they are edging up close to the enemies and putting themselves into extreme danger.  While that could be a fun mechanic, and I may use it later for a different gun, I think I’ll pass on it for now.  It just feels too much at cross-purposes with the homing gun concept.   Part of the advantage of the homing gun in general is that it is a good long-range weapon.  So forcing people to get in close to make use of it just feels too much like muddled design.
So I think on it some more, and come up with plan B:  I think I can make it work if I split the gun into two components.  Instead of a constant stream of homing bullets, I’m going to try splitting the gun into two parts.  A basic vulcan-style shot that fires straight ahead at high speeds, and homing bullets spewing out from the sides.   This gives me a few benefits:
  • First and foremost, position matters again!  Since half the damage comes from the direct shots, you can can do better by actually positioning under the thing you are aiming at.
  • There is a risk/reward tradeoff now.  You can do better by staying directly under your target, but it is not required.
  • Unlike the first idea, it still works fine at long range.   Position matters, but not to the extent that it forces you to get up close and personal with dangerous enemies.
  • You have more control over your shots.  One problem before was that sometimes the shots would lock onto things you didn’t want, and you would have to wait for them to get to the thing you actually wanted to destroy.  With this change you can guarantee that at least half of your damage will go towards the target of your choosing.
Things are looking pretty good now!  It just needs a little polish.  It doesn’t have as many interesting choices as I’d like yet, but it is already quite a serviceable gun.

Attempt three:  The importance of concentration

Concentration! Fewer homing, but a lot of damage straight ahead.

I’ve been glossing over at least one issue so far.  While I’ve been talking about it as if I were designing a gun, what I actually need are effectively two guns.  One normal, and one when the user is “concentrating their fire”.  (i. e. holding down the shift key and moving slowly.)  Normally guns change their properties slightly when the player is concentrating their shots.

By convention, the concentration version of a gun tends to be much narrower in focus, while the normal version is wider-spreading, more suited to moderate damage over a wide area.  I think what I’ve got now is perfect for the normal version, so let’s think about what I can do for the concentration version.
I briefly consider having it change the gun entirely (maybe to some sort of laser beam or other highly obvious focus shot) but I think that might be overkill.  So instead, I just tweak the ratios.
The normal gun shoots regular shots forward in spreads of four, and one homing shot every two frames.  So for the focus mode, make it shoot spreads of five regular shots forward, and drop the homing shots to only being once every five frames.  So net result:  Fewer homing shots, and more forward shots.  With the side benefit that it is really obvious to the user what has just happened.  They are shooting forward in groups of five instead of four.  That’s one bigger.   From this, they can correctly deduce that sitting in front of their ship just got 20% more dangerous for the enemies.  And while the homing damage change is harder to eyeball, it’s easy to see that there are fewer homing shots now.
I play with this for a bit, and I like it a lot.  It gives you a way to focus intently on a single enemy, and somewhat mitigate the problem of “too many enemies on screen my homing shots are going all over the place.”
All that’s left now is to go tweak the damages.  As an internal convention, I tend to try to balance the guns so that an “average” gun deals 100 damage every second.  (Mostly because this lets me be really lazy when assigning enemy HP – I just figure out how many seconds I want the player to have to spend shooting it, and then multiply that by 100.  Makes it really easy to guesstimate enemy hp at a glance.)
I tweak around the homing shot damage vs. the regular damage until it feels right.  Mostly I want the homing shots to do enough damage to feel like they have some weight to them.  (i. e. they should be capable of taking out moderate/small enemies by themselves in one or two hits.)
Finally I end up with some damage numbers I like.
  • Sitting under a single enemy, with concentrated shots:  100 dps
  • Sitting under a single enemy, with unconcentrated shots:  105 dps
  • Hitting a single enemy with just the homing shots while concentrated:  30 dps
  • Hitting a single enemy with just the homing shots while unconcentrated:  50 dps
These are pretty much right where I want them to be.  Sitting under an enemy, concentrating on it is 100, just like I want.  Floating off on your own dodging and just hitting with the homing shots is gives a significant reduction in damage, while still being useful.  (Concentrating while not under the actual enemy gives you pretty bad numbers, but that’s actually something I want to discourage in general, since it means you are specifically aiming at something that isn’t the enemy.)
And done.  Ta da!  We have a new gun!
Let’s see how I did against my requirements:
  • Be distinct from other weapons in some interesting, gameplay-related way.  Preferably through some unique property or advantage.  Check!  Unique property is homing, and the ability to deal respectable long-range damage, even if not directly lined up with the enemy.
  • Involve some tradeoff.  Work well in some situations, while less well in others.  Should have at least one easily identifiable situation where it shines.  Check!  Homing again.  Shines in situations where the enemy is moving around rapidly or otherwise hard to track.  Also shines when there are lots of small enemies moving around quickly and spread out.
  • Conversely, have at least one general  situation where it is actually a sub-optimal choice.  Check!  Sub-optimal in situations where there are a lot of smaller enemies around, drawing off your shots.
  • Never be completely useless, even in sub-optional situations.  Check!  Even if the homing shots are flying off to random places, the concentration-mode of the gun meaks you can still hit with over half your damage.
  • Have some form of risk/reward built into the weapon, where there is a constant, interesting choice for the player to make, where they can consciously assume  some form of risk, in exchange for some form of payoff.  Check!  Although a little fuzzier on this one.  Staying directly under the enemy to hit with your entire damage counts a little here.  But also, staying under the enemy while unconcentrated gives you slightly more damage than concentrated, while also being more dangerous.  (Because your movements are less precise.)
Conclusion:  Feeling pretty good about this gun.  And playtesting all the levels with it confirms this, at least for me.  It’s fun to play with, interesting to use, and has different high-points than the other existing guns.
Ship it!
This entry was posted in Dev Log, Elements of Magic, Game Design. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.
  • Crass Materialism!

    If you like what I'm doing here, feel free to click this button and send me some Pavlovian reinforcement!