Skip to content

Conversation

@kristoff-it
Copy link

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.

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.
@floooh
Copy link
Owner

floooh commented Jan 10, 2022

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

@kristoff-it
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants