Tuesday, March 22, 2016

Hammer devlog 01

note: this has been migrated from elsewhere, and formatting may be a bit wonky

I like shooting games.

Not, like, that boring first-person shit, and only marginally that acceptable first-person shit like Doom. No, I like shooting games, like, the kind where you've got a spaceship made outta exploding cardboard and sometimes the console physically can't keep up with the amount of bullets and explosions and shit on screen and it's like, whoa, and this is totally a legit sentence and I'm not just pulling it outta my ass.

Okay, so something I probably should've led with: when I say "from scratch," I mean that I literally hadn't even thought about this project until I hit the New Thread button back there. We're working from the ground up here - starting with design. I haven't written a line of code, I haven't done any graphics or music or anything. And I'm not gonna use anything that's already laying around, except maybe as a placeholder. Literally the entire development process is gonna be documented in this thread. Think of it like improv jazz, except video games, and oh my god did I just type "think of it like improv jazz" I'm a fucking hipster when did I turn into a hipster?

Okay. Okay. I'm a hipster, fine. Well, being a hipster: my favorite 2D Zelda (by which I mean the clearly, objectively best one) is Link's Awakening.

I'll get to why that's relevant, maybe?

Okay, so something else I wanna play with: free-roaming shmup controlled with WASD+mouse. Character moves on a 2D plane, mouse controls cursor, you shoot toward the cursor. Decoupling movement from aiming lets me get really fuckin' mean with bullet patterns and the like. Think of how Sin & Punishment 2's side-scrolling sections worked - Wiimote let you aim wherever you wanted, so it was possible for that game to throw shit at you that'd be ludicrously unfair in a more conventional shmup. And the freedom of movement you've given by being able to shoot in any direction is something that game didn't do much with that I want to explore more fully - so: Zelda. Dungeons, overworld, all that good shit, and all it full of giant, like, buckets of bullets that fly all over the place like WHAM ZOOM WHOOOAAAA and try to murder you. Got that? Great?

I'm putting a mouse in the player's right hand, which means I wanna keep controls pretty simple. Mechanics should be very quick to learn; difficulty should come from scenarios, not wrapping your brain around how to make your character do anything. So: here's what we're doing.

WASD: move
left click: fire primary weapon
right click: fire secondary weapon
double-tap direction key: dodge roll
Enter: bring up menu screen

We have Zelda DNA, and by Zelda I mostly mean just Link's Awakening because, y'know, why would you even want that other shit? So primary and secondary weapons are literally just slot 1/slot 2, not a deal where there are two different classes of weapon or something. Keeping it simple, yeah? You hit the mouse button and you fire the weapon in that slot toward the cursor. You can bring up the menu screen at any time, which pauses the game and lets you change the weapons in those slots, because we're going full Zelda, except more awesome because how many of your Zelda things are guns? All of your things are guns here. Like, even if I wanted a locomotion tool: that's a gun. It fires a thing toward the thing. Maybe it's a grappling gun, maybe it's a really big gun that's loaded with you - whatever, man. It's a gun. It fires a thing toward the thing.

Okay, now let's talk about that dodge roll. Dodge rolls are, like, really fucking important, and how this works is basically gonna shape the entire combat system.

I want the player to be able to dodge basically everything, and I don't ever want you to be in a situation where you need to dodge and you can't despite having played well. That means this is a powerful dodge roll. But that's dangerous, because it means that we could potentially wind up with something exploitable. If you wanna see how a powerful dodge can go very wrong, play Metroid Other M. I mean, don't play Metroid Other M, nobody should play Metroid Other M, if you run across somebody who's currently playing Metroid Other M you should put the gun to their head and pull the trigger because that's a mercy killing, you're doing them a favor, man, the longer you hesitate the more they suffer.

But if you did have the misfortune of touching that shitfest: man, that dodge is fucked, right? It's long, it's basically all i-frames, and it doesn't really have any starting or ending lag, and there's no stamina system to punish you for spamming it. The optimum strategy for fighting shit in Metroid Other M is to hammer on the D-pad like a cretin and hit the fire button whenever you're charged. It's fucking terrible. We don't want that.

We also don't want a stamina meter, though. Kid Icarus: Uprising is a game I love to death, and it's a game that balances a dodge roll that could be just as spammable as Other M's by tying it to a very limited stamina meter, and that works - but it changes the way you approach the game by creating very distinct offensive and defensive phases. When you go on the offensive, you get as much mileage as possible out of that dodge and focus on hurting shit; when you're on the defensive, you want to recover stamina, and you avoid taking risks or going after enemies if possible so that you can get back to a proper offensive position as quickly as possible. That's a really interesting rhythm, and it can be really beautiful how that game will make that tempo switch six times in six seconds - but that's not what I wanna do here. The Zelda structure carries with it a totally different pattern of action and rest - we're inheriting the whole screen-scrolling system from the Game Boy Zelda games, and that means we need to build around skirmishes. When you enter a screen with enemies on it, your first priority is to remove them before they remove you, and once you've done that you can focus on whatever else is happening. Kid Icarus (by which I mean the only Kid Icarus game that actually even sorta matters, because the side-scrollers kinda sucked, yo) is a more pure-blooded action game, one where you're either currently in combat or moving from one combat site to another; we've got puzzles and dungeon navigation and shit for our downtime. We don't need those moments in combat where it's okay to take a breath - you can take a breath once the screen's clean; right now, you wanna kill these dudes, you dig?

