pacman.zig icon indicating copy to clipboard operation
pacman.zig copied to clipboard

added touch input scheme for ios

Open kristoff-it opened this issue 3 years ago • 2 comments

Probably not the best possible way of implementing touch input support, but it does make the game playable on mobile.

The input scheme is adaptive with regard to the direction that pacman is going. For example, going left creates the following touch input grid:

 __________
|      |   |
|  U   |   |
|______| R |
|      |   |
|  D   |   |
|______|___|

Similarly every other direction produces a corresponding "adaptive" grid.

Tested it briefly with a mouse and seemed reasonable, testing on a real device might be warranted.

kristoff-it avatar Jan 08 '22 19:01 kristoff-it

Just a heads up that I've seen the PR, but it'll be a little while until I get around looking into it :)

floooh avatar Jan 10 '22 18:01 floooh

No worries, also feel free to scrap this PR if you plan to add full, clean touch input support. I've only implemented it on stream to be able to play on iOS while learning how to use Sokol.

kristoff-it avatar Jan 10 '22 19:01 kristoff-it