Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How action game controls should be implemented so that they would work on smart phones as well?

At the moment I use wasd/arrow keys and I am able to handle for example two keys down at the same time.

But many phones has no physical keyboard so should I render some control areas? Are there any JS libraries for this?

share|improve this question
up vote 1 down vote accepted

The Akihabara framework provides special input areas for games when they run on multitouch-devices.

share|improve this answer

One way to go is to render on screen controls for mobile/touch devices. However, I feel like this isn't the best approach. In order to have the best possible experience for your game it should respond to touch events within the game itself. (Touch a unit to select it, touch & drag an item from slot to slot, etc)

Take Plants vs Zombies on iPad for example. One of the reasons why it's such a great game on that platform is that the gameplay itself meshes well with touch controls.

On screen controls are definitely the "easy way out" when trying to port your game to mobile touch environments but they feel clunky and probably won't give your users the best experience with your game.

Some games just aren't meant for touch interfaces and if a developer wants to support mobile/touch they're better off designing their game to accept that style of input from the start.

share|improve this answer
Yes, it's certainly better to design the game for multi-touch. But the OP was asking about a Javascript (HTML5 Browser-Game) implementation that would also work on Smartphones/iPad. – bummzack Nov 3 '10 at 7:58

Take a good look at the Hammer framework, it's great:

Here's a good an on-screen controller framework that looks pretty good too:

share|improve this answer
Welcome to GD.SE! This looks like a great answer, but the question is over 2 years old. Perhaps you could try answering some of the newer questions. – Polar Nov 30 '13 at 16:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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