Okay, so: powerful dodge, no stamina meter. How do we keep that dodge as useful as it needs to be without making it spammable?

[​IMG]

Answer: no startup lag, decent amount of i-frames, variable ending lag.

Let's break the dodge down to three discrete phases:

1) player hits the dodge button, enters dodge
2) player is invincible
3) player is vulnerable during ending lag

If the player is spamming the dodge, they're gonna use it at times when combat doesn't demand they use it, and that's what we want to be punishing.

If you dodge successfully - that is, a bullet passes through your hitbox while you're invincible - we skip the ending lag entirely. Doesn't happen. You made a precise, artful save and that's rewarded by letting you immediately come out of that and start hitting things and dodging more hits. Chain a few of these dodges and you should feel like a badass - if your timing is good enough, you can just dodge into another dodge and dance around in a hail of fire.

But you can't do that forever, because you can't fire during the invincible phase of the dodge! Anything onscreen will still do damage, but the fire buttons don't do shit for that - let's go with 15 frames - that you're invincible. Positioning still matters, then, because the only way you can get back to punishing things is if you're free and clear. What the powerful dodge does is give you the freedom to do that - you can dance around the screen and get to good firing positions as enemy positions and bullet patterns make them available.

The nature of this system also allows me to encourage different weapons on different screens in an organic way, instead of having the common "GET THE SPREAD GUN > FIRE THE SPREAD GUN > GOTO LINE 10" anti-pattern. Rapid-fire weapons have superior DPS, but they require you to be able to hold a position for a second or two to do real damage, because if you're just firing a stray round off between dodges a machinegun isn't going to do much. Slower, single-shot weapons let you pack more oomph into the shots you can get an opening for. Different screens will have different properties - enemy types, enemy numbers, availability of cover - that'll change the weapons you want to use.

In effect: shooting becomes a Zelda puzzle. The properties of your weapons synergize with the properties of the skirmishes to create a lock-and-key pattern, where (ex) you can find that the spread gun isn't actually doing much, but that wildly impractical lightning gun you picked up three hours ago and figured you'd never use again can tear through the room, because its weird-ass firing pattern is ideal for hitting multiple targets with environmental cover from the shitty real estate they're forcing you to inhabit.

What happens if you do take a hit, though? I'm not quite nuts enough to posit a Zelda-like where you die if you take one hit, but I also want those hits to matter, and (for bonus points) I'd like to avoid scenarios where the best move is to play it safe and try to wait for a health refill pickup.

I really like F-Zero, and I swear that's not a non-sequitur.

One of the things I find most interesting from a design POV is the way the post-SNES games don't have a boost meter. You boost by burning through your life bar. I love what that does to the rhythm of the game - boosting becomes an inherently risky venture, since you're less able to survive collisions for each boost you use, and health refills are available maybe two or three times in a lap. But it's also something you want to do as much as possible, because, y'know: racing game. Gotta go fast. And, besides, even if you have a comfortable lead, it can be more dangerous (even in terms of how full your life bar is!) to not boost than it is to boost - the AI is brutal, and if you give them the chance they'll ram away half that life bar and leave you in the dust. And then you're still out of boost power, but now you're also in 20th place. There isn't a safe play; you just have to weigh two different kinds of dangerous.

I'm totally stealing that.

Each shot from your weapon uses a certain amount of your energy. If you run out of energy, the only thing that you can fire is the basic weenie gun.

Each hit you take also drains an amount of that energy, and if you get hit at zero energy?




Attacking hurts you. Not attacking hurts you more, because you do have to attack. Dodging and using the room layout for cover become critical not just for staying alive, but for conserving that "ammo" to use in actually attacking things.

How do you replenish this currency? I don't want health pickups, right? The obvious solution is for it to regenerate automatically, but automatic health+ammo regeneration and cover and OH NO IT'S A COVER SHOOTER ABORT ABORT ABORT.

Well, I want "aggressive," yeah? So how about just restoring your energy meter to full each time you kill something?

