- 04.28.13
Control Scheme
I've decided to adopt a mouse-driven directional movement scheme. The idea is that the mouse dictates the player's direction as opposed to a combination of keys being pressed.
There are issues with this.
First, if we calculate the angle based on two sets of points (x1,y1,x2,y2) > (player.x,player.y,mouse.x,mouse.y) and set the player sprite direction to the result we will have to control how quickly the player can change directions.
This becomes a bit alarming as when the mouse is closer to the center of the player, the angle changes much more drastically when the mouse moves. If you simply pass the mouse cursor south of the player (going effectively from 90* to 270*) you might want to add logic to have the player
visually turn around rather than classic platform style (pop! he's now facing south).
Second, we have the issue of dead zones. Given that the sprites allow for a limited amount of angles (faceable directions), we need some sort of dead zone so that the player can only walk in certain directions. Any mouse movement in the dead zone is ignored until it passes between a set of monitored angles. The player would then continue to move in the last acceptable direction until the mouse passes into a new, acceptable directional space.
I do not remember off hand how many angles the silencer sprites allot for. I believe it was 8 (N,S,E,W,NE,NW,SE,SW). If that is the case, my idea should be fairly well represented in the below example.
Keyboard mappings!
This is a draft, it is just there for prototyping. It would later be changed to take into account community feedback.
W - move forward
S - move backwards
A - sidestep left
D - sidestep right
Q - change weapon
R - reload
U - next item
I - previous item
Spacebar - jump
Left Shift - sprint
Left CTRL - crouch
Left CTRL + W - roll forward
Left CTRL + A - roll left
Left CTRL + D - roll right
Left CTRL + S - roll backwards