Skip to content

added touch input scheme for ios#12

Open
kristoff-it wants to merge 1 commit into
floooh:mainfrom
kristoff-it:ios-touch-input
Open

added touch input scheme for ios#12
kristoff-it wants to merge 1 commit into
floooh:mainfrom
kristoff-it:ios-touch-input

Conversation

@kristoff-it

Copy link
Copy Markdown

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

floooh commented Jan 10, 2022

Copy link
Copy Markdown
Owner

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
Copy Markdown
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