That's a fun concept. It creates a situation where, when you're in a bad spot, the only thing that can save you is to just say fuck it and go on the offensive. And it plays nicely with our powerful dodge - because that's always an option, even when you're out of energy, so you always have a fighting chance. Even if you're shooting a giant monster to death with the weenie gun while trying to avoid any sort of hit lest you immediately keel over dead: you have a chance. But the only thing that'll let you seize that chance is if you quit worrying about the legitimate danger you're in and just... take a breath and go to work. You've fucked up, and now you need to be perfect if you're gonna survive - but you can do that, and if you do, you'll be good as new.

Yeah, I really like that. It also creates a fun layer where, in difficult skirmishes, you don't necessarily want to pick enemies off one at a time - each one is a walking change of batteries for you to use, and you might need that. So you want to keep as many as you can manage on death's door, and only actually kill them either when necessity demands it or you're ready to move on. You voluntarily maintain more pressure on yourself than you have to because that pressure also contributes to keeping your options open.

Designing bosses around this system requires that they bring in adds.

Since we're Zelda up in this bitch, there's a light RPG/character-progression angle. Part of this is filling your inventory with guns - but I don't want the player to feel like that's all they're doing. And if that is all you're doing, then having a sense of power progression necessitates that some of the earlier guns will be plainly outclassed by later ones, and I definitely want to avoid that. Every gun should have its own distinct role that remains relevant into the endgame. The player should both unlock additional options for combat and traversal (in the form of guns) and improve in objective statistical terms.

We have one currency we use in combat - that energy meter. It's health and ammo in one big pool.

Okay, then: let's work with that. You can find energy tanks (but not Energy Tanks because I would get sued and I'm too broke to be sued) lying around, and each one adds 100 energy to your starting 100 points. The more of these generic-non-trademark-infringing-tanks-of-energy you have, the more durable you are. Easy enough.

But here's the problem: if you have a gun that's balanced to be usable for an entire skirmish with 100 energy, then having 800 energy doesn't do that gun much good. And one that takes 50 energy a shot to do a shitload of damage - that's a risky last-ditch thing with 100 energy, but 800 energy makes it a mainstay of your arsenal. We don't want this.

Okay, we want to increase the amount of damage the player can do - because you should feel a hell of a lot more powerful at endgame! - but we want that to be gun-agnostic. And we want the relative energy-efficiency of your guns to be more or less fixed, no matter how much energy you have: each gun has its thing, and it does its thing.

Okay, great: damage dealt by each (non-weenie-gun) shot is determined as follows: ShotEnergyCost * GunMulti. And the cost-per-shot is proportional. Each gun uses a certain percentage of your maximum energy for each shot. Having more energy makes you more durable, but it doesn't give you more ammo - every gun retains its own role, even the 0-energy weenie gun. More energy does, however mean more damage output - 10% of 800 is a hell of a lot more than 10% of 100!

There's a clear power gradient in play that doesn't muck up the cleanliness of the system with 500 different types of power-up and doesn't smooth out the fundamental differences between your various guns. That's good shit!

Well, okay. We don't really know what these guns are or what you're shooting with them or where you're shooting them yet, but you know what? I think there's enough design work here to try and get a prototype up and running to experiment with character controls, so that's the next step.

Before that, though: let's talk about aesthetics real quick.

Since this is apparently at least in part a love letter to Link's Awakening - and, well, because I like the Game Boy - we're gonna do this with an aesthetic based on that of a grayscale Game Boy game. 160-by-144 resolution, four shades of gray, and one background layer, one window layer, and two sprite layers. I'm not gonna fret too much about making sure what I'm doing would be technically possible - let's be clear, the amount of sprites I wanna throw at this shit would probably make the Game Boy chug - but I don't wanna do anything too crazy with scaling or rotation. I want to at least preserve the illusion that this could sorta run on a Game Boy, maybe.

That aesthetic is important because:

a) the limited resolution informs how combat works - sprites are small, but even so, screen real estate is limited; the number of enemies on one screen will have to be relatively small to keep things manageable, and even a single block in the middle of a room can be very powerful as cover

b) it enforces limits on graphical fidelity that keep art within the bounds of what can be done at least somewhat efficiently.

I also want to have at least an elevator pitch from a narrative point of view, both as something to keep in the back of my mind while working from here on out and as a defense against the fact that if I don't yank this band-aid off right now I'm going to wind up with some ludicrously self-indulgent shit down the line. So let me fire up my copy of the Official 8-Bit Action Game Plot Generator real quick-like:

"You are a GIRLFRIEND. Your NINJA has been kidnapped by PRESIDENTS. Are you a bad enough GIRLFRIEND to save the NINJA?"

Maybe I shouldn't have pirated that. But, well: I'm a man of my word (not even - ditch the man part, I'm basically just a giant ever-expanding mass of my word, like Tetsuo at the end of Akira, you dig?) so that's the concept.

Next post should contain an initial prototype. I'll probably want some thoughts on character control at that time.