Ashley
I know there was a C2 discussion on this.
I didn't really understand what Mouse Lock or Pointer Lock was at the time I read it but now that I am trying to implement KB&M control on my game I have come to the conclusion that access to this API is essential for many modern 2D games
and I would very much like access to the mouse lock / pointer lock API for my game.
My in work game is a twin stick shooter. The primary method of control is dual analogue joypad Secondary method would be dual touch
However I would also like to implement mouse keyboard control, as although it would be preferable for player to use one of the other methods it is likely that most will first come across my game by way of PC with only KB&M access.
But I do not want the gun angle to follow a crosshair mouse cursor on screen.
Although this control method is common in many games it is super lame for what is intended as dual analogue control. (as it essentially allows KB&M players to just rest cursor over intended target and move ship with wasd/udlr keys while cursor will remain on target always so gun angle will always point to target. (i.e. there is no aiming skill requirement)
what I want is the player to be able to make circles with the mouse that dictate the gun angle
I have already made this work without mouse lock (by dragging an invisible pivot point around close behind the invisible mouse position. and using the angle between mouse position to pivot point position to set gun angle.)
however this falls flat on its ass as soon as the mouse position hits the edge of the screen. full screen or not.
As you can see in this case it would be real beneficial to have mouse lock / pointer lock
.
in fact any dual analogue type shooter would benefit from mouse / pointer lock.
there is also another alternative and preferable control scenario that does have a crosshair on screen dictated by mouse movement but the crosshair also moves in line with player. This also requires mouse / pointer lock
mouse/pointer lock would clearly be turned off on any menu or on escape etc to avoid annoying player.