I'm making simple Arkanoid clone in Unity with both keyboard and mouse controls available. When I gave it to my colleagues to test one complain was that keyboard controls are not precise enough,. The problem is that I don't really know how to find a balance between two factors:
- If I make paddle speed too high then it lacks precision to position it just right to make ball go to the last few blocks.
- If I make paddle speed too slow then it's going to be difficult to reach ball in time.
I thought about it and I don't recall any version of arkanoid that solved that problem. Currently I have 3 ideas:
- Make two (or more) keys to go in each direction. One will go faster and another slower.
- Instead of making multiple buttons lets allow player to change speed of paddle during the game. Probably by entering number from 0-9 on keyboard.
- Just leave it like it is now. Other control schemes are not intuitive enough.
Does anyone have any experience with this? Which approach is the most reasonable?
Edit: Code I'm using:
Vector3 pz = transform.position;
pz.y = y;
pz.z = 0;
if (Input.GetKey(KeyCode.LeftArrow)) {
pz.x -= Time.deltaTime * KEYBOARD_SPEED_MULTIP;
}
if (Input.GetKey(KeyCode.RightArrow)) {
pz.x += Time.deltaTime * KEYBOARD_SPEED_MULTIP;
}
pz.x = Mathf.Clamp(pz.x, -60, 60);
rb.MovePosition(pz);
I simply move paddle by constant speed which includes timedelta. And then I clamp position to screen.