I've been working on a pacman clone in HTML5 for quite a while. (http://pacman.platzh1rsch.ch)

One important thing for me was always to keep it responsive, so it would be playable on all different handheld sizes. The big problem wit that is: it is way to hard to play on a mobile device.

On a desktop or laptop you can control Pacman using your keyboard's arrow keys or W-A-S-D, which - in my opinion - is really easy.

For touchscreen devices I added some buttons into the game and also the support for swipe gestures. Anyway, turns out it's still way too difficult to play for most of the users.

Do you know any better options on how to solve this issue?

enter image description here

EDIT: Just adjusted the game to detect swipe gestures on the whole screen and I think it is already a pretty nice improvement. Thanks for all the hints, and suggestions!

  • 2
    The 'official' pacman game uses swipe controls, which I think are quite nice. The biggest advantage is having the full screen as a target rather than individual buttons.
    – DA01
    Mar 23, 2014 at 23:05
  • True, but you cover the game area with your fingers and currently I want players to be able to pause the game by touching the screen too. It's a bit tricky.
    – platzhersh
    Mar 24, 2014 at 8:54
  • Given your game screen doesn't cover the entire device screen, I don't know that that would be an issue. You could then have a dedicated button for pause (or, just detect tap vs. swipe).
    – DA01
    Mar 24, 2014 at 16:07
  • Just adjusted the game to detect swipe gestures on the whole screen and I think it is already a pretty nice improvement. Thanks for all the hints, and suggestions!
    – platzhersh
    Apr 2, 2014 at 12:40

5 Answers 5



download bmml source – Wireframes created with Balsamiq Mockups

I prefer games using this layout, emulating a joystick so you can tap and drag. It also allows you to simulate acceleration.

  • I'm a native english speaker I'm just very tired, someone help this sound like human. Jan 15, 2014 at 21:34
  • I thought about this too, but I see a lot of problems in the implementation (sensity etc. ) anyway I guess it's also worth considering. Will post my opinion after I've tested it.
    – platzhersh
    Jan 30, 2014 at 10:34
  • 1
    Let me know what you think, I love the joystick-ish thing. Jan 31, 2014 at 15:10
  • 2
    I think the joystick might be a good idea, specially because you only need one hand to play, the controls are natural. Since this is for a pacman implementation, you wouldn't have to deal with acceleration and some more complex interactions.
    – jff
    Feb 4, 2014 at 13:29
  • I'm just trying to implement github.com/jeromeetienne/virtualjoystick.js#readme but I have some issues. Any other good javascript implementations of joysticks?
    – platzhersh
    Feb 5, 2014 at 11:07

I don't like to play games on my smartphone since it's often hard to control a character/car or whatever. But the games I've played the most had controls splitted to the left and the right so it's easier to tap with thumbs.

games controls iPhone

Little Acorns is a great example :

Little Acorns

  • I really like that idea! Thx! Will also test this and in the end, post which solution I chose and worked best.
    – platzhersh
    Jan 22, 2014 at 14:20
  • But note that a side scroller is a very different gaming experience than Pac-Man.
    – DA01
    Mar 23, 2014 at 23:05

Use a Gameboy like type of inputs - it worked for years - don't know why it shouldn't work on mobile (I suggest this also as a Gameboy emulator user on my mobile phone).

Move the directional key "down" lower so the user can press it more easily with his thumb. Also increase the input a bit so it's easier to see which key is being pressed (also not all screens have the same touch acuracy, so a bigger input is better).

Also consider screen rotation - on horizontal screen move directional keys to the right and action keys (if you have any) to the left.

Gameboy interface

  • 3
    One issue would be that a Gameboy had physical buttons so you could tell which one you're pressing just by the tactile feel of them. Replicating the positioning / size of them on a touchscreen means you lose that tactile feedback so you don't know what you're pressing (which is equally problematic as you can't even see what you're pressing because you're thumbs will be in the way!) - Note: I'm not saying this is a bad suggestion, just that it's not without its issues.
    – JonW
    Jan 15, 2014 at 11:43
  • @JonW - I've been playing Pokemon Gold on my old Nokia X6 for years now (I just love getting back to that game) - using a gameboy emulator which has the keys aranged in this way and never had the problems with it - true it is that the command inputs are a bit bigger than the buttons on gameboy - should have mentioned that in the post. Edited now.
    – easwee
    Jan 15, 2014 at 11:45
  • Thanks for your answer! I remember thinking about implementing some kind of virtual joystick, like on the old arcade pacman machines and my buttons kinda come from the gameboy idea. But I really like your idea of putting the controls to the side in landscape and distributing them more equally. I will see how I can implement it and will then get some new user feedbacks to tell you if it helped :)
    – platzhersh
    Jan 15, 2014 at 12:16
  • @platzhersh - gameboy advance is actually the horizontal layout. The color one is vertical.
    – easwee
    Jan 15, 2014 at 13:01

There's another option that nobody here has mentioned. I see it a lot in Nokia Snake-like games on mobile, where there is the same limited range of motions:

  • Continue straight ahead (no action needed)
  • From the perspective of the snake/Pac-Man, turn left, and
  • From the perspective of the snake/Pac-Man, turn right.

That means you can cut down the number of controls down to two: swipe left/right and/or tap left/right buttons. (Picture a first-person Pac-Man game, going through a maze if you're having trouble getting what I mean.)

The problem with this is that, at first, it would be difficult for the user to determine whether to press left or right while looking at a top-down representation using first-person controls. If Pac-Man is heading up on the screen, the left/right matches up with reality, but if he is going down, left/right is reversed, and the other two directions can be even more confusing.

  • 1
    I tought of this as well. Then I realized that Pac-Man can turn on its tracks, so there is an option to turn back in addition to turning left or right. Sep 12, 2015 at 19:35
  • Good point. I never thought of that.
    – user69458
    Sep 13, 2015 at 5:02

The joy stick would give it that nice old school arcade look, but maybe basing the game off of an Accelerometer could be an option as well. This would mean controlling the movements by tilting your mobile device. Here's an article from 2012


There are limitations, but it could be something to look into.

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.