Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

iPad touch gesture challenges - preventing the dreaded fullscreen swipe-down

A topic by meditativegames created 64 days ago Views: 66
Viewing posts 1 to 1
(1 edit)

Hi crew,

I'm prototyping my first itch game, and have been struggling dreadfully against the iPad's default gestures: when in fullscreen mode, the slightest downward finger-drag movement exits fullscreen mode, and doesn't register as game control. This is Apple's gesture control kicking in, hijacking the game. It basically doesn't matter where on the screen I make the downward swipe; it (almost) always tries to minimise fullscreen.

For context, I'm coding in p5.js + some CSS/html elements.

On the itch.io side, I've selected "Embed in Page", "manually set size", "Mobile Friendly", and added the built-in "Fullscreen Button".

Here is what I've already included in the code, in an attempt to prevent the dreaded swipe-down:

function touchStarted() {  ... return false;}

function touchMoved() {  ... return false;}

function touchEnded() {  ... return false;}

Here's my html viewport definition:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">

I'm considering switching in itch to the "Launch in Fullscreen" option, which doesn't actually launch in fullscreen (on iPad at least). It instead maximises to the full browser window size, still showing the top web address bar. So you lose some screen real estate. But crucially, the swipe-down gesture no longer minimises, since we're not actually in fullscreen mode.

How have others designed / coded around iPad gestures?