I have an old game I wrote decades ago, which I'd like to port to mobile.

The inputs are basic, arrow keys to move around. However you can't easily do that on a mobile - eg you hold down right to move right, but I'm not sure even an onscreen keyboard is going to be a good equivalency.

What is the common UX pattern for mobile here? A swipe to change direction perhaps?

enter image description here

1 Answer 1


A common way is an on-screen D-pad or analog stick. From Minecraft Pocket Edition to Genshin Impact, it's a fairly well understood pattern.

That said: This would be a very indirect method of control. Since you can point to anywhere to the screen, it probably would make sense to have the ship be glued to (or follow) wherever it is the player touches the screen. This comes with some challenges on its own - a finger will be blocking a critical part of the game, the player's hitbox - which may require somewhat large changes to adapt to the rest of the game to keep things fair.

You may be find advice for the latter problem in the gamedev SE.

  • For the hitbox problem, one can designate the bottom 10% of the screen to a horizontal control area in which your touch is tracked, and the spaceship just above you follows in parallel. Also helps achieve speed limitation (because the cause and effect are detached already, it's less discombobulating when the spaceship lags behind the finger movement). Of course, this only works for linear movement, not vertical as well. Apr 21, 2023 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.