I have finally completed the first phase of the long desired combat overhaul. The player now has a sniper rifle, a shotgun, a charged alt attack on their mainstay gun, and even a periodical teleport attached to the hairspray stick. I’ll get to the design ideas a bit later. 

As part of the effort to make all this work, I implemented an input buffer system – really, an action buffer – to facilitate appropriate control. For those unclear as to what an action buffer is, you can read my piece here, or watch the excellent visual explanation below, albeit for a different kind of game. 

In short, action buffering is crucial to accurately representing the intent of the player. The alternative is either eating the player’s inputs, or needlessly forcing them to execute one frame perfect actions, so as to not interrupt important actions that are almost finished, such as reloading. Although some care must be taken to make sure that stale actions are discarded, so that, for example, we don’t needlessly dodge out of hitstun.

So easy, yet the 10/10 GOTY failed to implement these few lines of code…

90% of the implementation was fairly straightforward, although I did have a ton of small bugs to chase down, and I sort of wish that I’d screen captured them. As one of many examples, I let the player interrupt the burst fire of the main rifle with a melee, only to have the rest of the bullets come out after the melee was done. I also had a truly bizarre bug, eventually tracked down, where firing the main gun stopped the player from being able to melee, but only if they tried melee’ing while firing on the same frame and the gun was also overheating. I think all the egregious bugs have been sorted out, but there are a few rough edges remaining. 

Currently there is a standard ignore/clear time for all actions of 250 ms. A longer action buffer starts feeling glitchy, except for when switching weapons after reloading, which is something the player wants to do frequently, due to the way the plasma rifle works. Since it is continuously cooling, when the player is done reloading the sniper/shotty, very often the plasma rifle heating is at zero. We therefore want to use it first, so that it can be cooling down while we utilize the clip based weapons, so that we can switch back to it after they’re done. That might sound complicated, but it’s quite natural in practice. 

Unfortunately, while a quarter of a second is a generous window for just about everything else, I still found myself occasionally timing the weapon switch too early, and interrupting the reload at the last moment. I can do this correctly 90% of the time, but that 10% where I accidentally mess up is truly aggravating, especially since these failures tend to coincide with the times when you’re most at danger of dying anyway. I might have to implement unique buffer times for various states. In any case, it’s currently better than nothing, and I await the results of playtesting.

The main reason I stuck to a single weapon approach for so long was because additional weapons bring with them exponential UI/art requirements. Even showing the player which weapon is equipped is a challenge, let alone doing so beautifully and seamlessly in a final product. I’m trying to implement the low hanging fruit, such as the sniper trail you see in the above image, but I did have to bring back that annoying UI that follows the player as a stopgap.

This gets the job done in terms of conveying the various important information to the player. In the future, a combination of natural graphical and audial effects, such as slightly pitching up the sound as the gun empties of bullets, or making the stick glow when the charge has built up enough to throw it, should obviate the need for that ugly thing. 

Example from Halo:CE. The ammo icons begin flashing red, and “Reload” begins flashing on the screen when the player gets down to the last few bullets. Very slight pitch up in terms of noise when firing. You may not notice, but your brain does.

Regardless, I welcome this additional work with open arms, because the game really was too damn simple. I had hoped that one gun, grenades, and a melee attack was enough, but I could no longer deny that I just wasn’t having that much fun with the game. There’s only so much you can do purely with enemy and level design, and giving the player more options, provided that the controls work, is rarely a bad idea.

Speaking of the controls, they may take some getting used to. I wanted to give the two weapons – the plasma rifle and the snipershotty – an alt fire, so that the player could always melee without having to switch to a dedicated melee weapon. That works quite smoothly for the plasma rifle’s alt fire, which is a charge.

It’s less intuitive for the snipershotty, since it’s not that obvious which one should be the alt fire. I’m not sweating that too much, since I doubt I’ll be keeping the shotgun in the game. Really, I only threw in the shotgun because it’s such a classic weapon that you have to build at least one during development. Also, historical accuracy. 

I could give the player a third weapon, but I’d rather not, since there’s no way to quickly switch between three weapons in any control scheme. I’ve always thought that two weapons was overly restrictive, but since each weapon has an alt-fire, hopefully that’s enough. 

As for the teleport, it’s basically lifted from HOTS, specifically an ability that Tyrael has. You chuck your sword to a certain area, and can teleport there as long as it remains active. That’s not quite how the teleport works in the game right now, and I have additional ideas that will further distance the two mechanics, but it gives you the general gist of things. Right now, it simply requires a ton more graphical and audial polish even to get to the serious prototyping stage. You use it by holding CTRL while you click the RMB.

As an aside, while I very much do not enjoy the traditional roll with i-frames, a periodic teleport and a roll are not mutually exclusive. The shift key is free right now, as are all the numbers, and g,r,e,q,t, and all the other traditionally used keys with the WASD setup. I’m going to throw a lot of things at the wall, and as of right now we have control headroom to spare, even without resorting to key combinations.

Anyway, I got somewhat discouraged from posting the builds in the telegram group, as I saw that almost no one was downloading them, let alone providing feedback. Please, it would help us quite a bit if you could hop on over and play the game, even for just a minute or two, and then leave a comment here or elsewhere.

Thank you. 

EDIT:

Since many people don’t have Telegram, I have revived my old DropBox account. You do not need a DropBox account to download shared files, and you the build here.

You may also like

2 Comments

  1. I have had every intention of clicking around until I get the feel for the game.
    None of my 6 browsers lets me into Telegram.
    I am NOT faffing around with Telegram. There are limits.

    1. I don’t know why people hate Telegram so much, but I I will create a second method of downloading the build. EDIT: You can now use the Dropbox link, and no, you do not need a Dropbox account.

Leave a reply

Your email address will not be published. Required fields are marked *

More in GDev