Jump to content

Displaying message for user to rotate device on mobile


mentuat
 Share

Recommended Posts

In a scenario where you have a mobile game designed for landscape but the user is holding the phone in portrait (or vice versa), i'd be interested in opinions on whether it's preferable to...

A) pause/hide the game and display a message requesting user rotate device to correct orientation

B) resize + reposition game regardless of orientation (allowing game to appear pretty tiny in the wrong orientation)

C) something else (rotate all game assets 90 degrees to fake an orientation lock?)

Link to comment
Share on other sites

For my first HTML5 game I am going with A so far. 

 

I would love to make the following check though:

if <playing on huge phone/tablet> {allowUserToPlayInWrongOrientation();}

 

Anyone knows solid library that can make this type of check for most common tablets and phablets?

 

Even more ideally though :) I like what Candy Crash Saga is doing: smartly reposition all game elements to suite the orientation. In certain types of games it works really well and looks very polished. 

Link to comment
Share on other sites

thanks for the input, I have option A in at the moment as it seemed the best balance between presenting the game in good a way and being clear to the user, glad it is pretty much the standard

 

I would love to make the following check though:
if <playing on huge phone/tablet> {allowUserToPlayInWrongOrientation();}

ha yeah I agree!

 

I guess using a tedious combinaton of userAgent checking and assumptions on browser width/height it's conceivable to cover the majority of current devices to perform this check to a fairly accurate degree - but the sheer amount of devices being released regularly and ever changing pixel counts would make it pain to support in the future

Link to comment
Share on other sites

I don't think it's that complicated honestly. The device/browser is nearly always irrelevant, all that matters is how many pixels you've got to play with. If it's enough for an 'HD' version of the game, then run in that mode, otherwise low res. That's the only rule I use.

 

My original concern was HD devices with smaller screens (like retina iphones and some new HD Androids). But I realized that many of these devices in fact report "logical" pixels in browsers to be compatible with "pixel hardcoded" websites. For example, retina iPad reports half of its resolution in Safari container sizes it seems.

 

So if (width > 640 pixels && height > 640 pixels) {allowPlayingMyVerticalGameInHorizontalOrientation();} is probably pretty good heuristics! :) Ideally I don't want to force people to rotate ipads. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...