Unity Engine - Bunker Controls Train-of-thought

I haven’t had much time to spend on this game lately, but I’d like to share what I’ve got so far and record my train-of-thought tackling this game’s controls.

Right now I’ve got some of the shooting mechanics and a first pass at player controls.  Your character is a black circle, the enemy is a red circle, and bunkers are blue circles. If you have line-of-sight to your target, you’ll fire at it automatically.

In this build, everything is controlled by left-clicking with the mouse:

-Left-click a bunker to display a movement selector, then click the selector to set your precise destination point.

-Left-click a point on the ground to target that point (will be useful once fog-of-war is added)

-Left-click the enemy to target the enemy (will be useful once fog-of-war is added)

Click here to try it in your browser


Now for the train of thought. The controls I have thus far do work, and it’s easy to translate mouse clicks to a touch screen.

Problem: How does the player to “lean” around their bunker to fire, given this control scheme? The player needs to be able to get in and out of lean fast enough that they won’t get immediately shot.  The player could select their current bunker and issue a move command to the edge of the bunker, but that’s rather slow and annoying to perform. PC games typically handle this by assigning keyboard keys to left and right lean, but what about mobile? I could stick some buttons on the screen or use the gyroscope, but I don’t think players would enjoy using those (I certainly don’t).

I could just drop mobile support, or give the player more time to perform their input via the main movement interface. How?

A “pause” control was in my initial design, and would certainly give the player more time to enter their movement inputs. But how does a player activate/deactivate pause on mobile, aside from a crappy onscreen button? The only thing I can think of is some sort of automatic pause, like a turn-based game.


Blue sky: How would Bunker work as turn-based game?

I’m imagining something like XCom: a turn would allow you to issue some number of explicit commands: move to a bunker, choose a target in your view from that bunker and fire on them with some percentage chance to hit.

I like the idea of shooting while behind a bunker. The idea is that you can look “over” or “around” whatever bunker you’re at. When you send the command to fire, your character leans out automatically.  However, in turn-based games that lean is usually just window-dressing, it doesn’t bring any risk… whereas in real paintball it does.

I could emulate that risk by adding some percentage chance to be hit back when you fire. But I don’t like percentage chance to hit in general, it doesn’t evoke the real paintball experience like actually firing some paint and watching their spread relative to the size of your target. And I don’t like constraining the player to any “pre-sized” actions. Paintball is one big analog balancing act, there is value in leaning out an inch for one second or a foot for five seconds, running one meter or a hundred meters.

Dropping mobile support doesn’t really harm me here. The original reason I wanted to support mobile was for the same of getting some mobile dev experience. But since Unity just converts projects to mobile code anyways, I wouldn’t be learning all that much. Whereas to put this game on mobile I have to either accept a crappy interface or change the core of my game.


Ok, so let’s say I drop mobile and target Keyboard+Mouse controls. What do my controls look like? Even if I have a mouse and a hundred keys available to me, players won’t enjoy trying to use all of them. I really should’ve done a mockup to solve this problem back in my initial design, then I could’ve ruled out mobile from the start.

Left click on a bunker to select it and display a movement selector, Left click on the selector to set your destination point.

Right click on the ground to pre-target that position, or Right click an enemy to target that enemy.

Once you arrive at your destination, use the WASD keys to lean in the global cardinal directions. Holding down a key will lean further in that direction up to some maximum, while releasing the key will return you to neutral position. Multiple lean keys can be combined. For example, “W” + “D” produces a lean to the north-east. Releasing “D” will result in a lean only to the north. “A” + “D” would cancel each-other out resulting in no lean.

Spacebar activates pause. While paused, all firing and movement stops but controls will still accept input. Pressing spacebar again resumes the game.

Escape key pauses the game and probably opens the menu. Escape again closes the menu and resumes the game.

Left click manipulates the menu when it is open.

Those controls seem pretty comfortable to me, and I think they cover everything I’ll need. WASD-lean isn’t something I’ve seen in a game before, so I should create a tutorial.